summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2src.h
Commit message (Collapse)AuthorAgeFilesLines
* v4l2src: add a function pointer for get_frame function and optimize a bitStefan Kost2009-09-111-1/+3
| | | | | Use a function-pointer for mmap/read, as this can't change during capture. Also sprinkle a few G_LIKELY/UNLIKELY to improve the error-less code path.
* v4l2: Add v4l2sink elementRob Clark2009-08-041-34/+1
| | | | | | | | | | | 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: cleanup and commentingStefan Kost2009-05-261-4/+5
| | | | | Remove newlines inserted by gst-indent once. Remove unused var from instance struct. Add comments. Add another #define for default property value.
* sys/v4l2/: Fix memory leaks. Small code cleanups : No need for empty ↵Stefan Kost2008-08-261-0/+1
| | | | | | | | | | | | | _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.
* Always copy buffers by default (handle safer with bugged drivers) and added ↵Edgard Lima2007-11-151-0/+3
| | | | | | | a property to make it possible to use mma... Original commit message from CVS: Always copy buffers by default (handle safer with bugged drivers) and added a property to make it possible to use mmap effectively (no copy if possible) when application wants to. Fixes: #480557.
* sys/v4l2/: Implement LATENCY queries in the crudest way possible so I don't ↵Tim-Philipp Müller2007-09-051-0/+2
| | | | | | | | | | | have to use sync=false any longer when te... Original commit message from CVS: * sys/v4l2/gstv4l2src.c: * sys/v4l2/gstv4l2src.h: * sys/v4l2/v4l2src_calls.c: Implement LATENCY queries in the crudest way possible so I don't have to use sync=false any longer when testing with videosinks.
* sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) ↵Andy Wingo2007-06-121-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (gst_v4l2_buffer_class_init, gst_v4l2_buffer_get_type) Original commit message from CVS: 2007-06-12 Andy Wingo <wingo@pobox.com> * sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) (gst_v4l2_buffer_class_init, gst_v4l2_buffer_get_type) (gst_v4l2_buffer_new): Behave more like ximagesink's buffers, with finalization and resuscitation. No longer public. (gst_v4l2_buffer_pool_finalize, gst_v4l2_buffer_pool_init) (gst_v4l2_buffer_pool_class_init, gst_v4l2_buffer_pool_get_type) (gst_v4l2_buffer_pool_new, gst_v4l2_buffer_pool_activate) (gst_v4l2_buffer_pool_destroy): Make the pool follow common miniobject semantics, and be threadsafe. (gst_v4l2src_queue_frame): Remove this function, as we just call the ioctls directly in the two places where we queue buffers. (gst_v4l2src_grab_frame): Return a flowreturn and fill the buffer directly. (gst_v4l2src_capture_init): Use the new buffer_pool_new function to allocate the pool, which also preallocates the GstBuffers. (gst_v4l2src_capture_start): Call buffer_pool_activate instead of queueing the frames directly. * sys/v4l2/gstv4l2src.h (struct _GstV4l2BufferPool): Make this a real MiniObject instead of rolling our own refcounting and finalizing. Give it a lock. (struct _GstV4l2Buffer): Remove one intermediary object, having the buffers hold the struct v4l2_buffer directly. * sys/v4l2/gstv4l2src.c (gst_v4l2src_set_caps): Pass the caps to capture_init so that it can set them on the buffers that it will create. (gst_v4l2src_get_read): For better or for worse, include the timestamping and offsetting code here; really we should be using bufferalloc though. (gst_v4l2src_get_mmap): Just make grab_frame return one of our preallocated, mmap'd buffers.
* sys/v4l2/v4l2src_calls.*: Store the format list in the order that the driver ↵Andy Wingo2007-05-301-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gives it to us. Original commit message from CVS: 2007-05-30 Andy Wingo <wingo@pobox.com> * sys/v4l2/v4l2src_calls.h: * sys/v4l2/v4l2src_calls.c (gst_v4l2src_fill_format_list): Store the format list in the order that the driver gives it to us. (gst_v4l2src_probe_caps_for_format_and_size) (gst_v4l2src_probe_caps_for_format): New functions, fill GstCaps based on the capabilities of the device. (gst_v4l2src_grab_frame): Update for object variable renaming. (gst_v4l2src_set_capture): Update to be strict in its parameters, as in the set_caps below. (gst_v4l2src_capture_init): Update for object variable renaming, and reflow. (gst_v4l2src_capture_start, gst_v4l2src_capture_stop) (gst_v4l2src_capture_deinit): Update for object variable renaming. (gst_v4l2src_update_fps, gst_v4l2src_set_fps) (gst_v4l2src_get_fps): Remove; these functions don't have much meaning outside of an atomic set_caps method. (gst_v4l2src_buffer_new): Don't set buffer duration, it is not known. * sys/v4l2/gstv4l2tuner.c (gst_v4l2_tuner_set_channel): Remove call to update_fps; not sure about this change. (gst_v4l2_tuner_set_norm): Work around the fact that for the moment we don't have an update_fps_func. * sys/v4l2/gstv4l2src.h (struct _GstV4l2Src): Don't put v4l2 structures in the object, just store what we need. Do store the probed caps of the device. Don't store the current frame rate. * sys/v4l2/gstv4l2src.c (gst_v4l2src_init): Remove the update_fps_function, for now. Update for new object variable naming. (gst_v4l2src_set_property, gst_v4l2src_get_property): Update for new object variable naming. (gst_v4l2src_v4l2fourcc_to_structure): Rename from ..._to_caps. (gst_v4l2_structure_to_v4l2fourcc): Rename from ...caps_to_.... (gst_v4l2src_get_caps): Rework to probe the device for supported frame sizes and frame rates. (gst_v4l2src_set_caps): Rework to be strict in the given parameters: if someone asks us to have a certain size and rate, that is what we configure. (gst_v4l2src_get_read): Update for object variable naming. Don't leak buffers on short reads. (gst_v4l2src_get_mmap): Update for object variable naming, and add comments. (gst_v4l2src_create): Update for object variable naming.
* Removed set-undef-fps.Edgard Lima2006-09-271-1/+0
| | | | | Original commit message from CVS: Removed set-undef-fps.
* Some cleanups and comments.Edgard Lima2006-09-271-1/+2
| | | | | Original commit message from CVS: Some cleanups and comments.
* docs/plugins/: Add v4l2 plugin to the docs.Wim Taymans2006-09-261-0/+7
| | | | | | | | | | | | | | Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-bad-plugins-docs.sgml: * docs/plugins/gst-plugins-bad-plugins-sections.txt: Add v4l2 plugin to the docs. * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_read), (gst_v4l2src_get_mmap), (gst_v4l2src_create): * sys/v4l2/gstv4l2src.h: * sys/v4l2/gstv4l2vidorient.c: Fix docs. Remove some more externs.
* sys/v4l2/Makefile.am: Fix makefile, list libs in stack order.Wim Taymans2006-09-261-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * sys/v4l2/Makefile.am: Fix makefile, list libs in stack order. * sys/v4l2/gstv4l2colorbalance.c: * sys/v4l2/gstv4l2colorbalance.h: * sys/v4l2/gstv4l2object.c: (gst_v4l2_device_get_type), (gst_v4l2_object_install_properties_helper): * sys/v4l2/gstv4l2object.h: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_read), (gst_v4l2src_get_mmap), (gst_v4l2src_create): * sys/v4l2/gstv4l2src.h: * sys/v4l2/gstv4l2tuner.h: * sys/v4l2/gstv4l2vidorient.h: * sys/v4l2/gstv4l2xoverlay.h: * sys/v4l2/v4l2_calls.h: * sys/v4l2/v4l2src_calls.h: Fix coding style: - Remove extern from functions. - Fix header indentation. Fix Flags, add defaults for properties. Remove unused enums. Fix TOO_LAZY in error messages.
* The test application and the plgind error messages has been improved.Edgard Lima2006-09-151-1/+1
| | | | | Original commit message from CVS: The test application and the plgind error messages has been improved.
* sys/v4l2/: Whitespace cleanups, dashify property-names.Stefan Kost2006-09-021-5/+5
| | | | | | | | | | | Original commit message from CVS: * sys/v4l2/gstv4l2.c: * sys/v4l2/gstv4l2colorbalance.c: * sys/v4l2/gstv4l2object.c: (gst_v4l2_object_install_properties_helper): * sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init): * sys/v4l2/gstv4l2src.h: Whitespace cleanups, dashify property-names.
* sys/v4l2/: Cleanup error messages and unify header commentsStefan Kost2006-09-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * sys/v4l2/gstv4l2.c: * sys/v4l2/gstv4l2colorbalance.c: * sys/v4l2/gstv4l2colorbalance.h: * sys/v4l2/gstv4l2object.c: * sys/v4l2/gstv4l2object.h: * sys/v4l2/gstv4l2src.c: * sys/v4l2/gstv4l2src.h: * sys/v4l2/gstv4l2tuner.c: * sys/v4l2/gstv4l2tuner.h: * sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_open): * sys/v4l2/gstv4l2xoverlay.h: * sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities), (gst_v4l2_open): * sys/v4l2/v4l2_calls.h: * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_queue_frame), (gst_v4l2src_capture_init): * sys/v4l2/v4l2src_calls.h: Cleanup error messages and unify header comments
* configure.ac: Check for X11Stefan Kost2006-05-181-1/+3
| | | | | | | | | | | | | Original commit message from CVS: * configure.ac: Check for X11 * sys/v4l2/gstv4l2object.c: (gst_v4l2_class_probe_devices): * sys/v4l2/gstv4l2object.h: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_iface_supported): * sys/v4l2/gstv4l2src.h: * sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_open): * sys/v4l2/gstv4l2xoverlay.h: Code cleanups, fix debug macros
* Changes proposed by Wingo in bug #338818.Edgard Lima2006-05-111-4/+8
| | | | | Original commit message from CVS: Changes proposed by Wingo in bug #338818.
* Some changes proposed by wingo in bug #338818 (but not everything yet). ↵Martin Rubli2006-05-051-0/+2
| | | | | | | Patch from Martin Rubli to fix framerate dete... Original commit message from CVS: Some changes proposed by wingo in bug #338818 (but not everything yet). Patch from Martin Rubli to fix framerate detection.
* Just make few things more robust and also some identation.Edgard Lima2006-03-251-25/+22
| | | | | Original commit message from CVS: Just make few things more robust and also some identation.
* V4L2 ported to 0.10.Edgard Lima2006-03-111-59/+66
| | | | | Original commit message from CVS: V4L2 ported to 0.10.
* expand tabsThomas Vander Stichele2005-12-061-46/+46
| | | | | Original commit message from CVS: expand tabs
* sys/v4l2/gstv4l2element.h: Yet Another Hack (tm) for kernel header borkedness.Ronald S. Bultje2004-10-241-1/+1
| | | | | | | | | | | | | | Original commit message from CVS: * sys/v4l2/gstv4l2element.h: Yet Another Hack (tm) for kernel header borkedness. * sys/v4l2/gstv4l2src.c: (gst_v4l2src_init), (gst_v4l2src_v4l2fourcc_to_caps), (gst_v4l2_fourcc_from_structure), (gst_v4l2src_link), (gst_v4l2src_getcaps), (gst_v4l2src_change_state): * sys/v4l2/gstv4l2src.h: * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_capture_init), (gst_v4l2src_capture_start), (gst_v4l2src_capture_stop): Fix caps, keep track of state, work.
* *.h: Revert indentingJohan Dahlin2004-03-151-50/+47
| | | | | Original commit message from CVS: * *.h: Revert indenting
* gst-indentThomas Vander Stichele2004-03-141-47/+50
| | | | | Original commit message from CVS: gst-indent
* sys/v4l2/: add norm, channel and frequency properties.Benjamin Otte2004-01-121-17/+28
| | | | | | | | | | | | | | | | | | | Original commit message from CVS: 2004-01-12 Benjamin Otte <in7y118@public.uni-hamburg.de> * sys/v4l2/gstv4l2element.c: (gst_v4l2element_class_init), (gst_v4l2element_dispose), (gst_v4l2element_set_property), (gst_v4l2element_get_property): * sys/v4l2/v4l2_calls.c: (gst_v4l2_set_defaults), (gst_v4l2_open): add norm, channel and frequency properties. * sys/v4l2/gstv4l2tuner.c: fixes for tuner interface changes * sys/v4l2/gstv4l2element.h: * sys/v4l2/gstv4l2src.c: * sys/v4l2/gstv4l2src.h: * sys/v4l2/v4l2src_calls.c: * sys/v4l2/v4l2src_calls.h: rework v4l2src to work with saa1734 cards and allow mmaped buffers.
* Merge CAPS branchDavid Schleef2003-12-221-3/+0
| | | | | Original commit message from CVS: Merge CAPS branch
* hmm...Ronald S. Bultje2003-11-021-2/+0
| | | | | Original commit message from CVS: hmm...
* Move all the several v4l/v4l2 plugins in one v4l and one v4l2 pluginRonald S. Bultje2003-09-131-0/+2
| | | | | Original commit message from CVS: Move all the several v4l/v4l2 plugins in one v4l and one v4l2 plugin
* Some final fixes for the v4lsrc elements. remove software sync thread (use ↵Ronald S. Bultje2003-05-211-0/+11
| | | | | | | | | | | | | | | | | | | GST_ELEMENT_THREAD_SUGGESTED instead) make... Original commit message from CVS: Some final fixes for the v4lsrc elements. * remove software sync thread (use GST_ELEMENT_THREAD_SUGGESTED instead) * make all src elements threadsafe * fix num_buffer argument setting in v4l2src (VIDIOC_S_PARM) * re-add bufsize (RO) for v4lmjpegsrc * fix the A/V sync calculation in all elements (spvf=GST_SECOND/fps, not GST_SECOND*fps) * probably some more crap.... With all this, it actually works quite well. The TODO files describes the next steps in order to make a full-featured video recorder based on these elements and GStreamer (bottom). Making a simple recorder should be fairly easy now, btw.
* This implements filtered-caps negotiation for all the v4l*src elements, and ↵Ronald S. Bultje2003-05-101-5/+0
| | | | | | | removes the accompanying properties since... Original commit message from CVS: This implements filtered-caps negotiation for all the v4l*src elements, and removes the accompanying properties since they're no longer needed
* Implement element synchronization (#108301)Ronald S. Bultje2003-05-021-1/+24
| | | | | Original commit message from CVS: Implement element synchronization (#108301)
* Unification of the way to speak to v4l2 and v4l elements... Also fix a ↵Ronald S. Bultje2003-03-021-1/+1
| | | | | | | segfautl when doing gst-inspect v4l2src Original commit message from CVS: Unification of the way to speak to v4l2 and v4l elements... Also fix a segfautl when doing gst-inspect v4l2src
* v4l plugins: add open/close signals v4l2 plugins: add open/close signals ↵Ronald S. Bultje2002-11-131-1/+4
| | | | | | | | | | | | | | move source format enumeration from v4l2elem... Original commit message from CVS: v4l plugins: * add open/close signals v4l2 plugins: * add open/close signals * move source format enumeration from v4l2element to v4l2src * adapt to the final v4l2 API in kernel 2.5 (patches for 2.4 on http://bytesex.org/patches) * small tweaks
* this adds video4linux2 source and element plugins. The division in v4l2* ↵Ronald S. Bultje2002-09-091-0/+69
plugins is the same as for v4l1 - i.e. an el... Original commit message from CVS: this adds video4linux2 source and element plugins. The division in v4l2* plugins is the same as for v4l1 - i.e. an element, a src and a sink, but there won't be separate encoding plugins (like v4lmjpegsrc) - all functionality is (thanks to video4linux2) integrated in one plugin: v4l2src. v4l2sink is still to be done, that'll come later.