NetBSD Problem Report #48400

From www@NetBSD.org  Sat Nov 23 04:45:50 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D235BA6245
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 23 Nov 2013 04:45:50 +0000 (UTC)
Message-Id: <20131123044547.B4EBCA6298@mollari.NetBSD.org>
Date: Sat, 23 Nov 2013 04:45:47 +0000 (UTC)
From: nathanialsloss@yahoo.com.au
Reply-To: nathanialsloss@yahoo.com.au
To: gnats-bugs@NetBSD.org
Subject: net/kdenetwork4 - kopete does not work with webcam
X-Send-Pr-Version: www-1.0

>Number:         48400
>Category:       pkg
>Synopsis:       net/kdenetwork4 - kopete does not work with webcam
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    markd
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 23 04:50:00 +0000 2013
>Last-Modified:  Sat Nov 23 07:39:04 +0000 2013
>Originator:     Nat Sloss
>Release:        pkgsrc-2013Q2
>Organization:
>Environment:
NetBSD beast 6.1.1_PATCH NetBSD 6.1.1_PATCH (PCIPAE) #22: Thu Nov 21 23:13:25 EST 2013  build@microrusty:/usr/src/sys/arch/i386/compile/obj/PCIPAE i386
>Description:
Kopete from kdenetwork4 kde4.10.3 does not work with webcam.
>How-To-Repeat:
Start kopete and go to settings -> configure -> video device with a supported webcam plugged in and it wont be recognised as support for v4l2 is not compiled in.
>Fix:
Apply these patches:

Index: pkgsrc/net/kdenetwork4/patches/patch-af
===================================================================
RCS file: /cvsroot/pkgsrc/net/kdenetwork4/patches/Attic/patch-af,v
retrieving revision 1.3
diff -u -r1.3 patch-af
--- pkgsrc/net/kdenetwork4/patches/patch-af	19 Mar 2012 20:12:49 -0000	1.3
+++ pkgsrc/net/kdenetwork4/patches/patch-af	23 Nov 2013 04:35:12 -0000
@@ -1,13 +1,17 @@
 $NetBSD: patch-af,v 1.3 2012/03/19 20:12:49 markd Exp $

---- kopete/libkopete/avdevice/videodevice.h.orig	2011-04-01 10:59:27.000000000 +0000
+--- kopete/libkopete/avdevice/videodevice.h.orig	2013-04-10 17:30:51.000000000 +0000
 +++ kopete/libkopete/avdevice/videodevice.h
-@@ -75,6 +75,13 @@
+@@ -75,6 +75,17 @@
  #endif // HAVE_V4L2

  #endif // __linux__ __FreeBSD__ ENABLE_AV
 +#if (defined(__NetBSD__) || defined(__DragonFly__)) && defined(ENABLE_AV)
 +
++#ifdef __NetBSD__
++#include <sys/videoio.h>
++#endif
++
 +#ifdef HAVE_LIBV4L2
 +#include <libv4l2.h>
 +#endif // HAVE_V4L2
@@ -16,3 +20,39 @@

  #include <qstring.h>
  #include <qfile.h>
+@@ -93,7 +104,7 @@ namespace AV {
+ typedef enum
+ {
+ 	VIDEODEV_DRIVER_NONE
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+         ,
+ 	VIDEODEV_DRIVER_V4L
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+@@ -340,7 +351,7 @@ public:
+ 	QVector<Kopete::AV::VideoInput> m_input;
+ 
+ protected:
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ 	/*!
+ 	    \enum VideoDevice::imgctrl_id Control-IDs used for V4L1- and software-controls
+ 	 */
+@@ -369,7 +380,7 @@ protected:
+ 	int descriptor;
+ 	videodev_driver m_driver;
+ 	QString m_model;
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 	struct v4l2_capability V4L2_capabilities;
+ 	struct v4l2_format fmt;
+@@ -403,7 +414,7 @@ protected:
+ 	virtual int initDevice();
+ 
+ 	void setupControls();
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV) && defined(V4L2_CAP_VIDEO_CAPTURE)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV) && defined(V4L2_CAP_VIDEO_CAPTURE)
+ 	bool getMenuCtrlOptions(quint32 id, quint32 maxindex, QStringList * options);
+ 	void saveV4L2ControlData(struct v4l2_queryctrl qctrl);
+ 	const char *getUnifiedV4L2StdCtrlName(quint32 std_ctrl_id);
--- /dev/null	2013-11-23 15:34:43.000000000 +1100
+++ pkgsrc/net/kdenetwork4/patches/patch-kopete_libkopete_avdevice_videodevice.cpp	2013-11-23 15:32:09.000000000 +1100
@@ -0,0 +1,438 @@
+$NetBSD$
+
+--- kopete/libkopete/avdevice/videodevice.cpp.orig	2013-04-10 17:30:51.000000000 +0000
++++ kopete/libkopete/avdevice/videodevice.cpp
+@@ -58,7 +58,7 @@ VideoDevice::~VideoDevice()
+  */
+ void VideoDevice::setupControls()
+ {
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ 	bool driver_vflip = false;
+ 	bool driver_hflip = false;
+ #endif
+@@ -69,7 +69,7 @@ void VideoDevice::setupControls()
+ 
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			struct v4l2_queryctrl qctrl;
+@@ -147,7 +147,7 @@ void VideoDevice::setupControls()
+ 			break;
+ 	}
+ 
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ 	// Software controls:
+ 	BooleanVideoControl boolCtrl;
+ 	boolCtrl.value_default = 0;
+@@ -172,7 +172,7 @@ void VideoDevice::setupControls()
+ #endif
+ }
+ 
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ /*!
+     \fn bool VideoDevice::getMenuCtrlOptions(quint32 id, quint32 maxindex, QStringList * options)
+@@ -278,7 +278,7 @@ int VideoDevice::xioctl(int request, voi
+ {
+ 	int r;
+ 
+-#ifdef HAVE_LIBV4L2
++#if defined (HAVE_LIBV4L2) && !defined(__NetBSD__)
+ 	do r = v4l2_ioctl (descriptor, request, arg);
+ #else
+ 	do r = ioctl (descriptor, request, arg);
+@@ -380,7 +380,7 @@ int VideoDevice::checkDevice()
+ 		m_videostream=false;
+ 
+ 		m_driver=VIDEODEV_DRIVER_NONE;
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 
+ 		CLEAR(V4L2_capabilities);
+@@ -651,7 +651,7 @@ int VideoDevice::initDevice()
+ 	m_io_method = IO_METHOD_NONE;
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			if(V4L2_capabilities.capabilities & V4L2_CAP_READWRITE)
+@@ -699,7 +699,7 @@ int VideoDevice::initDevice()
+ 	}
+ 
+ // Select video input, video standard and tune here.
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 	struct v4l2_cropcap cropcap;
+ 	struct v4l2_crop crop;
+@@ -827,7 +827,7 @@ kDebug() << "setSize(" << newwidth << ",
+ // Change resolution for the video device
+ 		switch(m_driver)
+ 		{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 			case VIDEODEV_DRIVER_V4L2:
+ //				CLEAR (fmt);
+@@ -944,7 +944,7 @@ pixel_format VideoDevice::setPixelFormat
+ // Change the pixel format for the video device
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ //			CLEAR (fmt);
+@@ -1039,7 +1039,7 @@ int VideoDevice::selectInput(int newinpu
+ 	{
+ 		switch (m_driver)
+ 		{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 			case VIDEODEV_DRIVER_V4L2:
+ 				if (-1 == ioctl (descriptor, VIDIOC_S_INPUT, &newinput))
+@@ -1092,7 +1092,7 @@ int VideoDevice::startCapturing()
+ 			case IO_METHOD_READ: // Nothing to do
+ 				break;
+ 			case IO_METHOD_MMAP:
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 				{
+ 					unsigned int loop;
+@@ -1114,7 +1114,7 @@ int VideoDevice::startCapturing()
+ #endif
+ 				break;
+ 			case IO_METHOD_USERPTR:
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 				{
+ 					unsigned int loop;
+@@ -1152,7 +1152,7 @@ int VideoDevice::getFrame()
+     /// @todo implement me
+ 	ssize_t bytesread;
+ 
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 	struct v4l2_buffer v4l2buffer;
+ #endif
+@@ -1191,7 +1191,7 @@ int VideoDevice::getFrame()
+ 				}
+ 				break;
+ 			case IO_METHOD_MMAP:
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 				CLEAR (v4l2buffer);
+ 				v4l2buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+@@ -1206,6 +1206,12 @@ int VideoDevice::getFrame()
+ 					else
+ 						return errnoReturn ("VIDIOC_DQBUF");
+ 				}
++				if (v4l2buffer.bytesused == 0) {
++					if (v4l2buffer.m.userptr)
++						xioctl (VIDIOC_QBUF, &v4l2buffer);
++					return EXIT_FAILURE;
++				}
++
+ /*				if (v4l2buffer.index < m_streambuffers)
+ 					return EXIT_FAILURE;*/ //it was an assert()
+ // kDebug() << "m_rawbuffers[" << v4l2buffer.index << "].start: " << (void *)m_rawbuffers[v4l2buffer.index].start << "   Size: " << m_currentbuffer.data.size();
+@@ -1227,7 +1233,7 @@ int VideoDevice::getFrame()
+ #endif
+ 				break;
+ 			case IO_METHOD_USERPTR:
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 				{
+ 					unsigned int i;
+@@ -1740,7 +1746,7 @@ int VideoDevice::getControlValue(quint32
+ 	if (!isOpen())
+ 		return EXIT_FAILURE;
+ 
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ 	if (ctrl_id == IMGCTRL_ID_SOFT_AUTOBRIGHTNESSCONTRASTCORR)
+ 	{
+ 		if (m_current_input < m_input.size() )
+@@ -1789,7 +1795,7 @@ int VideoDevice::getControlValue(quint32
+ 
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			{
+@@ -1882,7 +1888,7 @@ int VideoDevice::setControlValue(quint32
+ 	if (!isOpen())
+ 		return EXIT_FAILURE;
+ 
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ 	if (ctrl_id == IMGCTRL_ID_SOFT_AUTOBRIGHTNESSCONTRASTCORR)
+ 	{
+ 		if (m_current_input < m_input.size() )
+@@ -1927,7 +1933,7 @@ int VideoDevice::setControlValue(quint32
+ 
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			{
+@@ -2032,7 +2038,7 @@ pixel_format VideoDevice::pixelFormatFor
+ {
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			switch(palette)
+@@ -2069,14 +2075,20 @@ pixel_format VideoDevice::pixelFormatFor
+ 
+ // Reserved formats
+ 				case V4L2_PIX_FMT_DV		: return PIXELFORMAT_DV;	break;
++#if defined( V4L2_PIX_FMT_ET61X251 )
+ 				case V4L2_PIX_FMT_ET61X251	: return PIXELFORMAT_ET61X251;	break;
++#endif
+ 				case V4L2_PIX_FMT_HI240		: return PIXELFORMAT_HI240;	break;
+ #if defined( V4L2_PIX_FMT_HM12 )
+ 				case V4L2_PIX_FMT_HM12		: return PIXELFORMAT_HM12;	break;
+ #endif
+ 				case V4L2_PIX_FMT_MJPEG		: return PIXELFORMAT_MJPEG;	break;
++#if defined( V4L2_PIX_FMT_PW1C )
+ 				case V4L2_PIX_FMT_PWC1		: return PIXELFORMAT_PWC1;	break;
++#endif
++#if defined( V4L2_PIX_FMT_PW2C )
+ 				case V4L2_PIX_FMT_PWC2		: return PIXELFORMAT_PWC2;	break;
++#endif
+ 				case V4L2_PIX_FMT_SN9C10X	: return PIXELFORMAT_SN9C10X;	break;
+ 				case V4L2_PIX_FMT_WNVA		: return PIXELFORMAT_WNVA;	break;
+ 				case V4L2_PIX_FMT_YYUV		: return PIXELFORMAT_YYUV;	break;
+@@ -2114,7 +2126,7 @@ int VideoDevice::pixelFormatCode(pixel_f
+ {
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			switch(pixelformat)
+@@ -2151,14 +2163,20 @@ int VideoDevice::pixelFormatCode(pixel_f
+ 
+ // Reserved formats
+ 				case PIXELFORMAT_DV	: return V4L2_PIX_FMT_DV;	break;
++#if defined( V42L_PIX_FMT_ET61X251 )
+ 				case PIXELFORMAT_ET61X251:return V4L2_PIX_FMT_ET61X251;break;
++#endif
+ 				case PIXELFORMAT_HI240	: return V4L2_PIX_FMT_HI240;	break;
+ #if defined( V4L2_PIX_FMT_HM12 )
+ 				case PIXELFORMAT_HM12	: return V4L2_PIX_FMT_HM12;	break;
+ #endif
+ 				case PIXELFORMAT_MJPEG	: return V4L2_PIX_FMT_MJPEG;	break;
++#if defined( V42L_PIX_FMT_PWC1 )
+ 				case PIXELFORMAT_PWC1	: return V4L2_PIX_FMT_PWC1;	break;
++#endif
++#if defined( V42L_PIX_FMT_PWC2 )
+ 				case PIXELFORMAT_PWC2	: return V4L2_PIX_FMT_PWC2;	break;
++#endif
+ 				case PIXELFORMAT_SN9C10X: return V4L2_PIX_FMT_SN9C10X;	break;
+ 				case PIXELFORMAT_WNVA	: return V4L2_PIX_FMT_WNVA;	break;
+ 				case PIXELFORMAT_YYUV	: return V4L2_PIX_FMT_YYUV;	break;
+@@ -2322,7 +2340,7 @@ QString VideoDevice::pixelFormatName(int
+ 	returnvalue = "None";
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			switch(pixelformat)
+@@ -2359,14 +2377,20 @@ QString VideoDevice::pixelFormatName(int
+ 
+ // Reserved formats
+ 				case V4L2_PIX_FMT_DV		: returnvalue = pixelFormatName(PIXELFORMAT_DV);	break;
++#if defined( V42L_PIX_FMT_ET61X251 )
+ 				case V4L2_PIX_FMT_ET61X251	: returnvalue = pixelFormatName(PIXELFORMAT_ET61X251);	break;
++#endif
+ 				case V4L2_PIX_FMT_HI240		: returnvalue = pixelFormatName(PIXELFORMAT_HI240);	break;
+ #if defined( V4L2_PIX_FMT_HM12 )
+ 				case V4L2_PIX_FMT_HM12		: returnvalue = pixelFormatName(PIXELFORMAT_HM12);	break;
+ #endif
+ 				case V4L2_PIX_FMT_MJPEG		: returnvalue = pixelFormatName(PIXELFORMAT_MJPEG);	break;
++#if defined( V42L_PIX_FMT_PWC1 )
+ 				case V4L2_PIX_FMT_PWC1		: returnvalue = pixelFormatName(PIXELFORMAT_PWC1);	break;
++#endif
++#if defined( V42L_PIX_FMT_PWC2 )
+ 				case V4L2_PIX_FMT_PWC2		: returnvalue = pixelFormatName(PIXELFORMAT_PWC2);	break;
++#endif
+ 				case V4L2_PIX_FMT_SN9C10X	: returnvalue = pixelFormatName(PIXELFORMAT_SN9C10X);	break;
+ 				case V4L2_PIX_FMT_WNVA		: returnvalue = pixelFormatName(PIXELFORMAT_WNVA);	break;
+ 				case V4L2_PIX_FMT_YYUV		: returnvalue = pixelFormatName(PIXELFORMAT_YYUV);	break;
+@@ -2404,7 +2428,7 @@ int VideoDevice::detectPixelFormats()
+ 			int err = 0;
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			struct v4l2_fmtdesc fmtdesc;
+@@ -2482,7 +2506,7 @@ __u64 VideoDevice::signalStandardCode(si
+ {
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			switch(standard)
+@@ -2503,8 +2527,12 @@ __u64 VideoDevice::signalStandardCode(si
+ 
+ 				case STANDARD_NTSC_M	: return V4L2_STD_NTSC_M;	break;
+ 				case STANDARD_NTSC_M_JP	: return V4L2_STD_NTSC_M_JP;	break;
++#if defined( V4L2_STD_NTSC_443 )
+ 				case STANDARD_NTSC_443	: return V4L2_STD_NTSC_443;	break;
++#endif
++#if defined( V4L2_STD_NTSC_M_KR )
+ 				case STANDARD_NTSC_M_KR	: return V4L2_STD_NTSC_M_KR;	break;
++#endif
+ 
+ 				case STANDARD_SECAM_B	: return V4L2_STD_SECAM_B;	break;
+ 				case STANDARD_SECAM_D	: return V4L2_STD_SECAM_D;	break;
+@@ -2513,7 +2541,9 @@ __u64 VideoDevice::signalStandardCode(si
+ 				case STANDARD_SECAM_K	: return V4L2_STD_SECAM_K;	break;
+ 				case STANDARD_SECAM_K1	: return V4L2_STD_SECAM_K1;	break;
+ 				case STANDARD_SECAM_L	: return V4L2_STD_SECAM_L;	break;
++#if defined( V4L2_STD_SECAM_LC )
+ 				case STANDARD_SECAM_LC	: return V4L2_STD_SECAM_LC;	break;
++#endif
+ 
+ 				case STANDARD_ATSC_8_VSB: return V4L2_STD_ATSC_8_VSB;	break;
+ 				case STANDARD_ATSC_16_VSB:return V4L2_STD_ATSC_16_VSB;	break;
+@@ -2522,17 +2552,29 @@ __u64 VideoDevice::signalStandardCode(si
+ 				case STANDARD_PAL_DK	: return V4L2_STD_PAL_DK;	break;
+ 				case STANDARD_PAL	: return V4L2_STD_PAL;		break;
+ 				case STANDARD_NTSC	: return V4L2_STD_NTSC;		break;
++#if defined( V4L2_STD_SECAM_DK )
+ 				case STANDARD_SECAM_DK	: return V4L2_STD_SECAM_DK;	break;
++#endif
+ 				case STANDARD_SECAM	: return V4L2_STD_SECAM;	break;
+ 
++#if defined( V4L2_STD_MN )
+ 				case STANDARD_MN	: return V4L2_STD_MN;		break;
++#endif
++#if defined( V4L2_STD_B )
+ 				case STANDARD_B		: return V4L2_STD_B;		break;
++#endif
++#if defined( V4L2_STD_GH )
+ 				case STANDARD_GH	: return V4L2_STD_GH;		break;
++#endif
++#if defined( V4L2_STD_DK )
+ 				case STANDARD_DK	: return V4L2_STD_DK;		break;
++#endif
+ 
+ 				case STANDARD_525_60	: return V4L2_STD_525_60;	break;
+ 				case STANDARD_625_50	: return V4L2_STD_625_50;	break;
++#if defined( V4L2_STD_ASTC )
+ 				case STANDARD_ATSC	: return V4L2_STD_ATSC;		break;
++#endif
+ 
+ 				case STANDARD_UNKNOWN	: return V4L2_STD_UNKNOWN;	break;
+ 				case STANDARD_ALL	: return V4L2_STD_ALL;		break;
+@@ -2668,7 +2710,7 @@ QString VideoDevice::signalStandardName(
+ 	returnvalue = "None";
+ 	switch(m_driver)
+ 	{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 		case VIDEODEV_DRIVER_V4L2:
+ 			switch(standard)
+@@ -2687,8 +2729,12 @@ QString VideoDevice::signalStandardName(
+ 				case V4L2_STD_PAL_60	: returnvalue = signalStandardName(STANDARD_PAL_60);	break;
+ 				case V4L2_STD_NTSC_M	: returnvalue = signalStandardName(STANDARD_NTSC_M);	break;
+ 				case V4L2_STD_NTSC_M_JP	: returnvalue = signalStandardName(STANDARD_NTSC_M_JP);	break;
++#if defined( V4L2_STD_NTSC_443 )
+ 				case V4L2_STD_NTSC_443	: returnvalue = signalStandardName(STANDARD_NTSC_443);	break; // Commented out because my videodev2.h header seems to not include this standard in struct __u64 v4l2_std_id
++#endif
++#if defined( V4L2_STD_NTSC_M_KR )
+ 				case V4L2_STD_NTSC_M_KR	: returnvalue = signalStandardName(STANDARD_NTSC_M_KR);	break; // Commented out because my videodev2.h header seems to not include this standard in struct __u64 v4l2_std_id
++#endif
+ 				case V4L2_STD_SECAM_B	: returnvalue = signalStandardName(STANDARD_SECAM_B);	break;
+ 				case V4L2_STD_SECAM_D	: returnvalue = signalStandardName(STANDARD_SECAM_D);	break;
+ 				case V4L2_STD_SECAM_G	: returnvalue = signalStandardName(STANDARD_SECAM_G);	break;
+@@ -2696,7 +2742,9 @@ QString VideoDevice::signalStandardName(
+ 				case V4L2_STD_SECAM_K	: returnvalue = signalStandardName(STANDARD_SECAM_K);	break;
+ 				case V4L2_STD_SECAM_K1	: returnvalue = signalStandardName(STANDARD_SECAM_K1);	break;
+ 				case V4L2_STD_SECAM_L	: returnvalue = signalStandardName(STANDARD_SECAM_L);	break;
++#if defined( V4L2_STD_SECAM_LC )
+ 				case V4L2_STD_SECAM_LC	: returnvalue = signalStandardName(STANDARD_SECAM_LC);	break;
++#endif
+ 
+ 				case V4L2_STD_ATSC_8_VSB: returnvalue = signalStandardName(STANDARD_ATSC_8_VSB);break;
+ 				case V4L2_STD_ATSC_16_VSB:returnvalue = signalStandardName(STANDARD_ATSC_16_VSB);break;
+@@ -2705,17 +2753,29 @@ QString VideoDevice::signalStandardName(
+ 				case V4L2_STD_PAL_DK	: returnvalue = signalStandardName(STANDARD_PAL_DK);	break;
+ 				case V4L2_STD_PAL	: returnvalue = signalStandardName(STANDARD_PAL);	break;
+ 				case V4L2_STD_NTSC	: returnvalue = signalStandardName(STANDARD_NTSC);	break;
++#if defined( V4L2_STD_SECAM_DK )
+ 				case V4L2_STD_SECAM_DK	: returnvalue = signalStandardName(STANDARD_SECAM_DK);	break;
++#endif
+ 				case V4L2_STD_SECAM	: returnvalue = signalStandardName(STANDARD_SECAM);	break;
+ 
++#if defined( V4L2_STD_MN )
+ 				case V4L2_STD_MN	: returnvalue = signalStandardName(STANDARD_MN);	break;
++#endif
++#if defined( V4L2_STD_B )
+ 				case V4L2_STD_B		: returnvalue = signalStandardName(STANDARD_B);		break;
++#endif
++#if defined( V4L2_STD_GH )
+ 				case V4L2_STD_GH	: returnvalue = signalStandardName(STANDARD_GH);	break;
++#endif
++#if defined( V4L2_STD_DK )
+ 				case V4L2_STD_DK	: returnvalue = signalStandardName(STANDARD_DK);	break;
++#endif
+ 
+ 				case V4L2_STD_525_60	: returnvalue = signalStandardName(STANDARD_525_60);	break;
+ 				case V4L2_STD_625_50	: returnvalue = signalStandardName(STANDARD_625_50);	break;
++#if defined( V4L2_STD_ASTC )
+ 				case V4L2_STD_ATSC	: returnvalue = signalStandardName(STANDARD_ATSC);	break;
++#endif
+ 
+ 				case V4L2_STD_UNKNOWN	: returnvalue = signalStandardName(STANDARD_UNKNOWN);	break;
+ 				case V4L2_STD_ALL	: returnvalue = signalStandardName(STANDARD_ALL);	break;
+@@ -2756,7 +2816,7 @@ int VideoDevice::detectSignalStandards()
+ 	{
+ 	switch(m_driver)
+ 		{
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)
+ #ifdef V4L2_CAP_VIDEO_CAPTURE
+ 			case VIDEODEV_DRIVER_V4L2:
+ 
+@@ -3028,7 +3088,7 @@ QString VideoDevice::udi() const
+ }
+ 
+ 
+-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(ENABLE_AV)  && defined(V4L2_CAP_VIDEO_CAPTURE)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(ENABLE_AV)  && defined(V4L2_CAP_VIDEO_CAPTURE)
+ /*!
+     \fn const char * VideoDevice::getUnifiedV4L2StdCtrlName(quint32 std_ctrl_id)
+     \param std_ctrl_id ID of the V4L2 standard video control


Regards,

Nat.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->markd
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sat, 23 Nov 2013 07:39:04 +0000
Responsible-Changed-Why:
Over to maintainer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.