Commit graph

30 commits

Author SHA1 Message Date
Nicolas Dufresne
cfa5a9d938 v4l2: Remove last include to linux/videodev2.h
We now use and update our internal copy so we no longer have to ifdef
the entire code for features and defines that where added over the
years.

https://bugzilla.gnome.org/show_bug.cgi?id=740905
2014-11-30 17:55:19 -05:00
Nicolas Dufresne
fd13e9e96d Implement V4l2 Allocator
This goal of this allocator is mainly to allow tracking the memory.
Currently, when a buffer memory has been modified, the buffer and it's
memory is disposed and lost until the stream is restarted.
2014-05-08 15:56:36 -04:00
Nicolas Dufresne
cf32d6ec43 v4l2object: Implement gst_v4l2_dup()
This will duplicated the FD from another object and copy over the probed result.

https://bugzilla.gnome.org/show_bug.cgi?id=720568
2014-01-10 17:13:22 -05:00
Michael Olbrich
0fb59275b0 v4l2: add a property for arbitrary v4l2 controls
This makes it possible to set any controls that can be set with
VIDIOC_S_CTRL.
The controls are set when the property is set (if the device is open)
and when the device is opened.

https://bugzilla.gnome.org/show_bug.cgi?id=698837
2013-05-29 20:18:11 +02:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Wim Taymans
9f4cf3be58 v4l2: Move configuration of framerate to _set_format
Move the configuration of the framerate to where we set the other format
parameters.
Remove hack to check if the device is active.
Store streamparm in the device info.
Use some macros to access the current device configuration.
Remove some duplicate fields in src and sink and use the device configuration
instead.
2011-07-13 11:19:28 +02:00
Tim-Philipp Müller
0cd62a10ad v4l2: remove unnecessary linux/videodev.h include
Causes compilation issues with newer kernel headers where the old
v4l interface has been removed.

https://bugzilla.gnome.org/show_bug.cgi?id=643716
2011-03-03 17:37:19 +00:00
Rob Clark
bb07a39c67 v4l2: cleanup get/set input/output
output devices should use get/set output, and in either case we should
not print a warning message if the ioctl fails but the device does not
claim to support the tuner interface
2010-12-29 11:46:41 -06:00
Sebastian Dröge
198604c108 v4l2: Directly use GST_PTR_FORMAT for printing caps with the LOG_CAPS macro 2009-08-04 14:45:31 +02:00
Sebastian Dröge
23dbb15ff5 v4l2: Remove some OMAP specific hacks
They require special build flags and are not useful in general.
2009-08-04 09:32:07 +02:00
Rob Clark
f19cfbda96 v4l2: Add v4l2sink element
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.
2009-08-04 09:16:56 +02:00
Bastien Nocera
a50de826a2 Optionally use libv4l to access v4l2 devices. Fixes bug #545033.
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.
2008-11-04 12:32:48 +00:00
Wim Taymans
27bde5b96e sys/v4l2/Makefile.am: Fix makefile, list libs in stack order.
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.
2006-09-26 13:18:06 +00:00
Stefan Kost
074e7b0d53 sys/v4l2/: Cleanup error messages and unify header comments
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
2006-09-02 14:28:55 +00:00
Edgard Lima
9edc0c0365 Changes proposed by Wingo in bug #338818.
Original commit message from CVS:
Changes proposed by Wingo in bug #338818.
2006-05-11 17:59:59 +00:00
Martin Rubli
59bc24d738 Some changes proposed by wingo in bug #338818 (but not everything yet). 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.
2006-05-05 20:12:59 +00:00
Edgard Lima
2dd8010618 V4L2 ported to 0.10.
Original commit message from CVS:
V4L2 ported to 0.10.
2006-03-11 22:50:03 +00:00
Thomas Vander Stichele
b6540959e6 expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:55:58 +00:00
Ronald S. Bultje
8033e68ba9 sys/: Remove client-side overlay handling, use the X-server v4l plugin for that. Nicer overlay, less code. Also make ...
Original commit message from CVS:
* sys/v4l/Makefile.am:
* sys/v4l/gstv4l.c: (plugin_init):
* sys/v4l/gstv4lelement.c: (gst_v4lelement_get_type),
(gst_v4lelement_init), (gst_v4lelement_dispose),
(gst_v4lelement_change_state):
* sys/v4l/gstv4lelement.h:
* sys/v4l/gstv4lxoverlay.c: (gst_v4l_xoverlay_open),
(gst_v4l_xoverlay_close), (idle_refresh),
(gst_v4l_xoverlay_set_xwindow_id):
* sys/v4l/gstv4lxoverlay.h:
* sys/v4l/v4l-overlay_calls.c:
* sys/v4l/v4l_calls.h:
* sys/v4l2/Makefile.am:
* sys/v4l2/gstv4l2.c: (plugin_init):
* sys/v4l2/gstv4l2element.c: (gst_v4l2element_get_type),
(gst_v4l2element_init), (gst_v4l2element_dispose),
(gst_v4l2element_change_state):
* sys/v4l2/gstv4l2element.h:
* sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_open),
(gst_v4l2_xoverlay_close), (idle_refresh),
(gst_v4l2_xoverlay_set_xwindow_id):
* sys/v4l2/gstv4l2xoverlay.h:
* sys/v4l2/v4l2-overlay_calls.c:
* sys/v4l2/v4l2_calls.h:
Remove client-side overlay handling, use the X-server v4l plugin
for that. Nicer overlay, less code. Also make the plugin
compileable without X (but then without overlay, obviously).
Makes xwindowlistener obsolete, should we remove that?
2004-10-25 08:51:15 +00:00
Johan Dahlin
5acffea623 *.h: Revert indenting
Original commit message from CVS:
* *.h: Revert indenting
2004-03-15 16:32:54 +00:00
Thomas Vander Stichele
5d25c00e4b gst-indent
Original commit message from CVS:
gst-indent
2004-03-14 22:34:33 +00:00
Thomas Vander Stichele
79bc3ebfa1 change NULL to (NULL) for GST_ELEMENT_ERROR
Original commit message from CVS:
change NULL to (NULL) for GST_ELEMENT_ERROR
Make sure errors end with "."
2004-02-02 17:23:33 +00:00
Thomas Vander Stichele
51e5863a97 GST_ELEMENT_ERROR
Original commit message from CVS:
GST_ELEMENT_ERROR
2004-01-29 23:20:45 +00:00
Thomas Vander Stichele
f2504850cd fix includes for distcheck
Original commit message from CVS:
fix includes for distcheck
2004-01-21 12:51:27 +00:00
Thomas Vander Stichele
d9621d1d77 further element_error fixes
Original commit message from CVS:
further element_error fixes
2004-01-19 17:11:28 +00:00
Ronald S. Bultje
862d28a1b7 Some interface implementations for video4linux/video4linux2 plugins: a Tuner interface, with which one can select inp...
Original commit message from CVS:
Some interface implementations for video4linux/video4linux2 plugins:
* a Tuner interface, with which one can select inputs and stations. Audio
work is underway here, but unfinished.
* A Xoverlay interface with which one can do simple overlay. Similar to
the API of the v4l/Xv XFree86 extension. Widget implementation for
GTK-2.0 coming up in the sandbox.
* Colorbalance - for adapting colors (brightness, contrast, etc.) - pretty
basic and maybe somewhat overdesigned. But it'll do for now.

Apart from these interfaces, there's also a loadable library 'xwindowlistener'
that listenes to X for the movement of a window and the overlap of other
windows. This is partly copied from xawtv (and thus partly GPL :(), but it's
needed for the xoverlay interface implementation in the v4l/v4l2 elements.

Lastly, some small changes to remove redundant properties from the v4l/v4l2
elements since these can be done much simpler. Comments appreciated!
2003-10-10 12:47:42 +00:00
Ronald S. Bultje
1a8a2ef6e4 Unification of the way to speak to v4l2 and v4l elements... Also fix a 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
2003-03-02 21:58:52 +00:00
Ronald S. Bultje
bcf4679ab3 v4l plugins: add open/close signals v4l2 plugins: add open/close signals 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
2002-11-13 12:35:56 +00:00
Ronald S. Bultje
b878bc1416 I'm such an idiot - these files should have been in a week ago
Original commit message from CVS:
I'm such an idiot - these files should have been in a week ago
2002-09-28 11:05:39 +00:00
Ronald S. Bultje
9413402bc6 this adds video4linux2 source and element plugins. The division in v4l2* 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.
2002-09-09 07:14:35 +00:00