Index: devel/ptlib26/Makefile =================================================================== RCS file: /home/pcvs/ports/devel/ptlib26/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- devel/ptlib26/Makefile 13 Nov 2009 14:02:41 -0000 1.10 +++ devel/ptlib26/Makefile 27 Jan 2010 23:28:29 -0000 @@ -7,7 +7,7 @@ PORTNAME= ptlib PORTVERSION= 2.6.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/ptlib/2.6 @@ -65,9 +65,12 @@ .endif .if defined(WITH_V4L) -CONFIGURE_ARGS+=--enable-v4l +CONFIGURE_ARGS+=--enable-v4l --enable-v4l2 +CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include ${CPPFLAGS}" \ + LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}" PLIST_SUB+= V4L="" BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat +LIB_DEPENDS+= v4l1.0:${PORTSDIR}/multimedia/libv4l WITH_VIDEO=1 .else CONFIGURE_ARGS+=--disable-v4l Index: devel/ptlib26/pkg-plist =================================================================== RCS file: /home/pcvs/ports/devel/ptlib26/pkg-plist,v retrieving revision 1.8 diff -u -r1.8 pkg-plist --- devel/ptlib26/pkg-plist 20 Oct 2009 06:25:37 -0000 1.8 +++ devel/ptlib26/pkg-plist 27 Jan 2010 23:28:30 -0000 @@ -163,6 +163,7 @@ lib/ptlib-%%PORTVERSION%%/devices/sound/oss_pwplugin.so %%BSDVIDEO%%lib/ptlib-%%PORTVERSION%%/devices/videoinput/bsdvideo_pwplugin.so %%V4L%%lib/ptlib-%%PORTVERSION%%/devices/videoinput/v4l_pwplugin.so +%%V4L%%lib/ptlib-%%PORTVERSION%%/devices/videoinput/v4l2_pwplugin.so libdata/pkgconfig/ptlib.pc %%DATADIR%%/make/common.mak %%DATADIR%%/make/lib.mak Index: devel/ptlib26/files/patch-plugins_configure =================================================================== RCS file: /home/pcvs/ports/devel/ptlib26/files/patch-plugins_configure,v retrieving revision 1.1 diff -u -r1.1 patch-plugins_configure --- devel/ptlib26/files/patch-plugins_configure 23 Feb 2009 18:53:25 -0000 1.1 +++ devel/ptlib26/files/patch-plugins_configure 27 Jan 2010 23:28:30 -0000 @@ -1,6 +1,6 @@ ---- plugins/configure.orig 2008-09-15 16:26:48.000000000 +0800 -+++ plugins/configure 2009-02-23 20:09:39.000000000 +0800 -@@ -4993,6 +4993,268 @@ fi +--- plugins/configure.orig 2009-09-20 20:25:31.000000000 -0400 ++++ plugins/configure 2010-01-27 16:45:51.000000000 -0500 +@@ -4994,6 +4994,268 @@ if test "${enable_bsdvideo}z" = "yesz" ; then @@ -269,7 +269,7 @@ if test "${ac_cv_header_machine_ioctl_meteor_h+set}" = set; then { echo "$as_me:$LINENO: checking for machine/ioctl_meteor.h" >&5 echo $ECHO_N "checking for machine/ioctl_meteor.h... $ECHO_C" >&6; } -@@ -5123,18 +5385,18 @@ if test $ac_cv_header_machine_ioctl_mete +@@ -5124,18 +5386,18 @@ fi @@ -296,7 +296,7 @@ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -5142,7 +5404,7 @@ cat confdefs.h >>conftest.$ac_ext +@@ -5143,7 +5405,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @@ -305,7 +305,7 @@ _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" -@@ -5174,15 +5436,15 @@ rm -f core conftest.err conftest.$ac_obj +@@ -5175,15 +5437,15 @@ echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? @@ -324,7 +324,7 @@ _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in -@@ -5215,43 +5477,44 @@ echo "${ECHO_T}$ac_header_preproc" >&6; +@@ -5216,43 +5478,44 @@ # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) @@ -393,3 +393,12 @@ if test "${ac_cv_header_dev_ic_bt8xx_h+set}" = set; then { echo "$as_me:$LINENO: checking for dev/ic/bt8xx.h" >&5 +@@ -6161,6 +6424,8 @@ + + ac_config_files="$ac_config_files Makefile" + ++ac_config_files="$ac_config_files vidinput_v4l/Makefile" ++ + ac_config_files="$ac_config_files vidinput_v4l2/Makefile" + + ac_config_files="$ac_config_files vidinput_dc/Makefile" Index: devel/ptlib26/files/patch-plugins_sound_oss_sound_oss.cxx =================================================================== RCS file: devel/ptlib26/files/patch-plugins_sound_oss_sound_oss.cxx diff -N devel/ptlib26/files/patch-plugins_sound_oss_sound_oss.cxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/ptlib26/files/patch-plugins_sound_oss_sound_oss.cxx 27 Jan 2010 23:28:30 -0000 @@ -0,0 +1,17 @@ +--- plugins/sound_oss/sound_oss.cxx.orig 2009-09-20 20:25:31.000000000 -0400 ++++ plugins/sound_oss/sound_oss.cxx 2010-01-27 16:15:09.000000000 -0500 +@@ -175,11 +175,11 @@ + if (dsp.GetAt(cardnum+1) == NULL) { + #if defined (P_FREEBSD) + // in FreeBSD the file name should be used via the devfs(5) and +- // is just "/dev/dsp0" and devfs(5) takes care of virtual channels, +- // like /dev/dsp0.0 /dev/dsp0.1 ... ++ // is just "/dev/dspN" and devfs(5) takes care of virtual channels, ++ // like /dev/dspN.0 /dev/dspN.1 ... + // everything else would conflict with other KDE apps using the + // audio +- devname = devdir + "dsp0"; ++ devname = devdir + "dsp" + PString(cardnum); + PTRACE(1, "OSS\tCollectSoundDevices FreeBSD devname set to devfs(5) name:" << devname ); + #endif /* defined (P_FREEBSD) */ + dsp.SetAt(cardnum+1, devname); Index: devel/ptlib26/files/patch-plugins_vidinput_v4l2_vidinput_v4l2.cxx =================================================================== RCS file: devel/ptlib26/files/patch-plugins_vidinput_v4l2_vidinput_v4l2.cxx diff -N devel/ptlib26/files/patch-plugins_vidinput_v4l2_vidinput_v4l2.cxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/ptlib26/files/patch-plugins_vidinput_v4l2_vidinput_v4l2.cxx 27 Jan 2010 23:28:30 -0000 @@ -0,0 +1,122 @@ +--- plugins/vidinput_v4l2/vidinput_v4l2.cxx.orig 2009-09-20 20:25:31.000000000 -0400 ++++ plugins/vidinput_v4l2/vidinput_v4l2.cxx 2010-01-27 14:28:45.000000000 -0500 +@@ -48,6 +48,7 @@ + #include + #else + #define v4l2_fd_open(fd, flags) (fd) ++#define v4l2_open open + #define v4l2_close close + #define v4l2_ioctl ioctl + #define v4l2_read read +@@ -161,7 +162,7 @@ + PString name = GetNames().GetDeviceName(devName); + PTRACE(1,"PVidInDev\tOpen()\tdevName:" << name << " videoFd:" << videoFd); + +- videoFd = ::open((const char *)name, O_RDWR); ++ videoFd = ::v4l2_open((const char *)name, O_RDWR); + if (videoFd < 0) { + PTRACE(1,"PVidInDev\topen failed : " << ::strerror(errno)); + return PFalse; +@@ -977,6 +978,32 @@ + V4L2Names::Update() + { + PTRACE(1,"Detecting V4L2 devices"); ++ PWaitAndSignal m(mutex); ++ inputDeviceNames.RemoveAll (); // flush the previous run ++#if defined(P_FREEBSD) ++ for (int i = 0; i < 10; i++) { ++ PString thisDevice = PString("/dev/video") + PString(i); ++ int videoFd=::v4l2_open((const char *)thisDevice, O_RDONLY | O_NONBLOCK); ++ if ((videoFd > 0) || (errno == EBUSY)) { ++ PBoolean valid = PFalse; ++ struct v4l2_capability videoCaps; ++ memset(&videoCaps,0,sizeof(videoCaps)); ++ if ((errno == EBUSY) || ++ (v4l2_ioctl(videoFd, VIDIOC_QUERYCAP, &videoCaps) >= 0 && ++ (videoCaps.capabilities & V4L2_CAP_VIDEO_CAPTURE))) { ++ PTRACE(1,"PV4L2Plugin\tdetected capture device " << videoCaps.card); ++ valid = PTrue; ++ } ++ else { ++ PTRACE(1,"PV4L2Plugin\t" << thisDevice << "is not deemed valid"); ++ } ++ if (videoFd>0) ++ ::v4l2_close(videoFd); ++ if(valid) ++ inputDeviceNames += thisDevice; ++ } ++ } ++#else + PDirectory procvideo2_4("/proc/video/dev"); + PDirectory procvideo2_6("/sys/class/video4linux"); + PDirectory * procvideo; +@@ -996,8 +1023,6 @@ + kernelVersion=KUNKNOWN; + procvideo=0; + } +- PWaitAndSignal m(mutex); +- inputDeviceNames.RemoveAll (); // flush the previous run + if (procvideo) { + PTRACE(2,"PV4L2Plugin\tdetected device metadata at "<<*procvideo); + if (((kernelVersion==K2_6 && procvideo->Open(PFileInfo::SubDirectory)) || +@@ -1006,7 +1031,7 @@ + entry = procvideo->GetEntryName(); + if ((entry.Left(5) == "video")) { + PString thisDevice = "/dev/" + entry; +- int videoFd=::open((const char *)thisDevice, O_RDONLY | O_NONBLOCK); ++ int videoFd=::v4l2_open((const char *)thisDevice, O_RDONLY | O_NONBLOCK); + if ((videoFd > 0) || (errno == EBUSY)) { + PBoolean valid = PFalse; + struct v4l2_capability videoCaps; +@@ -1021,7 +1046,7 @@ + PTRACE(1,"PV4L2Plugin\t" << thisDevice << "is not deemed valid"); + } + if (videoFd>0) +- ::close(videoFd); ++ ::v4l2_close(videoFd); + if(valid) + inputDeviceNames += thisDevice; + } +@@ -1035,16 +1060,17 @@ + else { + PTRACE(1,"Unable to detect v4l2 directory"); + } ++#endif + if (inputDeviceNames.GetSize() == 0) { + POrdinalToString vid; + ReadDeviceDirectory("/dev/", vid); + + for (PINDEX i = 0; i < vid.GetSize(); i++) { + PINDEX cardnum = vid.GetKeyAt(i); +- int fd = ::open(vid[cardnum], O_RDONLY | O_NONBLOCK); ++ int fd = ::v4l2_open(vid[cardnum], O_RDONLY | O_NONBLOCK); + if ((fd >= 0) || (errno == EBUSY)) { + if (fd >= 0) +- ::close(fd); ++ ::v4l2_close(fd); + inputDeviceNames += vid[cardnum]; + } + } +@@ -1056,7 +1082,7 @@ + { + PString Result; + +- int fd = ::open((const char *)devname, O_RDONLY); ++ int fd = ::v4l2_open((const char *)devname, O_RDONLY); + if(fd < 0) { + return devname; + } +@@ -1064,11 +1090,11 @@ + struct v4l2_capability videocap; + memset(&videocap,0,sizeof(videocap)); + if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &videocap) < 0) { +- ::close(fd); ++ ::v4l2_close(fd); + return devname; + } + +- ::close(fd); ++ ::v4l2_close(fd); + PString ufname((const char*)videocap.card); + + return ufname; Index: devel/ptlib26/files/patch-plugins_vidinput_v4l_Makefile.in =================================================================== RCS file: devel/ptlib26/files/patch-plugins_vidinput_v4l_Makefile.in diff -N devel/ptlib26/files/patch-plugins_vidinput_v4l_Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/ptlib26/files/patch-plugins_vidinput_v4l_Makefile.in 27 Jan 2010 23:28:30 -0000 @@ -0,0 +1,16 @@ +--- plugins/vidinput_v4l/Makefile.in.orig 2010-01-27 16:48:07.000000000 -0500 ++++ plugins/vidinput_v4l/Makefile.in 2010-01-27 17:00:56.000000000 -0500 +@@ -0,0 +1,13 @@ ++HAS_LIBV4L = @HAS_LIBV4L@ ++ ++PLUGIN_NAME = v4l ++PLUGIN_FAMILY = device/videoinput ++PLUGIN_LIBS = ++PLUGIN_SOURCES = vidinput_v4l.cxx ++ ++ifeq (1,$(HAS_LIBV4L)) ++PLUGIN_LIBS = $(LDFLAGS) -lv4l1 ++STDCCFLAGS += -DHAS_LIBV4L ++endif ++ ++include ../../make/plugins.mak Index: devel/ptlib26/files/patch-plugins_vidinput_v4l_vidinput_v4l.cxx =================================================================== RCS file: devel/ptlib26/files/patch-plugins_vidinput_v4l_vidinput_v4l.cxx diff -N devel/ptlib26/files/patch-plugins_vidinput_v4l_vidinput_v4l.cxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/ptlib26/files/patch-plugins_vidinput_v4l_vidinput_v4l.cxx 27 Jan 2010 23:28:30 -0000 @@ -0,0 +1,494 @@ +--- plugins/vidinput_v4l/vidinput_v4l.cxx.orig 2009-09-20 20:25:31.000000000 -0400 ++++ plugins/vidinput_v4l/vidinput_v4l.cxx 2010-01-27 14:11:25.000000000 -0500 +@@ -38,6 +38,17 @@ + + PCREATE_VIDINPUT_PLUGIN(V4L); + ++#ifdef HAS_LIBV4L ++#include ++#else ++#define v4l1_open open ++#define v4l1_close close ++#define v4l1_ioctl ioctl ++#define v4l1_read read ++#define v4l1_mmap mmap ++#define v4l1_munmap munmap ++#endif ++ + /////////////////////////////////////////////////////////////////////////////// + // Linux Video4Linux Driver Hints Tables. + // +@@ -261,27 +272,46 @@ + void + V4LNames::Update() + { +- PDirectory procvideo("/proc/video/dev"); +- PString entry; +- PStringList devlist; + + PWaitAndSignal m(mutex); + inputDeviceNames.RemoveAll (); // flush the previous run ++ ++#if defined(P_FREEBSD) ++ for (int i = 0; i < 10; i++) { ++ PString thisDevice = PString("/dev/video") + PString(i); ++ int videoFd = ::v4l1_open((const char *)thisDevice, O_RDONLY | O_NONBLOCK); ++ ++ if ((videoFd > 0) || (errno == EBUSY)){ ++ PBoolean valid = PFalse; ++ struct video_capability videoCaps; ++ if (v4l1_ioctl(videoFd, VIDIOCGCAP, &videoCaps) >= 0 && (videoCaps.type & VID_TYPE_CAPTURE) != 0) ++ valid = PTrue; ++ if (videoFd >= 0) ++ v4l1_close(videoFd); ++ if (valid) ++ inputDeviceNames += thisDevice; ++ } ++ } ++#else ++ PDirectory procvideo("/proc/video/dev"); ++ PString entry; ++ PStringList devlist; ++ + if (procvideo.Exists()) { + if (procvideo.Open(PFileInfo::RegularFile)) { + do { + entry = procvideo.GetEntryName(); + if ((entry.Left(5) == "video") || (entry.Left(7) == "capture")) { + PString thisDevice = "/dev/video" + entry.Right(1); +- int videoFd = ::open((const char *)thisDevice, O_RDONLY | O_NONBLOCK); ++ int videoFd = ::v4l1_open((const char *)thisDevice, O_RDONLY | O_NONBLOCK); + + if ((videoFd > 0) || (errno == EBUSY)){ + PBoolean valid = PFalse; + struct video_capability videoCaps; +- if (ioctl(videoFd, VIDIOCGCAP, &videoCaps) >= 0 && (videoCaps.type & VID_TYPE_CAPTURE) != 0) ++ if (v4l1_ioctl(videoFd, VIDIOCGCAP, &videoCaps) >= 0 && (videoCaps.type & VID_TYPE_CAPTURE) != 0) + valid = PTrue; + if (videoFd >= 0) +- close(videoFd); ++ v4l1_close(videoFd); + if (valid) + inputDeviceNames += thisDevice; + } +@@ -289,16 +319,17 @@ + } while (procvideo.Next()); + } + } ++#endif + if (inputDeviceNames.GetSize() == 0) { + POrdinalToString vid; + ReadDeviceDirectory("/dev/", vid); + + for (PINDEX i = 0; i < vid.GetSize(); i++) { + PINDEX cardnum = vid.GetKeyAt(i); +- int fd = ::open(vid[cardnum], O_RDONLY | O_NONBLOCK); ++ int fd = ::v4l1_open(vid[cardnum], O_RDONLY | O_NONBLOCK); + if ((fd >= 0) || (errno == EBUSY)) { + if (fd >= 0) +- ::close(fd); ++ ::v4l1_close(fd); + inputDeviceNames += vid[cardnum]; + } + } +@@ -411,18 +442,18 @@ + { + PString Result; + +- int fd = ::open((const char *)devname, O_RDONLY); ++ int fd = ::v4l1_open((const char *)devname, O_RDONLY); + if(fd < 0) { + return devname; + } + + struct video_capability videocap; +- if (::ioctl(fd, VIDIOCGCAP, &videocap) < 0) { +- ::close(fd); ++ if (::v4l1_ioctl(fd, VIDIOCGCAP, &videocap) < 0) { ++ ::v4l1_close(fd); + return devname; + } + +- ::close(fd); ++ ::v4l1_close(fd); + PString ufname(videocap.name); + + return ufname; +@@ -515,7 +546,7 @@ + // check if it is a userfriendly name, and if so, get the real device name + + PString deviceName = GetNames().GetDeviceName(devName); +- videoFd = ::open((const char *)deviceName, O_RDWR); ++ videoFd = ::v4l1_open((const char *)deviceName, O_RDWR); + if (videoFd < 0) { + PTRACE(1,"PVideoInputDevice_V4L::Open failed : "<< ::strerror(errno)); + return PFalse; +@@ -523,14 +554,14 @@ + + // get the device capabilities + if (!RefreshCapabilities()) { +- ::close (videoFd); ++ ::v4l1_close (videoFd); + videoFd = -1; + return PFalse; + } + + if ((videoCapability.type & VID_TYPE_CAPTURE) == 0) { + PTRACE(1,"PVideoInputDevice_V4L:: device capablilities reports cannot capture"); +- ::close (videoFd); ++ ::v4l1_close (videoFd); + videoFd = -1; + return PFalse; + } +@@ -579,7 +610,7 @@ + if (hint_index >= PARRAYSIZE(driver_hints)-1) { + struct video_channel channel; + memset(&channel, 0, sizeof(struct video_channel)); +- if (::ioctl(videoFd, VIDIOCGCHAN, &channel) == 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCGCHAN, &channel) == 0) { + /* Only check if the called doesn't return an error */ + for (tbl = 0; tbl < PARRAYSIZE(bridges_with_640x480_fixed_width); tbl ++) { + if (strcmp(bridges_with_640x480_fixed_width[tbl], channel.name) == 0) { +@@ -609,7 +640,7 @@ + #define VIDIOCQCSCOMPATIBLE _IOWR('v',QC_IOCTLBASE+10,int) /* Set enable workaround for bugs, bitfield */ + + int reg = 2; /* enable double buffering */ +- ::ioctl (videoFd, VIDIOCQCSCOMPATIBLE, ®); ++ ::v4l1_ioctl (videoFd, VIDIOCQCSCOMPATIBLE, ®); + } + + +@@ -620,11 +651,11 @@ + + // Init audio + struct video_audio videoAudio; +- if (::ioctl(videoFd, VIDIOCGAUDIO, &videoAudio) >= 0 && ++ if (::v4l1_ioctl(videoFd, VIDIOCGAUDIO, &videoAudio) >= 0 && + (videoAudio.flags & VIDEO_AUDIO_MUTABLE) != 0) { + videoAudio.flags &= ~VIDEO_AUDIO_MUTE; + videoAudio.mode = VIDEO_SOUND_MONO; +- ::ioctl(videoFd, VIDIOCSAUDIO, &videoAudio); ++ ::v4l1_ioctl(videoFd, VIDIOCSAUDIO, &videoAudio); + } + + return PTrue; +@@ -645,14 +676,14 @@ + + // Mute audio + struct video_audio videoAudio; +- if (::ioctl(videoFd, VIDIOCGAUDIO, &videoAudio) >= 0 && ++ if (::v4l1_ioctl(videoFd, VIDIOCGAUDIO, &videoAudio) >= 0 && + (videoAudio.flags & VIDEO_AUDIO_MUTABLE) != 0) { + videoAudio.flags |= VIDEO_AUDIO_MUTE; +- ::ioctl(videoFd, VIDIOCSAUDIO, &videoAudio); ++ ::v4l1_ioctl(videoFd, VIDIOCSAUDIO, &videoAudio); + } + + ClearMapping(); +- ::close(videoFd); ++ ::v4l1_close(videoFd); + + videoFd = -1; + canMap = -1; +@@ -703,7 +734,7 @@ + + struct video_channel channel; + channel.channel = channelNumber; +- if (::ioctl(videoFd, VIDIOCGCHAN, &channel) < 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCGCHAN, &channel) < 0) { + PTRACE(1,"VideoInputDevice Get Channel info failed : "<< ::strerror(errno)); + return PFalse; + } +@@ -714,7 +745,7 @@ + channel.norm = fmt[newFormat]; + + // set the information +- if (::ioctl(videoFd, VIDIOCSCHAN, &channel) >= 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCSCHAN, &channel) >= 0) { + // format change might affect frame size limits; grab them again + RefreshCapabilities(); + return PTrue; +@@ -754,7 +785,7 @@ + // get channel information (to check if channel is valid) + struct video_channel channel; + channel.channel = channelNumber; +- if (::ioctl(videoFd, VIDIOCGCHAN, &channel) < 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCGCHAN, &channel) < 0) { + PTRACE(1,"VideoInputDevice:: Get info on channel " << channelNumber << " failed : "<< ::strerror(errno)); + return PFalse; + } +@@ -763,7 +794,7 @@ + channel.channel = channelNumber; + + // set the information +- if (::ioctl(videoFd, VIDIOCSCHAN, &channel) < 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCSCHAN, &channel) < 0) { + PTRACE(1,"VideoInputDevice:: Set info on channel " << channelNumber << " failed : "<< ::strerror(errno)); + return PFalse; + } +@@ -792,7 +823,7 @@ + // get channel information (to check if channel is valid) + struct video_channel channel; + channel.channel = channelNumber; +- if (::ioctl(videoFd, VIDIOCGCHAN, &channel) < 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCGCHAN, &channel) < 0) { + PTRACE(1,"VideoInputDevice Get Channel info failed : "<< ::strerror(errno)); + + return PFalse; +@@ -803,7 +834,7 @@ + channel.channel = channelNumber; + + // set the information +- if (::ioctl(videoFd, VIDIOCSCHAN, &channel) < 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCSCHAN, &channel) < 0) { + PTRACE(1,"VideoInputDevice SetChannel failed : "<< ::strerror(errno)); + + return PFalse; +@@ -830,7 +861,7 @@ + + // get current picture information + struct video_picture pictureInfo; +- if (::ioctl(videoFd, VIDIOCGPICT, &pictureInfo) < 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCGPICT, &pictureInfo) < 0) { + PTRACE(1,"PVideoInputDevice_V4L::Get pict info failed : "<< ::strerror(errno)); + return PFalse; + } +@@ -842,7 +873,7 @@ + pictureInfo.depth = 16; + + // set the information +- if (::ioctl(videoFd, VIDIOCSPICT, &pictureInfo) < 0) { ++ if (::v4l1_ioctl(videoFd, VIDIOCSPICT, &pictureInfo) < 0) { + PTRACE(1,"PVideoInputDevice_V4L::Set pict info failed : "<< ::strerror(errno)); + PTRACE(1,"PVideoInputDevice_V4L:: used code of "<