[xawtv] Fix #1155784
Dmitry Butskoy
buc at fedoraproject.org
Sun Jan 4 17:49:52 UTC 2015
commit 35ae9c7bd190a58e7ab9535c6d05a1f04d784494
Author: buc <buc at grad.stu.neva.ru>
Date: Sun Jan 4 20:52:31 2015 +0300
Fix #1155784
xawtv-3.103-cap_streaming.patch | 56 +++++++++++++++++++++++++++++++++++++++
xawtv.spec | 9 +++++-
2 files changed, 64 insertions(+), 1 deletions(-)
---
diff --git a/xawtv-3.103-cap_streaming.patch b/xawtv-3.103-cap_streaming.patch
new file mode 100644
index 0000000..9679018
--- /dev/null
+++ b/xawtv-3.103-cap_streaming.patch
@@ -0,0 +1,56 @@
+From dddc0a9664387497e2701afac6c9feca72650e28 Mon Sep 17 00:00:00 2001
+From: Stas Sergeev <stsp at users.sourceforge.net>
+Date: Sat, 27 Dec 2014 22:04:58 +0300
+Subject: [PATCH] v4l2_getimage: prefer CAP_STREAMING over CAP_READWRITE
+
+---
+ libng/plugins/drv0-v4l2.tmpl.c | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/libng/plugins/drv0-v4l2.tmpl.c b/libng/plugins/drv0-v4l2.tmpl.c
+index ded868d..2cbd34b 100644
+--- a/libng/plugins/drv0-v4l2.tmpl.c
++++ b/libng/plugins/drv0-v4l2.tmpl.c
+@@ -1241,7 +1241,19 @@ v4l2_getimage(void *handle)
+
+ size = h->fmt_me.bytesperline * h->fmt_me.height;
+ buf = ng_malloc_video_buf(&h->fmt_me,size);
+- if (h->cap.capabilities & V4L2_CAP_READWRITE) {
++ if (h->cap.capabilities & V4L2_CAP_STREAMING) {
++ if (-1 == v4l2_start_streaming(h,1)) {
++ v4l2_stop_streaming(h);
++ return NULL;
++ }
++ frame = v4l2_waiton(h);
++ if (-1 == frame) {
++ v4l2_stop_streaming(h);
++ return NULL;
++ }
++ memcpy(buf->data,h->buf_me[0].data,size);
++ v4l2_stop_streaming(h);
++ } else {
+ #ifndef USE_LIBV4L
+ rc = read(h->fd,buf->data,size);
+ #else /* USE_LIBV4L */
+@@ -1269,18 +1281,6 @@ v4l2_getimage(void *handle)
+ ng_release_video_buf(buf);
+ return NULL;
+ }
+- } else {
+- if (-1 == v4l2_start_streaming(h,1)) {
+- v4l2_stop_streaming(h);
+- return NULL;
+- }
+- frame = v4l2_waiton(h);
+- if (-1 == frame) {
+- v4l2_stop_streaming(h);
+- return NULL;
+- }
+- memcpy(buf->data,h->buf_me[0].data,size);
+- v4l2_stop_streaming(h);
+ }
+ return buf;
+ }
+--
+2.1.0
+
diff --git a/xawtv.spec b/xawtv.spec
index 1d57afd..21b3e94 100644
--- a/xawtv.spec
+++ b/xawtv.spec
@@ -4,7 +4,7 @@
Summary: TV applications for video4linux compliant devices
Name: xawtv
Version: 3.103
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: Applications/Multimedia
License: GPLv2+
URL: http://git.linuxtv.org/xawtv3.git
@@ -12,6 +12,8 @@ URL: http://git.linuxtv.org/xawtv3.git
Source0: http://linuxtv.org/downloads/xawtv/%{name}-%{version}.tar.bz2
Source1: xawtv.desktop
+Patch1: xawtv-3.103-cap_streaming.patch
+
BuildRequires: mesa-libGL-devel, libXaw-devel, libXext-devel
BuildRequires: libXft-devel, libXinerama-devel
BuildRequires: libXpm-devel, libXrandr-devel, libXt-devel
@@ -32,6 +34,7 @@ BuildRequires: libv4l-devel
Requires: usermode xorg-x11-fonts-misc hicolor-icon-theme
+
%description
Xawtv is a simple xaw-based TV program which uses the bttv driver or
video4linux. Xawtv contains various command-line utilities for
@@ -41,6 +44,7 @@ Xawtv also includes a grabber driver for vic.
%prep
%setup -q
+%patch1 -p1
%build
@@ -144,6 +148,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Sun Jan 4 2015 Dmitry Butskoy <Dmitry at Butskoy.name> - 3.103-5
+- add workaround for kernels >= 3.16 (#1155784, patch from Stas Sergeev <stsp at list.ru>)
+
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.103-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list