summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/v4l2src_calls.h
Commit message (Collapse)AuthorAgeFilesLines
* sys/v4l2/v4l2_calls.c: Treat ENOTTY (driver does not implement ioctl) the ↵Jan Schmidt2008-01-311-5/+0
| | | | | | | | | | | | | | | | | same as Original commit message from CVS: * sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists): Treat ENOTTY (driver does not implement ioctl) the same as EINVAL since it implies there are no available standards. * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format), (gst_v4l2src_get_nearest_size): Replace gst_v4l2src_get_size_limits with 2 calls to new function gst_v4l2src_get_nearest_size, and get it to use VIDIOC_S_FMT to probe if the driver does not support VIDIOC_TRY_FMT for whatever reason, and if we aren't yet actively capturing. * sys/v4l2/v4l2src_calls.h: Remove replaced function declaration.
* sys/v4l2/gstv4l2src.c: Use define here.Alexander Eichner2007-07-181-1/+1
| | | | | | | | | | | | | | Original commit message from CVS: Patch by: Alexander Eichner <alexeichi@yahoo.de> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_init): Use define here. * sys/v4l2/gstv4l2tuner.c: (gst_v4l2_tuner_set_frequency_and_notify): Don't touch the property - its still disabled. * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format), (gst_v4l2src_grab_frame), (gst_v4l2src_get_size_limits): * sys/v4l2/v4l2src_calls.h: Improve fallback format negotionation. Fixes #451388
* sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) ↵Andy Wingo2007-06-121-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* sys/v4l2/Makefile.am: Fix makefile, list libs in stack order.Wim Taymans2006-09-261-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* sys/v4l2/: Cleanup error messages and unify header commentsStefan Kost2006-09-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | 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
* Fixed framerate negotiation.Edgard Lima2006-08-291-1/+6
| | | | | Original commit message from CVS: Fixed framerate negotiation.
* Fix set_caps to set width and height to the values the driver is really ↵Edgard Lima2006-08-241-1/+1
| | | | | | | working with. Original commit message from CVS: Fix set_caps to set width and height to the values the driver is really working with.
* Changes proposed by Wingo in bug #338818.Edgard Lima2006-05-111-1/+4
| | | | | 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-1/+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-27/+25
| | | | | Original commit message from CVS: Just make few things more robust and also some identation.
* V4L2 ported to 0.10.Edgard Lima2006-03-111-22/+30
| | | | | Original commit message from CVS: V4L2 ported to 0.10.
* expand tabsThomas Vander Stichele2005-12-061-21/+21
| | | | | Original commit message from CVS: expand tabs
* *.h: Revert indentingJohan Dahlin2004-03-151-18/+23
| | | | | Original commit message from CVS: * *.h: Revert indenting
* gst-indentThomas Vander Stichele2004-03-141-23/+18
| | | | | Original commit message from CVS: gst-indent
* sys/v4l2/: add norm, channel and frequency properties.Benjamin Otte2004-01-121-8/+9
| | | | | | | | | | | | | | | | | | | 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.
* Some final fixes for the v4lsrc elements. remove software sync thread (use ↵Ronald S. Bultje2003-05-211-0/+2
| | | | | | | | | | | | | | | | | | | 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-0/+5
| | | | | | | 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
* Unification of the way to speak to v4l2 and v4l elements... Also fix a ↵Ronald S. Bultje2003-03-021-2/+0
| | | | | | | 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-0/+2
| | | | | | | | | | | | | | 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/+45
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.