rpms/kdenetwork/devel kdenetwork-4.2.0-libv4l.patch, NONE, 1.1 kdenetwork.spec, 1.170, 1.171

Jaroslav Reznik jreznik at fedoraproject.org
Wed Feb 4 16:49:46 UTC 2009


Author: jreznik

Update of /cvs/pkgs/rpms/kdenetwork/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13321

Modified Files:
	kdenetwork.spec 
Added Files:
	kdenetwork-4.2.0-libv4l.patch 
Log Message:
* Wed Feb 04 2009 Jaroslav Reznik <jreznik at redhat.com> - 4.2.0-3
- port kopete video to libv4l (#475623)


kdenetwork-4.2.0-libv4l.patch:

--- NEW FILE kdenetwork-4.2.0-libv4l.patch ---
diff -up kdenetwork-4.2.0/kopete/libkopete/avdevice/CMakeLists.txt.libv4l kdenetwork-4.2.0/kopete/libkopete/avdevice/CMakeLists.txt
--- kdenetwork-4.2.0/kopete/libkopete/avdevice/CMakeLists.txt.libv4l	2009-01-26 16:03:03.000000000 +0100
+++ kdenetwork-4.2.0/kopete/libkopete/avdevice/CMakeLists.txt	2009-01-26 16:02:26.000000000 +0100
@@ -18,7 +18,7 @@ set(kopete_videodevice_LIB_SRCS 
 
 kde4_add_library(kopete_videodevice SHARED ${kopete_videodevice_LIB_SRCS})
 
-target_link_libraries(kopete_videodevice ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_SOLID_LIBS})
+target_link_libraries(kopete_videodevice ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_SOLID_LIBS} -lv4l2)
 
 set_target_properties(kopete_videodevice PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
 install(TARGETS kopete_videodevice ${INSTALL_TARGETS_DEFAULT_ARGS})
diff -up kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.cpp.libv4l kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.cpp
--- kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.cpp.libv4l	2009-01-01 17:27:59.000000000 +0100
+++ kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.cpp	2009-01-26 16:47:23.000000000 +0100
@@ -147,7 +147,7 @@ int VideoDevice::xioctl(int request, voi
 {
 	int r;
 
-	do r = ioctl (descriptor, request, arg);
+	do r = v4l2_ioctl (descriptor, request, arg);
 	while (-1 == r && EINTR == errno);
 	return r;
 }
@@ -185,7 +185,7 @@ int VideoDevice::open()
 		kDebug() << "Device is already open";
 		return EXIT_SUCCESS;
 	}
-	descriptor = ::open (QFile::encodeName(full_filename), O_RDWR, 0);
+	descriptor = ::v4l2_open (QFile::encodeName(full_filename), O_RDWR, 0);
 	if(isOpen())
 	{
 		kDebug() << "File " << full_filename << " was opened successfuly";
@@ -988,7 +988,7 @@ int VideoDevice::getFrame()
 				if (m_currentbuffer.data.isEmpty())
 					return EXIT_FAILURE;
 
-				bytesread = read (descriptor, &m_currentbuffer.data[0], m_currentbuffer.data.size());
+				bytesread = v4l2_read (descriptor, &m_currentbuffer.data[0], m_currentbuffer.data.size());
 				if (-1 == bytesread) // must verify this point with ov511 driver.
 				{
 					kDebug() << "IO_METHOD_READ failed.";
@@ -1434,7 +1434,7 @@ int VideoDevice::stopCapturing()
 						unsigned int loop;
 						for (loop = 0; loop < m_streambuffers; ++loop)
 						{
-							if (munmap(m_rawbuffers[loop].start,m_rawbuffers[loop].length) != 0)
+							if (v4l2_munmap(m_rawbuffers[loop].start,m_rawbuffers[loop].length) != 0)
 							{
 								kDebug() << "unable to munmap.";
 							}
@@ -1462,7 +1462,7 @@ int VideoDevice::close()
 	{
 		kDebug() << " Device is open. Trying to properly shutdown the device.";
 		stopCapturing();
-		int ret = ::close(descriptor);
+		int ret = ::v4l2_close(descriptor);
 		kDebug() << "::close() returns " << ret;
 	}
 	descriptor = -1;
@@ -2749,7 +2749,7 @@ int VideoDevice::initMmap()
 				return errnoReturn ("VIDIOC_QUERYBUF");
 
 			m_rawbuffers[m_streambuffers].length = v4l2buffer.length;
-			m_rawbuffers[m_streambuffers].start = (uchar *) mmap (NULL /* start anywhere */, v4l2buffer.length, PROT_READ | PROT_WRITE /* required */, MAP_SHARED /* recommended */, descriptor, v4l2buffer.m.offset);
+			m_rawbuffers[m_streambuffers].start = (uchar *) v4l2_mmap (NULL /* start anywhere */, v4l2buffer.length, PROT_READ | PROT_WRITE /* required */, MAP_SHARED /* recommended */, descriptor, v4l2buffer.m.offset);
 
 			if (MAP_FAILED == m_rawbuffers[m_streambuffers].start)
 			return errnoReturn ("mmap");
diff -up kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.h.libv4l kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.h
--- kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.h.libv4l	2009-01-06 18:27:30.000000000 +0100
+++ kdenetwork-4.2.0/kopete/libkopete/avdevice/videodevice.h	2009-01-26 16:05:53.000000000 +0100
@@ -31,6 +31,8 @@
 #include <unistd.h>
 #include <signal.h>
 
+#include <libv4l2.h>
+
 #if defined(__linux__) && defined(ENABLE_AV)
 
 #include <asm/types.h>


Index: kdenetwork.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdenetwork/devel/kdenetwork.spec,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -r1.170 -r1.171
--- kdenetwork.spec	26 Jan 2009 14:47:19 -0000	1.170
+++ kdenetwork.spec	4 Feb 2009 16:49:16 -0000	1.171
@@ -2,13 +2,14 @@
 Name: kdenetwork
 Epoch: 7
 Version: 4.2.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPLv2
 Group: Applications/Internet
 URL: http://www.kde.org
 Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.bz2
 Patch0: kdenetwork-4.2.0-handle-enc-message.patch
+Patch1: kdenetwork-4.2.0-libv4l.patch
 # build Kopete against the system libgadu (backported from 4.3)
 # http://websvn.kde.org/?view=rev&revision=909144
 # http://websvn.kde.org/?view=rev&revision=909145
@@ -40,6 +41,7 @@
 BuildRequires: soprano-devel >= 2.0.97
 BuildRequires: speex-devel
 BuildRequires: sqlite-devel
+BuildRequires: libv4l-devel
 # FIXME/TODO: libnxcl-devel
 
 # FIXME/TODO: are there other explicit Requires?
@@ -89,6 +91,7 @@
 %prep
 %setup -q
 %patch0 -p1 -b .handle-enc-message
+%patch1 -p1 -b .libv4l
 %patch100 -p0 -b .system-libgadu
 rm -rf kopete/protocols/gadu/libgadu/
 
@@ -164,6 +167,9 @@
 
 
 %changelog
+* Wed Feb 04 2009 Jaroslav Reznik <jreznik at redhat.com> - 4.2.0-3
+- port kopete video to libv4l (#475623)
+
 * Mon Jan 26 2009 Jaroslav Reznik <jreznik at redhat.com> - 4.2.0-2
 - fix kopete jabber protocol encrypted messages handling (#473412)
 




More information about the scm-commits mailing list