gstreamer/sys/v4l2
Andy Wingo cde8c8bdc4 sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) (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.
2007-06-12 11:23:01 +00:00
..
.gitignore add cvsignores 2003-09-11 19:17:02 +00:00
gstv4l2.c sys/v4l2/: Whitespace cleanups, dashify property-names. 2006-09-02 14:45:04 +00:00
gstv4l2colorbalance.c sys/v4l2/Makefile.am: Fix makefile, list libs in stack order. 2006-09-26 13:18:06 +00:00
gstv4l2colorbalance.h sys/v4l2/Makefile.am: Fix makefile, list libs in stack order. 2006-09-26 13:18:06 +00:00
gstv4l2object.c sys/v4l2/gstv4l2object.*: Revert some unintended changes. 2007-05-30 14:57:44 +00:00
gstv4l2object.h sys/v4l2/gstv4l2object.*: Revert some unintended changes. 2007-05-30 14:57:44 +00:00
gstv4l2src.c sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) (gst_v4l2_buffer_class_init, gst_v4l2_buffer_get_type) 2007-06-12 11:23:01 +00:00
gstv4l2src.h sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) (gst_v4l2_buffer_class_init, gst_v4l2_buffer_get_type) 2007-06-12 11:23:01 +00:00
gstv4l2tuner.c sys/v4l2/v4l2src_calls.*: Store the format list in the order that the driver gives it to us. 2007-05-30 14:40:53 +00:00
gstv4l2tuner.h sys/v4l2/gstv4l2tuner.*: Fix _set_channel(): remove useless g_object_notify() for "channel" property that doesn't exi... 2006-10-18 11:04:09 +00:00
gstv4l2vidorient.c docs/plugins/: Add v4l2 plugin to the docs. 2006-09-26 14:17:54 +00:00
gstv4l2vidorient.h sys/v4l2/Makefile.am: Fix makefile, list libs in stack order. 2006-09-26 13:18:06 +00:00
gstv4l2xoverlay.c sys/v4l2/gstv4l2xoverlay.*: Fix build as per the patch in #338818 comment 36. 2006-10-09 07:01:19 +00:00
gstv4l2xoverlay.h sys/v4l2/gstv4l2xoverlay.*: Fix build as per the patch in #338818 comment 36. 2006-10-09 07:01:19 +00:00
Makefile.am Improved comments in ELEMENT_ERROR/WARNING and added "#if 0" to xoverlay code that is still not implemented. 2006-11-01 19:48:26 +00:00
README Fix level for multi-channel case. 2007-02-22 14:35:28 +00:00
v4l2_calls.c Printf format fixes; also add some missing quotes in translated strings. Fixes #416728 and #416727. 2007-03-10 12:30:48 +00:00
v4l2_calls.h sys/v4l2/Makefile.am: Fix makefile, list libs in stack order. 2006-09-26 13:18:06 +00:00
v4l2src_calls.c sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) (gst_v4l2_buffer_class_init, gst_v4l2_buffer_get_type) 2007-06-12 11:23:01 +00:00
v4l2src_calls.h sys/v4l2/v4l2src_calls.c (gst_v4l2_buffer_finalize) (gst_v4l2_buffer_class_init, gst_v4l2_buffer_get_type) 2007-06-12 11:23:01 +00:00

v4l2 plugins
============

The idea is a bit the same as the idea for the v4l1 plugins. We want
one generic v4l2element, and a few child objects (probably only two:
v4l2src and v4l2sink):

                /-------- v4l2src
v4l2element ---=
                \-------- v4l2sink

Both v4l2src and v4l2sink have a uncompressed and a compressed
recording-/playback-mode. Since this is all part of v4l2, the 'client'
of these elements, i.e. an application using v4l2src/v4l2sink, will
hardly notice this. All capsnego stuff is done inside, and the plugin
knows which formats are compressed and which are not.

Please note that the v4l1 and the v4l2 plugins are *not* compatible
concerning properties. Naming has been kept the same where possible,
but in some cases, properties had to be removed or added to make
full use of v4l2.

V4L2 API: http://linux.bytesex.org/v4l2/.
          http://v4l2spec.bytesex.org/
          /usr/include/linux/videodev2.h or

Kernel patches available from
          http://dl.bytesex.org/patches/.

Articles:
          http://lwn.net/Articles/203924/