summaryrefslogtreecommitdiffstats
path: root/sys/v4l2
Commit message (Collapse)AuthorAgeFilesLines
* v4l2: Add v4l2sink elementRob Clark2009-08-0414-1824/+3051
| | | | | | | | | | | This also does the following changes: (1) pull the bufferpool code out into gstv4l2bufferpool.c, and make a bit more generic so it can be used both for v4l2src and v4l2sink (2) move some of the device probing/configuration/caps stuff into gstv4l2object.c so it does not have to be duplicated between v4l2src and v4l2sink Fixes bug #590280.
* v4l2: Fix v4l2src on OpenSolarisElaine Xiong2009-07-194-8/+25
| | | | | | | | The v4l2 driver for USB webcams on OpenSolaris does not support select() calls. Detect when select() fails, and skip polling the device afterward, which restores the pre 0.10.14 behaviour on OpenSolaris. Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
* v4l2src: optional support for device probing with gudevFilippo Argiolas2009-07-132-8/+83
| | | | | | Enumerate v4l2 devices using gudev if available. Fixes bug #583640.
* v4l2src: set structs to zero before using them in ioctlsStefan Kost2009-06-251-5/+5
| | | | This fixes valgrind warnings.
* v4l2: open/close the device in READYStefan Kost2009-06-221-9/+39
| | | | | This allows to query the device in READY. Before one need to switch it to PAUSED and that also starts streaming.
* v4l2: cleanup and commentingStefan Kost2009-05-262-48/+17
| | | | | Remove newlines inserted by gst-indent once. Remove unused var from instance struct. Add comments. Add another #define for default property value.
* Fix compiler warningsJames Andrewartha2009-05-151-3/+4
| | | | Fixes bug #582715.
* v4l2src: move duplicated timestamping and buffer metadata code to _create()Stefan Kost2009-03-252-68/+42
| | | | This will include the latency changes also in the mmap case.
* v4l2src: remove win32 ifdefs introduced by commit ↵Stefan Kost2009-03-252-10/+0
| | | | | | cff3f46760eac74c9bbd7a36aca44fedf327424b V4l2src is under sys and does not exists/run under windows anyway.
* v4l2src: log details if we have them, needed for #575391Stefan Kost2009-03-151-2/+2
|
* v4l2src: Prepend to lists and reverse them at the end.Jan Schmidt2009-03-131-3/+7
| | | | | Gratuitous micro-optimisation - prepend to lists and reverse them, rather than appending to them each time.
* v4l2src: fix pads, so that they are subset of template capsStefan Kost2009-03-061-4/+9
| | | | Do not add w=0 | h=0. When we can't get a framerate add fraction range.
* Wait for a frame to become available before capturing itSjoerd Simons2009-03-015-2/+95
| | | | | | | | | | Use GstPoll to wait for the fd of the video device to become readable before trying to capture a frame. This speeds up stopping v4l2src a lot as it no longer has to wait for the next frame, especially when capturing with low framerates or when the video device just never generates a frame (which seems a common issue for uvcvideo devices) Fixes bug #563574.
* Conditionally compile code for YVYUWim Taymans2009-02-231-0/+2
| | | | | Only compile the code for the YVYU format when the format is actually defined. Spotted by tmatth on IRC.
* v4l2src: Make sort_by_frame_size conditionally compiledLevente Farkas2009-02-231-0/+2
| | | | | | | sort_by_frame_size is declared static and only used inside an ifdef, so use the same ifdef to define the function. Fixes #572185 Signed-off-by: David Schleef <ds@schleef.org>
* Add YVYU format to capsWim Taymans2009-02-231-0/+15
| | | | | Add YVYU format to the caps. We don't have anything to handle these caps yet, though.
* Fix comparison of the tuner normsBrijesh Singh2009-01-301-1/+1
| | | | | | | | | | The V4L2 tuner norms that a device supports could be a subset of some norm (e.g. NTSC instead of NTSC_M). The comparison should be done by & instead of ==. See http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec-single/v4l2.html#STANDARD Fixes bug #569820.
* Remove version numbers from a few gst-launch examples.Stefan Kost2009-01-291-1/+1
| | | | The majority of the examples doe not use -0.10 and this will also help us to maintain the docs.
* Update and add documentation for platform specific plugins (sys).Stefan Kost2009-01-291-11/+7
| | | | Link to properties. Correct titles for examples. Fix examples.
* sys/v4l2/gstv4l2src.c: Fix error code (the message string also needs love, ↵Tim-Philipp Müller2009-01-201-1/+1
| | | | | | | | but not today). Original commit message from CVS: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_read): Fix error code (the message string also needs love, but not today).
* sys/v4l2/gstv4l2src.c: Remove () from translateable string, so that it makes ↵Jan Schmidt2009-01-071-1/+1
| | | | | | | | more sense. Original commit message from CVS: * sys/v4l2/gstv4l2src.c: Remove () from translateable string, so that it makes more sense.
* sys/v4l2/gstv4l2src.c: Add support for grayscale v4l2 devices. Fixes bug ↵Sascha Hauer2009-01-051-0/+5
| | | | | | | | | | | #566616. Original commit message from CVS: Patch by: Sascha Hauer <s dot hauer at pengutronix dot de> Luotao Fu <l dot fu at pengutronix dot de> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure), (gst_v4l2_get_caps_info): Add support for grayscale v4l2 devices. Fixes bug #566616.
* sys/v4l2/v4l2src_calls.c: Turns out we don't always get the frame sizes in a ↵Tim-Philipp Müller2008-11-171-10/+20
| | | | | | | | | | | | | | | predefined order from lowest to highest ... Original commit message from CVS: * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format_and_size), (sort_by_frame_size), (gst_v4l2src_probe_caps_for_format): Turns out we don't always get the frame sizes in a predefined order from lowest to highest resolution, so let's just sort the list by frame size once we've queried the possible resolutions rather than assume any particular order. Fixes probed caps for the camera in my HP2133 mini notebook and makes v4l2src default to a decent size.
* sys/v4l2/gstv4l2.c: Give it a primary rank for autovideosrc.Stefan Kost2008-11-141-1/+1
| | | | | | Original commit message from CVS: * sys/v4l2/gstv4l2.c: Give it a primary rank for autovideosrc.
* sys/: Fix some spelling mistakes. Fixes #556802.Fabricio Godoy2008-11-132-2/+2
| | | | | | | | | | Original commit message from CVS: Patch by: Fabricio Godoy <skarllot at gmail dot com> * sys/oss/gstosssink.c: (gst_oss_sink_open): * sys/oss/gstosssrc.c: (gst_oss_src_open): * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_mmap): * sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists): Fix some spelling mistakes. Fixes #556802.
* Optionally use libv4l to access v4l2 devices. Fixes bug #545033.Bastien Nocera2008-11-045-47/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: Patch by: Bastien Nocera <hadess at hadess dot net>, Hans de Goede <jwrdegoede at fedoraproject dot org> * configure.ac: * sys/v4l2/Makefile.am: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_read): * sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities), (gst_v4l2_fill_lists), (gst_v4l2_open), (gst_v4l2_close), (gst_v4l2_get_norm), (gst_v4l2_set_norm), (gst_v4l2_get_frequency), (gst_v4l2_set_frequency), (gst_v4l2_signal_strength), (gst_v4l2_get_attribute), (gst_v4l2_set_attribute), (gst_v4l2_get_input), (gst_v4l2_set_input): * sys/v4l2/v4l2_calls.h: * sys/v4l2/v4l2src_calls.c: (gst_v4l2_buffer_finalize), (gst_v4l2_buffer_new), (gst_v4l2_buffer_pool_finalize), (gst_v4l2_buffer_pool_new), (gst_v4l2_buffer_pool_activate), (gst_v4l2src_fill_format_list), (gst_v4l2src_probe_caps_for_format_and_size), (gst_v4l2src_probe_caps_for_format), (gst_v4l2src_grab_frame), (gst_v4l2src_set_capture), (gst_v4l2src_capture_init), (gst_v4l2src_capture_start), (gst_v4l2src_capture_stop), (gst_v4l2src_get_nearest_size): Optionally use libv4l to access v4l2 devices. Fixes bug #545033.
* Don't install static libs for plugins. Fixes #550851 for -good.Stefan Kost2008-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * ext/aalib/Makefile.am: * ext/annodex/Makefile.am: * ext/cairo/Makefile.am: * ext/dv/Makefile.am: * ext/esd/Makefile.am: * ext/flac/Makefile.am: * ext/gconf/Makefile.am: * ext/gdk_pixbuf/Makefile.am: * ext/hal/Makefile.am: * ext/jpeg/Makefile.am: * ext/ladspa/Makefile.am: * ext/libcaca/Makefile.am: * ext/libmng/Makefile.am: * ext/libpng/Makefile.am: * ext/mikmod/Makefile.am: * ext/pulse/Makefile.am: * ext/raw1394/Makefile.am: * ext/shout2/Makefile.am: * ext/soup/Makefile.am: * ext/speex/Makefile.am: * ext/taglib/Makefile.am: * ext/wavpack/Makefile.am: * gst/alpha/Makefile.am: * gst/apetag/Makefile.am: * gst/audiofx/Makefile.am: * gst/auparse/Makefile.am: * gst/autodetect/Makefile.am: * gst/avi/Makefile.am: * gst/cutter/Makefile.am: * gst/debug/Makefile.am: * gst/effectv/Makefile.am: * gst/equalizer/Makefile.am: * gst/flx/Makefile.am: * gst/goom/Makefile.am: * gst/goom2k1/Makefile.am: * gst/icydemux/Makefile.am: * gst/id3demux/Makefile.am: * gst/interleave/Makefile.am: * gst/law/Makefile.am: * gst/level/Makefile.am: * gst/matroska/Makefile.am: * gst/median/Makefile.am: * gst/monoscope/Makefile.am: * gst/multifile/Makefile.am: * gst/multipart/Makefile.am: * gst/oldcore/Makefile.am: * gst/qtdemux/Makefile.am: * gst/replaygain/Makefile.am: * gst/rtp/Makefile.am: * gst/rtsp/Makefile.am: * gst/smpte/Makefile.am: * gst/spectrum/Makefile.am: * gst/udp/Makefile.am: * gst/videobox/Makefile.am: * gst/videocrop/Makefile.am: * gst/videofilter/Makefile.am: * gst/videomixer/Makefile.am: * gst/wavenc/Makefile.am: * gst/wavparse/Makefile.am: * sys/directdraw/Makefile.am: * sys/directsound/Makefile.am: * sys/oss/Makefile.am: * sys/osxaudio/Makefile.am: * sys/osxvideo/Makefile.am: * sys/sunaudio/Makefile.am: * sys/v4l2/Makefile.am: * sys/waveform/Makefile.am: * sys/ximage/Makefile.am: Don't install static libs for plugins. Fixes #550851 for -good.
* sys/v4l2/v4l2src_calls.c: Guard more uncommon formats with ifdefs so that we ↵Wim Taymans2008-10-311-0/+8
| | | | | | | | | can compile on older versions. Original commit message from CVS: * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_format_get_rank): Guard more uncommon formats with ifdefs so that we can compile on older versions.
* sys/v4l2/gstv4l2object.h: Getting the Class from an instance is not just a ↵Wim Taymans2008-10-031-3/+3
| | | | | | | | | | matter of casting it to the class struct b... Original commit message from CVS: * sys/v4l2/gstv4l2object.h: Getting the Class from an instance is not just a matter of casting it to the class struct but it involves calling G_OBJECT_GET_CLASS on the instance. Fixes #549784.
* sys/v4l2/: Fix memory leaks. Small code cleanups : No need for empty ↵Stefan Kost2008-08-265-16/+29
| | | | | | | | | | | | | _init(). No need to memset instance structures. ... Original commit message from CVS: * sys/v4l2/gstv4l2object.c: * sys/v4l2/gstv4l2src.c: * sys/v4l2/gstv4l2src.h: * sys/v4l2/v4l2_calls.c: * sys/v4l2/v4l2src_calls.c: Fix memory leaks. Small code cleanups : No need for empty _init(). No need to memset instance structures. Some more FIXME's.
* sys/v4l2/gstv4l2tuner.c: v4l2src doesn't have a property named "norm" so ↵Filippo Argiolas2008-08-231-0/+2
| | | | | | | | | | | don't try to notify about changes to that pr... Original commit message from CVS: Patch by: Filippo Argiolas <filippo dot argiolas at gmail dot com> * sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_set_norm_and_notify): v4l2src doesn't have a property named "norm" so don't try to notify about changes to that property. The "norm" property and related code are commented out currently. Fixes bug #549090.
* sys/v4l2/gstv4l2object.c: Reprobe devices again instead of taking a cached ↵Mike Ruprecht2008-08-231-4/+4
| | | | | | | | | | list as new devices could've been plugged ... Original commit message from CVS: Patch by: Mike Ruprecht <cmaiku at gmail dot com> * sys/v4l2/gstv4l2object.c: (gst_v4l2_class_probe_devices): Reprobe devices again instead of taking a cached list as new devices could've been plugged in. Fixes bug #549062.
* sys/v4l2/gstv4l2src.c: Add S910 and PWC formats with a low priority.Wim Taymans2008-08-212-9/+62
| | | | | | | | | | Original commit message from CVS: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure), (gst_v4l2_get_caps_info): Add S910 and PWC formats with a low priority. * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_format_get_rank), (gst_v4l2src_probe_caps_for_format): Add more debugging.
* sys/v4l2/gstv4l2src.c: Properly set the maximum latency value, in the same ↵Edward Hervey2008-08-132-15/+5
| | | | | | | | | | | way it is done in v4lsrc. Original commit message from CVS: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_query): Properly set the maximum latency value, in the same way it is done in v4lsrc. * sys/v4l2/v4l2src_calls.c: Simplify fraction equality check, no need to use GValues for this.
* sys/v4l2/gstv4l2src.c: Add warning messages stating exactly why the latency ↵Edward Hervey2008-08-122-3/+11
| | | | | | | | | | | | query failed. Original commit message from CVS: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_query): Add warning messages stating exactly why the latency query failed. * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture): In some cases, the negotiated framerate might be the default one which is already set internally. But we still need to mark it down in fps_n and fps_d so that the latency query can happen properly.
* Make sure gettext returns translations in UTF-8 encoding rather than in the ↵Frederic Crozat2008-08-071-0/+1
| | | | | | | | | | | | | | | current locale encoding (#546822). Original commit message from CVS: Patch by: Frederic Crozat <fcrozat@mandriva.org> * ext/esd/gstesd.c: (plugin_init): * ext/flac/gstflac.c: (plugin_init): * ext/shout2/gstshout2.c: (plugin_init): * ext/wavpack/gstwavpack.c: (plugin_init): * sys/oss/gstossaudio.c: (plugin_init): * sys/v4l2/gstv4l2.c: (plugin_init): Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#546822).
* sys/v4l2/v4l2src_calls.c: When outputting a pad template range for the size, ↵Jan Schmidt2008-08-071-1/+2
| | | | | | | | | include a framerate range too, to avoid ... Original commit message from CVS: * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format): When outputting a pad template range for the size, include a framerate range too, to avoid 'not a real subset of template caps' errors.
* sys/v4l2/gstv4l2src.c: Avoid compiler warning by initialising variable to ↵Benoit Fouet2008-07-171-2/+1
| | | | | | | | | NULL (#543259). Original commit message from CVS: Patch by: Benoit Fouet <benoit.fouet purplelabs com> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_negotiate): Avoid compiler warning by initialising variable to NULL (#543259).
* Don't use declarations after statements and variable length arrays.Sebastian Dröge2008-07-082-4/+3
| | | | | | | | | | | | | Original commit message from CVS: * ext/raw1394/gstdv1394src.c: (gst_dv1394src_uri_set_uri): * ext/speex/gstspeexenc.c: (gst_speex_enc_sink_getcaps): * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_set_wp_config): * sys/v4l2/gstv4l2src.c: (gst_v4l2src_fixate): * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format): * tests/examples/equalizer/demo.c: (message_handler): * tests/examples/spectrum/demo-audiotest.c: (message_handler): * tests/examples/spectrum/demo-osssrc.c: (message_handler): Don't use declarations after statements and variable length arrays.
* sys/v4l2/v4l2src_calls.c: Try progressive video if interlaced fails. Fixes ↵Daniel Drake2008-07-071-9/+42
| | | | | | | | | | | bug #541956 and the usage of v4l2src on OLPC. Original commit message from CVS: Patch by: Daniel Drake <dsd at gentoo dot org> * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture), (gst_v4l2src_get_nearest_size): Try progressive video if interlaced fails. Fixes bug #541956 and the usage of v4l2src on OLPC.
* sys/v4l2/v4l2_calls.c: Don't include unused gstv4l2xoverlay.h. Fixes build ↵Tim-Philipp Müller2008-06-261-0/+2
| | | | | | | | | in case where X11 headers are not installed. Original commit message from CVS: * sys/v4l2/v4l2_calls.c:: Don't include unused gstv4l2xoverlay.h. Fixes build in case where X11 headers are not installed.
* sys/v4l2/gstv4l2src.c: Improve negotiation a bit more by picking the ↵Sjoerd Simons2008-06-091-5/+40
| | | | | | | | | | | smallest possible resolution that is larger than... Original commit message from CVS: Patch by: Sjoerd Simons <sjoerd at luon dot net> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_negotiate): Improve negotiation a bit more by picking the smallest possible resolution that is larger than the resolution specified in the first caps entry of the peer caps. Fixes bug #536994.
* sys/v4l2/: Fix compilation with newer GIT kernels that deprecatedBastien Nocera2008-06-092-0/+29
| | | | | | | | | Original commit message from CVS: Patch by: Bastien Nocera <hadess at hadess dot net> * sys/v4l2/gstv4l2vidorient.c: * sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists): Fix compilation with newer GIT kernels that deprecated V4L2_CID_HCENTER and V4L2_CID_VCENTER. Fixes bug #536317.
* sys/v4l2/gstv4l2src.c: Provide a custom negotiation function to make sure to ↵Sjoerd Simons2008-06-041-2/+129
| | | | | | | | | | | pick the highest possible framerate and ... Original commit message from CVS: Patch by: Sjoerd Simons <sjoerd at luon dot net> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init), (gst_v4l2src_fixate), (gst_v4l2src_negotiate): Provide a custom negotiation function to make sure to pick the highest possible framerate and resolution. Fixes bug #536646.
* sys/v4l2/v4l2src_calls.c: Fix potential caps leak.William M. Brack2008-05-261-10/+34
| | | | | | | | | Original commit message from CVS: Patch by: William M. Brack <wbrack at mmm dot com dot hk> * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format): Fix potential caps leak. If we can't get the framerate with an ioctl, try to get it with the current norm. Fixes #520092.
* sys/v4l2/v4l2src_calls.c: If we fail to get the frame intervals, simply ↵William M. Brack2008-05-261-9/+12
| | | | | | | | | | | don't touch the framerates on the template ca... Original commit message from CVS: Patch by: William M. Brack <wbrack at mmm dot com dot hk> * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format_and_size): If we fail to get the frame intervals, simply don't touch the framerates on the template caps instead of discarding the format. See #520092.
* sys/v4l2/gstv4l2src.c: Add NV12, NV21 and bayer support. See #520092.William M. Brack2008-05-261-2/+20
| | | | | | | | Original commit message from CVS: Patch by: William M. Brack <wbrack at mmm dot com dot hk> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure), (gst_v4l2_get_caps_info): Add NV12, NV21 and bayer support. See #520092.
* sys/v4l2/gstv4l2src.c: Don't include the gstv4l2xoverlay.h header as the ↵Sebastian Dröge2008-05-171-0/+2
| | | | | | | | | | XOverlay support isn't implemented at all ye... Original commit message from CVS: * sys/v4l2/gstv4l2src.c: Don't include the gstv4l2xoverlay.h header as the XOverlay support isn't implemented at all yet and this requires X headers to be installed. Fixes bug #533264.
* Add device-fd property to make it possible to apps to call ioctl's.Edgard Lima2008-03-262-0/+14
| | | | | Original commit message from CVS: Add device-fd property to make it possible to apps to call ioctl's.
* sys/v4l2/v4l2src_calls.c: Remove superfluous DEBUG macro.Tim-Philipp Müller2008-03-251-7/+2
| | | | | | Original commit message from CVS: * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_set_capture): Remove superfluous DEBUG macro.