Commit graph

652 commits

Author SHA1 Message Date
Wim Taymans
c17aa1565a v4l2: use public api
instead of poking into the private structures of the base class
2012-02-27 09:21:27 +01:00
Wim Taymans
0ab5677107 update for metadata change 2012-02-24 10:26:26 +01:00
Wim Taymans
ca9532ccc5 update for new memory api 2012-02-22 02:10:33 +01:00
Wim Taymans
6623ab258b Merge branch 'master' into 0.11 2012-02-16 14:23:50 +01:00
Gary Ching-Pang Lin
c1c858f273 v4l2src: failure to query some optional controls is not a fatal error
Don't post a (fatal) error message on the bus just because we
failed to query some control. Fixes issue with built-in
Suyin Corp webcam for HP notebook (usbid 064e:e28a) on
OpenSuse 12.1, where querying red/blue balance fails.

https://bugzilla.gnome.org/show_bug.cgi?id=670197
2012-02-16 13:10:47 +00:00
Tuukka Pasanen
ef37bb48bc v4l2src: fix for webcamstudio vloopback
Because vlooback emits 25 - ENOTTY and no EINVAL v4l2src thought it
can't handle this and does not work.

https://bugzilla.gnome.org/show_bug.cgi?id=669455
2012-02-16 12:59:10 +00:00
Wim Taymans
9365f12d6e GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:43:30 +01:00
Sebastian Dröge
0b517ce9fb Merge branch '0.11' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good into 0.11 2012-01-25 12:49:34 +01:00
Sebastian Dröge
10554b271f Merge branch 'master' into 0.11
Conflicts:
	ext/flac/gstflacdec.c
	ext/jpeg/gstjpegenc.c
	ext/pulse/pulsesink.c
	sys/v4l2/gstv4l2src.c
2012-01-25 12:49:11 +01:00
Wim Taymans
b4630dd3e0 more memory API porting 2012-01-25 12:30:29 +01:00
Wim Taymans
1584806634 port to new gthread API 2012-01-19 11:33:53 +01:00
Vincent Penquerc'h
b0608128b1 v4l2src: fix caps leak 2012-01-13 17:25:59 +00:00
Havard Graff
150403ab13 v4l2src: Don't assert when the interface is not implemented.
Simply return FALSE instead.

https://bugzilla.gnome.org/show_bug.cgi?id=667817
2012-01-13 10:07:20 +00:00
Sebastian Dröge
93e3ed5a86 Merge branch 'master' into 0.11
Conflicts:
	ext/cairo/gsttextoverlay.c
	ext/pulse/pulseaudiosink.c
	gst/audioparsers/gstaacparse.c
	gst/avi/gstavimux.c
	gst/flv/gstflvmux.c
	gst/interleave/interleave.c
	gst/isomp4/gstqtmux.c
	gst/matroska/matroska-demux.c
	gst/matroska/matroska-mux.c
	gst/matroska/matroska-mux.h
	gst/matroska/matroska-read-common.c
	gst/multifile/gstmultifilesink.c
	gst/multipart/multipartmux.c
	gst/shapewipe/gstshapewipe.c
	gst/smpte/gstsmpte.c
	gst/udp/gstmultiudpsink.c
	gst/videobox/gstvideobox.c
	gst/videocrop/gstaspectratiocrop.c
	gst/videomixer/videomixer.c
	gst/videomixer/videomixer2.c
	gst/wavparse/gstwavparse.c
	po/ja.po
	po/lv.po
	po/sr.po
	tests/check/Makefile.am
	tests/check/elements/qtmux.c
	tests/check/elements/rgvolume.c
2012-01-10 14:32:32 +01:00
Wim Taymans
4b8975f867 update for removed property probe 2011-12-21 11:59:46 +01:00
Wim Taymans
4f42f58565 v4l2: update for new interlaced caps 2011-12-19 19:03:52 +01:00
Tim-Philipp Müller
66f6e12888 Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.
2011-12-12 09:46:27 +00:00
Tim-Philipp Müller
668e15598b Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	sys/v4l2/gstv4l2object.c
2011-12-08 01:28:26 +00:00
Vincent Penquerc'h
687d6138d1 v4l2src: do not ignore the highest frame interval
https://bugzilla.gnome.org/show_bug.cgi?id=665387
2011-12-07 13:41:12 +00:00
Vincent Penquerc'h
2b0a001d0d v4l2src: do not ignore the largest resolution
The 'max' value isn't an STL style "one after the end" bound,
but the largest allowed value.

https://bugzilla.gnome.org/show_bug.cgi?id=665387
2011-12-07 13:41:12 +00:00
Tim-Philipp Müller
87ba312e19 v4l2: replace deprecated GST_CLASS_LOCK 2011-12-05 12:15:21 +00:00
Vincent Penquerc'h
1e974b1581 v4l2src: add a comment about a "hidden" assumption on rank values
https://bugzilla.gnome.org/show_bug.cgi?id=665387
2011-12-02 14:44:47 +00:00
Wim Taymans
710491109d fix for moved interfaces 2011-11-29 19:10:58 +01:00
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Tim-Philipp Müller
736a484129 More printf format warning fixes 2011-11-22 01:40:39 +00:00
Wim Taymans
07cc855b24 Merge branch 'master' into 0.11
Conflicts:
	ext/speex/gstspeexenc.c
	gst/rtpmanager/rtpsession.c
2011-11-17 17:17:11 +01:00
Wim Taymans
797523efbd _peer_get_caps() -> _peer_query_caps() 2011-11-15 18:04:44 +01:00
Wim Taymans
b2d508ac40 update for _get_caps() -> _query_caps() 2011-11-15 18:04:44 +01:00
Sjoerd Simons
e7ae593993 v4l2: Set pixel-aspect-ratio to 1/1
We don't currently support setting the pixel-aspect-ratio from V4L2. So
simply set it to be 1/1 in the caps to prevent negotiation failures when
fixating to weird values (e.g. when the downstream caps has
pixel-aspect-ratio = [ MIN, MAX ] )

https://bugzilla.gnome.org/show_bug.cgi?id=663580
2011-11-14 11:43:41 +01:00
Tim-Philipp Müller
c27bbe4be2 Update for GstURIHandler get_protocols() changes 2011-11-13 23:44:44 +00:00
Tim-Philipp Müller
a150d1e734 soup, pushfile, rtsp, udp, v4l2: update for GstURIHandler API changes 2011-11-13 18:50:51 +00:00
Wim Taymans
88e398b0ea update for removed fixate function 2011-11-10 11:03:18 +01:00
Stefan Sauer
fb162c8eb4 controller: port to new controller location and api 2011-11-04 20:15:48 +01:00
Wim Taymans
b1ef7e8a86 update for meta api change 2011-11-02 09:06:37 +01:00
Wim Taymans
9a8a8e72c8 structure: fix for api update 2011-11-02 09:06:37 +01:00
Tim-Philipp Müller
d18a578ba4 rtpmanager, v4l2: fix compiler warnings after gst_caps_new_simple() change 2011-10-28 09:06:41 +01:00
Wim Taymans
fc4684f4c6 fix compilation 2011-10-27 16:03:17 +02:00
Stefan Sauer
2468492f02 interfaces: clean up the use of iface and class/klass 2011-10-21 14:58:41 +02:00
Wim Taymans
586ef0babd Merge branch 'master' into 0.11
Conflicts:
	ext/speex/gstspeexdec.c
	ext/speex/gstspeexenc.c
	gst/isomp4/atoms.c
	gst/isomp4/gstqtmux.c
2011-10-06 12:23:39 +02:00
Stas Sergeev
73fac4e5bc v4l2, ximagesrc: fix some printf format compiler warnings
https://bugzilla.gnome.org/show_bug.cgi?id=660150
2011-09-30 18:05:32 +01:00
Wim Taymans
87fbd1e784 Merge branch 'master' into 0.11
Conflicts:
	common
	ext/pulse/pulsesink.c
	ext/soup/gstsouphttpclientsink.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtpmanager/gstrtpjitterbuffer.c
	gst/rtpmanager/rtpjitterbuffer.c
	gst/rtsp/gstrtspsrc.c
	sys/ximage/gstximagesrc.c
2011-09-28 12:44:59 +02:00
Guillaume Desmottes
06c65418d7 v4l2: use GST_RESOURCE_ERROR_BUSY if v4l2_ioctl fails with EBUSY
https://bugzilla.gnome.org/show_bug.cgi?id=658543
2011-09-08 15:04:42 +02:00
Wim Taymans
5b55cf057b Merge branch 'master' into 0.11
Conflicts:
	sys/v4l2/v4l2src_calls.c
2011-08-29 13:43:59 +02:00
Wim Taymans
75e153bb13 allocation: fix for vmethod changes 2011-08-26 14:20:49 +02:00
Vincent Penquerc'h
3968dc7688 v4l2src: make this work more than once in a row
We used to skip frame rate setup if the camera was already setup
with the requested frame rate. This breaks some cameras though,
causing them to not output data (several models of Thinkpad cameras
have this problem at least).
So, don't skip.

https://bugzilla.gnome.org/show_bug.cgi?id=638300
2011-08-26 10:33:10 +02:00
Wim Taymans
18065ac823 port to new video flags 2011-08-25 16:41:23 +02:00
Wim Taymans
44c1589b48 v4l2: improve fixate function
Use new core function to fixate a field.
Chain up to parent fixate function.
2011-08-17 17:57:11 +02:00
Wim Taymans
4bb2b140e9 Merge branch 'master' into 0.11
Conflicts:
	sys/v4l2/v4l2src_calls.c
2011-08-16 18:35:53 +02:00
Vincent Penquerc'h
639abf01f9 v4l2: take care not to change the current format where appropriate
Some drivers are buggy are will change the current format when
processing VIDIOC_TRY_FMT. Save and restore the current format
to ensure the format is kept unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=649067
2011-08-09 09:53:33 +02:00
Tim-Philipp Müller
d5db5ca9be v4l2: update for GstXOverlay => GstVideoOverlay rename 2011-08-08 15:25:31 +01:00
Sjoerd Simons
8edb15d12f v4l2src: Use fraction compare util function.
Use the fraction compare utility to compare function, not the
handcrafted one. The handcrafted one is buggy as it doesn't take into
account rounding error. For example comparing a framerate of 20/1 on a
camera configured as 30/1 fps would yield true: 1 == (1 * 20)/30 and not
re-configure the camera. Fixes #656104
2011-08-07 16:41:53 +02:00
Wim Taymans
1b1fb68c23 v4l2src: call set_caps method of baseclass
Call the baseclass set_caps function to make it send the caps event and
properly trigger the negotiation functions.
2011-08-04 16:35:46 +02:00
Edward Hervey
dc14c1ffc9 v4l2sink: Size variable should be a guint and not a gsize 2011-08-04 13:52:18 +02:00
Wim Taymans
add1cbdbd8 v4l2: activate the pool in fallback
When nobody is using our pool, activate it ourselves.
Avoid leaking the buffer array.
Set default pool configuration with caps.
Don't keep current_caps, core does that for us now.
2011-08-04 12:56:47 +01:00
Wim Taymans
4121021bb2 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtp/gstrtph264pay.c
	gst/rtpmanager/gstrtpssrcdemux.c
2011-08-03 18:25:30 +02:00
Tim-Philipp Müller
a1712ad87c docs: fix two more Since: tags 2011-08-02 23:42:58 +01:00
Wim Taymans
752a6778b2 v4l: change for new API 2011-07-29 17:21:36 +02:00
Wim Taymans
63fc64dd98 v4l2: remove unused variables
Use the more specialized type for the bufferpool.
Use the size from the driver as the size of the image to read.
Don't configure the pool when created. This will be done in the setup_allocation
method later or by upstream for sinks.
Remove unused properties and variables. Bufferpool sizes are now configured in
the bufferpool by the elements in the pipeline. We might want to influence the
pool size later somehow.
2011-07-27 16:46:46 +02:00
Wim Taymans
b638bb4735 v4l2bufferpool: remove unused variable 2011-07-27 13:46:09 +02:00
Wim Taymans
f7c500fe9c v4l2src: add metadata 2011-07-27 13:43:08 +02:00
Wim Taymans
fcfdececce bufferpool: check for metadata
Only add video metadata when it was configured in the pool. Fail if there was no
video metadata configured and the strides are not the default ones.
2011-07-27 13:41:28 +02:00
Wim Taymans
443e9f7c1d v4l2: add colorspace to debug 2011-07-27 12:41:33 +01:00
Wim Taymans
8c4241427a v4l2: rename a variable
Rename the size variable to sizeimage and fill it with the size that has been
given to use by the v4l2 driver instead of making something up..
2011-07-26 16:15:05 +02:00
Wim Taymans
e43ab9f2cd v4l2: use new setup_allocation vmethod 2011-07-26 13:18:55 +02:00
Wim Taymans
b2e1532021 v4l2: implement more bits of RW I/O mode
Implement the relaese of RW buffers in the pool.
Warn for unsupported write() mode for sinks.
2011-07-26 10:56:07 +01:00
Wim Taymans
be32a6393e v4l2: improve IO mode error handling
Error out when an unsupported IO mode was selected
2011-07-26 10:54:23 +01:00
Wim Taymans
9a8f1c4339 v4l2: remove unused method 2011-07-25 15:51:22 +02:00
Wim Taymans
e6a8718f0c v4l2: fix flushing start and stop
Move the flushing calls to the right place in the bufferpool.
Fix the min and max buffer sizes.
2011-07-25 15:39:18 +02:00
Wim Taymans
0a88ac4c92 v4l2: dequeue buffers when all are queued
Prefer to always use the default bufferpool queue for the _acquire function
because it properly supports unblocking when setting inactive etc. As a result,
we need to dequeue buffers and put them back in the bufferpool queue when we
have queued all buffers in the sink.
Rename some variables to more meaningfull names to avoid a problem with
freeing the wrong amount of buffers.
2011-07-25 14:47:05 +01:00
Wim Taymans
b98bc75f47 v4l2: only to STREAMOFF when streaming
Only call STREAMOFF when we previously called STREAMON
2011-07-25 10:24:33 +01:00
Wim Taymans
44fa0b9cab v4l2: handle unsupported formats 2011-07-19 18:20:43 +01:00
Wim Taymans
87d9a57aba v4l2: Fix sink bufferpool handling
Remove old method, use neww _process method for the sink.
Inform the parent bufferpool class about the settings too. This is needed to let
it know about the max-buffers.
Allocate the negotiated max-buffers and initially mmap min-buffers. The idea is
that the bufferpool will allocate more when needed.
Improve debugging.
Only poll in capture mode, it does not seem to work in playback mode on this
beagleboard.
2011-07-19 16:59:55 +01:00
Wim Taymans
55eb26f1e7 v4l2: More work on bufferpools
Add different transport methods to the bufferpool (MMAP and READ/WRITE)
Do more parsing of the bufferpool config.
Start and stop streaming based on the bufferpool state.
Make separate methods for getting a buffer from the pool and filling it with
data. This allows us to fill buffers from other pools too. Either use copy or
read to fill up the target buffers.
Add property to force a transfer mode in v4l2src.
Increase default number of buffers to 4.
Negotiate bufferpool and its properties in v4l2src.
2011-07-18 18:54:49 +02:00
Wim Taymans
39716c02a7 v4l2: add IO method enum 2011-07-18 10:52:23 +02:00
Wim Taymans
23656bbb72 bufferpool: improve _new function 2011-07-18 10:51:21 +02:00
Wim Taymans
4440801ace v4l2: implement setup_allocation
Implement the setup_allocation vmethod, we'll hopefully do something clever in
there later.
2011-07-15 16:55:50 +02:00
Wim Taymans
3eaecf3aed v4l2: improve bufferpool config setting
Pass the caps and the default video size to the bufferpool config.
Don't activate the bufferpool, this will be done by the object that decides to
use the bufferpool.
Improve debugging and error reporting.
2011-07-15 16:26:06 +01:00
Wim Taymans
37ef3f8997 v4l2: handle dequeueing correcly
First clean up the buffers in the queue, then the remaining ones in the
device.
2011-07-15 13:52:38 +01:00
Wim Taymans
c807bfb693 v4l2: unref copied buffer
After we copy the incomming buffer to one of our bufferpool buffers, unref the
target buffer after rendering so that it is put back in the pool.
2011-07-15 13:29:42 +01:00
Wim Taymans
b1378f159a v4l2: dequeue buffers for the sink
When we have all buffers queued for playback and we need a new empty buffer,
dequeue one and return it.
Set the right size for sink buffers.
Improve counting of queued buffers.
2011-07-15 13:07:11 +01:00
Wim Taymans
4dc85b87d9 v4l2: use the parent queue for the sink
We want to maintain a queue of free buffers for the sink, use the parent methods
to do that.
2011-07-15 12:35:14 +01:00
Wim Taymans
47816e1155 v4l2: fix error messages 2011-07-15 12:00:54 +02:00
Wim Taymans
549a4ddc8f v4l2: add ALLOCATION query to the sink 2011-07-15 11:30:25 +02:00
Wim Taymans
21f532ae10 v4l2: convert to GstBufferPool
Extend from GstBufferPool.
Handle the lifetime of the pool buffers correctly with the start/stop vmethods.
Map acquire and release directly to QBUF and DQBUF. We still expose an explicit
qbuf for the v4l2sink for now.
2011-07-15 11:27:18 +02:00
Wim Taymans
0f16daed15 v4l2: remove experimental markers 2011-07-15 11:18:03 +02:00
Wim Taymans
ef18a3c09b v4l2: merge code 2011-07-14 16:21:36 +02:00
Wim Taymans
33d93069c1 v4l2: Move output details to device object
Move the details of how a buffer is rendered to the device object.
2011-07-14 16:12:15 +02:00
Wim Taymans
7c5f5b1b7f v4l2: move capture code to device object
Move the details of how to capture to the device object. Remove the
v4l2src_calls.[ch] files because they are empty now.
Provide two simple methods to get and return a buffer to the device.
Also do a slow copy when the buffer is not from our pool.
2011-07-13 18:32:00 +02:00
Wim Taymans
ebd03a3fad v4l2: add some more debug 2011-07-13 16:58:08 +02:00
Wim Taymans
d7a27613c1 v4l2: stop streaming in READY and NULL 2011-07-13 16:56:21 +01:00
Wim Taymans
387e76114d v4l2: start streaming for the output as well 2011-07-13 16:40:39 +02:00
Wim Taymans
d9e61954a1 v4l2: Let the device object manage the pool
Rename start and stop methods to open and close because that is what they do.
After setting the format on the device object, setup the bufferpools. Move this
code from the v4l2src_calls.c file, it is shared between source and sink.
Make new device start and stop method that merges various bits of common code
spread over several files.
2011-07-13 16:33:58 +02:00
Wim Taymans
398001f20d v4l2: don't store stride in the videoinfo
We want to keep the default strides in the videoinfo. Keep the stride of the
video frames separate so that we can use both to copy a video frame and do
correct stride conversion.
2011-07-13 13:52:30 +01:00
Wim Taymans
3aed125163 v4l2: Use video frame copy for raw video
Use the video frame copy API for raw video frames so that we copy with the right
strides.
2011-07-13 13:38:15 +02:00
Wim Taymans
e77d183a1e v4l2: add video metadata to raw video buffers 2011-07-13 13:37:58 +02:00
Wim Taymans
be83e4f704 v4l2: small cleanups 2011-07-13 13:15:16 +02:00
Wim Taymans
01def08e7a v4l2: improve caps parsing
Use GstVideoInfo to store the parsed caps.
Remove outsize from the caps parsing code, it's wrong because it does not use
the stride given by the driver.
2011-07-13 13:04:40 +02:00
Wim Taymans
c83730fc11 v4l2: use errno 2011-07-13 11:40:11 +01:00
Wim Taymans
6d97bfc41f v4l2: handle EINVAL without posting a warning
EINVAL means that a call is not supported, we only want to post a WARNING when
something is really wrong.
2011-07-13 11:36:54 +02:00
Wim Taymans
50ce1807f0 v4l2: only set framerate for capture for now 2011-07-13 11:29:26 +02: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
Wim Taymans
100d46b5b9 v4l2: fix return value... 2011-07-12 19:13:45 +02:00
Wim Taymans
e8ae00f5fc v4l2: simplify setting the capture format
Pass the caps to the set_format function and make _set_format parse the caps.
Also keep the parsed values in the v4l2object so that we can refer to them when
we want.
2011-07-12 19:03:32 +01:00
Wim Taymans
b7ad28ba53 v4l2: remove more unused parameters 2011-07-12 18:41:47 +01:00
Wim Taymans
baa03a951b v4l: handle object out of the normal flow 2011-07-12 18:29:35 +01:00
Wim Taymans
0dcf0aebb0 v4l2: Let the bufferpool own the V4l2Object
Keep track of the currently configured format and setting in the
v4l2object.
Pass the v4l2object to the bufferpool constructor so that the bufferpool can
know everything about the currently configured settings. This also allows us
to remove some awkward code.
2011-07-12 18:13:42 +02:00
Wim Taymans
f55656dcfc v4l: remove caps argument, it's not needed
Remove the caps parameter, we don't need it anymore because we don't set
caps on buffers anymore.
2011-07-12 17:06:41 +02:00
Wim Taymans
59b86d2558 v4l: pass the bytesperline around
When setting a format, return the bytesperline to the caller so that it can be
used to allocate buffers.
2011-07-12 16:46:21 +01:00
Wim Taymans
1ef806181c pool: make buffer writable
We need writable buffers when we need to do a slow memcpy.
2011-07-12 16:43:04 +01:00
Wim Taymans
e9d80b9f14 v4l2sink: handle pools
Create a new pool in setcaps and stop/destroy the old one.
Remove buffer_alloc functions.
Check that we have v4l2 metadata in show_frame and fall back to memcpy into a
buffer from our pool if we don't receive one of our own buffers.
2011-07-11 13:51:52 +02:00
Wim Taymans
851f550003 v4l2: various cleanups
Various cleanups, avoids useless casts, move error handling outside of the main
code flow.
Negotiate to a resonable resolution instead of the max resolution.
2011-07-11 12:15:12 +02:00
Wim Taymans
3b4afcb8df v4l2: fix gray format, use filter in getcaps 2011-07-08 16:37:11 +02:00
Wim Taymans
7a296af37f v4l2: port and enable v4l2sink 2011-07-08 16:10:47 +02:00
Wim Taymans
b8640c8cd9 v4l2src: port to new video formats 2011-07-08 14:34:40 +02:00
Wim Taymans
e20d6f0bb5 v4l2: port to 0.11 2011-07-08 12:49:12 +02:00
Wim Taymans
d89790d545 Merge branch 'master' into 0.11
Conflicts:
	gst/avi/gstavidemux.c
	gst/rtp/gstrtpac3depay.c
	gst/rtp/gstrtpg726depay.c
	gst/rtp/gstrtpmpvdepay.c
	gst/videofilter/gstgamma.c
2011-05-24 17:34:19 +02:00
Rob Clark
9c9585116c v4l2: add norm property
Based on a patch by Guennadi Liakhovetski.

v2: updates because I forgot to add GstTuner interface to v4l2sink
v3: update to add all possible values to norm enum
2011-05-24 10:47:26 +02:00
Wim Taymans
e15651816e Merge branch 'master' into 0.11 2011-05-17 16:13:59 +02:00
Edward Hervey
1a310d558c v4l2objects: Only allow mpeg-ts on source objects
Ugly fix for #648312
2011-05-17 09:25:23 +02:00
Wim Taymans
7555d0949f Merge branch 'master' into 0.11
Conflicts:
	android/apetag.mk
	android/avi.mk
	android/flv.mk
	android/icydemux.mk
	android/id3demux.mk
	android/qtdemux.mk
	android/rtp.mk
	android/rtpmanager.mk
	android/rtsp.mk
	android/soup.mk
	android/udp.mk
	android/wavenc.mk
	android/wavparse.mk
	configure.ac
2011-04-18 10:23:45 +02:00
Tim-Philipp Müller
86d8c8162e v4l2sink: fix another unused-but-set-variable warning 2011-04-16 18:16:11 +01:00
Robert Swain
e02b7e7fdf v4l2src: Address unused but set variable
The v4l2object formats list was being obtained into a local variable and
then still used from the context. Make use of the local variable.
2011-04-16 13:15:03 +01:00
Sebastian Dröge
0b9cf7e47d v4l2radio: Free videodev string before replacing it 2011-04-14 13:38:30 +02:00
Wim Taymans
c124ba1489 Merge branch 'master' into 0.11
Conflicts:
	gst/rtsp/gstrtspsrc.c
2011-04-05 17:20:08 +02:00
Stefan Kost
270dd376bc docs: fix docuemntation warnings (and reindent) 2011-04-05 12:06:55 +03:00
Wim Taymans
8f22a09dc4 Merge branch 'master' into 0.11-fdo 2011-03-28 20:50:59 +02:00
Alexey Chernov
e7a63c34ac v4l2: new v4l2radio element to control analog radio devices
https://bugzilla.gnome.org/show_bug.cgi?id=640118
2011-03-27 20:29:43 +01:00
Wim Taymans
c63dc97adf meta: update for new API 2011-03-08 17:02:30 +00:00
Wim Taymans
a4fdb8ee44 Merge branch 'master' into 0.11
Conflicts:
	tests/examples/cairo/Makefile.am
2011-03-08 10:14:20 +00:00
David Schleef
910a6f0c96 v4l2: Use #ifdefs for V4L2_PIX_FMT_PJPG
It's only recently added to kernel headers.
2011-03-04 18:38:39 -08:00
Wim Taymans
338c300f5f Merge branch 'master' into 0.11 2011-03-04 16:30:36 +01: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
Wim Taymans
de1ca68077 v4l2: register metadata 2011-02-28 11:58:49 +01:00
Wim Taymans
9c08bde90b meta: fix for new API 2011-02-28 11:58:49 +01:00
Wim Taymans
f229f4d192 metadata: use metadata for private buffer data
Use buffer metadata to store element private data.
2011-02-28 11:58:49 +01:00
Wim Taymans
d90a388289 miniobject: port to 0.11
Use buffer private data instead of subclassing.
2011-02-28 11:58:48 +01:00
Wim Taymans
759a3507d7 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2011-02-28 11:58:05 +01:00
Thiago Santos
5dac2e5fde v4l2: Add PJPG mapping
Adds mapping of progressive jpeg format
2011-02-15 16:14:25 -03:00
Mark Nauwelaerts
6b86b56abd v4l2: fix interlaced set_format configuration
Commit 6c8268dbfd broke recording
from interlaced v4l2 source (e.g. typical tv capture card) since
V4L2_FIELD_SEQ_TB (with fields stored separately) does not map
to currently defined interlaced format (fields stored interleaved).

Besides this mismatch, hardware might quite likely not support or
appreciate this field value, since querying supported formats mapped
_INTERLACED field formats to interlaced=true caps (so the latter should
not be mapped to field value that is not known to be supported).
2011-02-04 10:49:06 +01:00
Tim-Philipp Müller
9acda034f8 v4l2sink: fix accidental breakage of navigation interface support 2011-01-20 00:08:18 +00:00
Tim-Philipp Müller
9dcb60822f v4l2: define V4L2_FIELD_INTERLACED_{TB,BT} if not available in header
Older kernels don't have these, and there's no easy way to check for the
existance of enums that doesn't involve a configure check, so just define
these if the V4L2_CAP_VIDEO_OUTPUT_OVERLAY define is not there, which was
added in the same commit as the TB/BT enum. Fixes compilation on CentOS 5.

https://bugzilla.gnome.org/show_bug.cgi?id=639339
2011-01-12 22:41:17 +00:00
Tim-Philipp Müller
09d19e7dcd v4l2sink: don't put functional code like ioctl calls into g_return_if_fail()
These macros will expand to NOOPs given the right defines. Also,
g_return_if_fail() and friends are meant to be used to catch programming
errors (like invalid input to functions), not runtime error handling.
2011-01-07 01:35:45 +00:00
Tim-Philipp Müller
06b68c81b4 v4l2src: undo presumably accidental enablement of the GstXOverlay interface
Looks like this got enabled by accident when adding it to v4l2sink,
so undo this for now. Not sure it makes much sense in a GStreamer
context with current hardware.
2011-01-03 15:16:48 +00:00
Tim-Philipp Müller
b0eb10cc53 v4l2: mark v4l2sink as experimental and build only if --enable-experimental is passed
It's not really of 'good' quality yet, but there's a lot of
code shared with v4l2src, so not so easy to move it elswhere.

https://bugzilla.gnome.org/show_bug.cgi?id=612244
2011-01-02 11:40:29 +00:00
Tim-Philipp Müller
0be6bd355a Revert "v4l2: add norm property"
This reverts commit 9e1d419d07.

Reverting this since it adds unreviewed and bad API to v4l2src
(property of type enum, with seemingly random and unsorted values).
2011-01-02 11:40:28 +00:00
Rob Clark
6c8268dbfd v4l2: add interlaced support 2010-12-29 11:46:42 -06:00
Rob Clark
538d3a959b v4l2sink: add navigation support 2010-12-29 11:46:42 -06:00
Rob Clark
9e1d419d07 v4l2: add norm property
Based on a patch by Guennadi Liakhovetski.
2010-12-29 11:46:42 -06: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
Rob Clark
bf88547489 v4l2xoverlay: add support to create window
If xoverlay is available, v4l2sink should create a window for the overlay to
display in.

The window automatically tries to make itself as large as possible.
This works well on a small screen, but perhaps should first attempt to use
the size of the video that is played (no scaling).
2010-12-29 11:46:41 -06:00
Rob Clark
ff5494046a v4l2sink: special handling for cases gst_buffer_make_metadata_writable()
Special case check for sub-buffers:  In certain cases, places like
GstBaseTransform, which might check that the buffer is writable before copying
metadata, timestamp, and such, will find that the buffer has more than one
reference to it.  In these cases, they will create a sub-buffer with an offset=0
and length equal to the original buffer size.

This could happen in two scenarios: (1) a tee in the pipeline, and (2) because
the refcnt is incremented in gst_mini_object_free() before the finalize function
is called, and decremented after it returns..  but returning this buffer to the
buffer pool in the finalize function, could wake up a thread blocked in
_buffer_alloc() which could run and get a buffer w/ refcnt==2 before the thread
originally unref'ing the buffer returns from finalize function and decrements
the refcnt back to 1!

This is related to issue #545501
2010-12-29 11:46:41 -06:00
Rob Clark
c3721534c9 v4l2: fix race condition
The size of the buffer would be zero'd out in gst_v4l2_buffer_finalize()
after the buffer is qbuf'd or pushed onto the queue of available buffers..
leaving a race condition where the thread waiting for the buffer could awake
and set back a valid size before the finalizing thread zeros out the length.
This would result that the newly allocated buffer has length of zero.
2010-12-29 11:46:41 -06:00
Rob Clark
34e448980b v4l2sink: add properties to control crop 2010-12-29 11:46:41 -06:00
Rob Clark
67cd90408f v4l2: re-enable x-overlay support 2010-12-29 11:46:41 -06:00
Rob Clark
417b899c44 v4l2sink: fix for PAUSED->READY->PAUSED state transitions
When v4l2sink goes to PAUSED->READY it only stops streaming, so the state
should be set to STATE_PENDING_STREAMON in case the element transitions
back to PLAYING.
2010-12-29 11:46:41 -06:00
Rob Clark
61db502a12 v4l2sink: add "min-queued-bufs" property 2010-12-29 11:46:41 -06:00
Rob Clark
0cec72b97e v4l2sink: Add support for blocking dequeue.
We'd prefer to throttle the decoder if we run out of buffers, to keep a bound
on memory usage.  Also, for OMAP4 it is a requirement of the decoder to not
alternate between memory alloced by the display driver and malloc'd userspace
memory.
2010-12-29 11:46:40 -06:00
Rob Clark
ecfbaf58a5 v4l2: clear flags before reusing buffer from buffer pool
note: this really only affects v4l2sink since gst_v4l2_buffer_pool_get() is
only called once per buffer in the v4l2src case (in
gst_v4l2src_buffer_pool_activate())
2010-12-29 11:46:40 -06:00
Rob Clark
e24cfa7250 v4l2sink: don't render preroll buffers
Most v4l2 drivers will get upset when you queue the same buffer twice in a
row without first dequeueing it.

Rendering of pre-roll buffers can be re-introduced later, but will require
tracking the state of the buffer, and avoiding to re-QBUF if the buffer has
already been passed to the driver.
2010-12-29 11:46:40 -06:00
Rob Clark
48a8b53bdd v4l2sink: Improve behavior for shared buffers.
When the decoder is using pad_alloc(), v4l2sink would behave badly if
the number of buffers ('queue-size' property) was not high enough to
account for all the buffers needed by the decoder, and other elements
(such as queues) between the decoder and v4l2sink.  This patch
slightly increases the default number of buffers, and changes v4l2sink
to drop frames rather than return an error in case the number of
buffers is not high enough.
2010-12-29 11:46:40 -06:00
Rob Clark
60c1a44917 v4l2: fix typo 2010-12-23 16:44:06 -06:00
Rob Clark
66387181ac fix compile errors on macosx
with i686-apple-darwin10-gcc-4.2.1:

gstv4l2object.c: In function 'gst_v4l2_object_get_nearest_size':
gstv4l2object.c:1988: warning: format '%u' expects type 'unsigned int', but argument 12 has type 'gint *'
gstv4l2object.c:1988: warning: format '%u' expects type 'unsigned int', but argument 13 has type 'gint *'
2010-12-17 19:19:35 -06:00
Wim Taymans
22443cfb13 v4l2: don't abuse the class lock
Use a new static lock to protect the probed device list instead of the object
class lock.
2010-12-07 11:40:58 +01:00
Janne Grunau
ab69275f4d v4l2src: set top field first for interlaced buffers if v4l2 exports it
https://bugzilla.gnome.org/show_bug.cgi?id=634393
2010-12-04 16:42:21 +00:00
Janne Grunau
351ac54822 v4l2src: check field information and set interlaced caps accordingly
Reject the format if the field type is not supported.

https://bugzilla.gnome.org/show_bug.cgi?id=634391
2010-12-04 16:39:35 +00:00
IOhannes m zmölnig
b37845dac0 v4l2sink: Only get/set overlay params if needed
it's perfectly ok for a video output device to not have overlay capabilities.
this patch removes the need to get/set the overlay parameters if the user
does not explicitely request one of the overlay properties
2010-10-10 11:23:39 +02:00
IOhannes m zmölnig
4ba93e9f1a v4l2sink: Protect against NULL-pointer access
gst_v4l2sink_change_state() would free the pool without checking whether there
was a valid pool...
2010-10-10 11:23:39 +02:00
Philippe Normand
672bfc3369 v4l2: use the xoverlay APIs 2010-09-21 13:40:33 +02:00
Tim-Philipp Müller
601b993f95 docs: add gtk-doc chunks with Since: markers for new v4l2src properties 2010-09-15 17:05:30 +01:00
Stefan Kost
1f4f4581d8 v4l2src: don't skip calculating the duration 2010-09-10 17:00:58 +03:00
Stefan Kost
a08d4a5447 v4l2src: add controlable colorbalance parameters
Expose colorbalance controls as object properties (like we do on xvimagesink).
Make them controlable.
2010-09-10 17:00:58 +03:00
David Schleef
178c57be4f v4l2src: add decimate property 2010-09-04 12:39:26 -07:00
Sjoerd Simons
e9a30e454a v4l2src: Use GstBaseSrc::block-size as fallback size 2010-09-04 14:52:11 +02:00
Sjoerd Simons
74d7521a7c v4l2src: Fix using mpegts via the mmap interface
MPEG doesn't have a static size per frame, so don't pretend it has one
and fail when capturing because it doesn't match. Instead mark the size
as unknown and let the read frame grabbing method use a reasonable fallback
value (assuming that's only for actual streaming formats)

Fixes bug #628349.
2010-09-04 14:52:11 +02:00
Tim-Philipp Müller
6321d9910d v4l2src: also log pixel formats in sorted order 2010-08-06 20:07:26 +01:00
Sjoerd Simons
dcea1b2dfc v4l2: sort formats in the right order so that non-emulated formats are prefered
The format list should be sorted from high ranks to low ranks. In the GSList
sorting function this means the compare needs to return a positive value if
format a has a lower rank than format b.

Among other things this fixes v4l2src to prefer non-emulated formats
to emulated formats when built against libv4l.
2010-08-06 20:07:21 +01:00
Michael Grzeschik
34c7cabe2c v4l2sink: destroy buffer pool when changing state to NULL
In the case we change the State from READY_TO_NULL the buffers in the pool
still hold an open dup file descriptor to the device, therefore the device
release function will not be called and the device will probably answer with
-EBUSY when we reopen it in the next NULL_TO_READY transition.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

See bug #622500 and #612244.
2010-07-06 11:03:39 +01:00
Stefan Kost
23106e243b v4l2: precalculate duration
Have frame duration in the instance struct and calculate it after changing the caps.
2010-06-22 15:46:51 +03:00
Stefan Kost
ac8e87bb2c v4l2sink: use glib defines in property declarations for readability 2010-06-21 12:19:59 +03:00
Stefan Kost
f9fe85dbb2 v4l2: use G_PARAM_STATIC_STRINGS to save a few bytes and strdups 2010-06-21 12:19:59 +03:00
Havoc Pennington
f06b105058 v4l2src: do not try to change device format if it's already correct
This allows set_caps to succeed if caps change in a way that
would not modify the format we're getting from the hardware.
Otherwise if not in NULL state, setting caps would fail
with EBUSY.

With this change, in some cases it's OK to go PLAYING->READY->PLAYING
rather than PLAYING->NULL->PLAYING to avoid a time-consuming close
and reopen of the device.

Fixes #621723
2010-06-16 17:48:47 +02:00
Havoc Pennington
9b9f9d0a2a v4l2src: in negotiate, check for error return from set_caps
Fixes #621723  (partially)

set_caps can fail if the video device is running, in that case
setting its format leads to EBUSY.

If set_caps fails then we will not have set up the buffer pool
(it will be NULL) which leads to a crash when we try to pull
buffers. If we fail the negotiate on set_caps failure, then we
won't go to playing state and won't crash.

This is a small improvement. Of course, a nicer fix would
be to make set_caps work in the case where the format is
unchanged. If the format has changed, failing is
probably correct because we need to close the device
(go to NULL state) in order to set caps.
2010-06-16 17:48:47 +02:00
Sebastian Dröge
acd0c1ff90 v4l2: Initialize variable 2010-06-15 19:47:16 +02:00
David Schleef
3478f31664 v4l2src: Fix element description 2010-06-11 16:24:15 -07:00
Benjamin Otte
3f511ec361 Add -Wwrite-strings to the configure flags
... and fix all warnings
2010-03-21 14:17:47 +01:00
Benjamin Otte
cccfeaa59c gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 14:32:00 +01:00
Benjamin Otte
1055aaa9cb Add -Wredundant-decls warning flag
Also fix compile issues
2010-03-17 19:35:10 +01:00
Benjamin Otte
3342b1679e Add -Wmissing-declarations -Wmissing-prototypes warning flags
And fix all the warnings.
2010-03-17 18:23:28 +01:00
Stefan Kost
0134e950fa v4l2: log more details in buffer pool finalize
Helps to align with the loggin from libv4l.
2010-02-16 10:15:22 +02:00
Stefan Kost
f94bfc65a5 v4l2: init datastructures after pre-conditions checks 2010-02-16 10:15:22 +02:00
Tim-Philipp Müller
2baa107562 v4l2: printf format string fix
The compiler wants a cast here even though the type is already
typedefed as 64-bit integer (presumably because glib has typedefed
guint64 to unsigned long here).
2010-02-15 12:13:43 +00:00
Tim-Philipp Müller
532bbf36ee v4l2sink: change rank to NONE so it is never autoplugged 2010-02-13 20:59:42 +00:00
Tim-Philipp Müller
114ba3dc6e v4lsink: lower rank to MARGINAL 2010-02-12 15:56:01 +00:00
Tim-Philipp Müller
5290b514c8 v4l2: fix unportable printf format 2010-02-01 09:18:53 +00:00
Stefan Kost
21a8cb1e06 v4l2src: don't deref NULL
Error out when the pool gets shutdown.
2010-01-25 17:23:43 +02:00
Stefan Kost
8576a11dae Revert "v4l2src: don't deref NULL"
This reverts commit 3d9d34bd60.
2010-01-25 17:21:13 +02:00
Stefan Kost
3d9d34bd60 v4l2src: don't deref NULL
Error out when the pool gets shutdown.
2010-01-25 14:16:22 +02:00
Stefan Kost
30b2cd42c5 v4l2: move G_END_DECLS to the end 2010-01-18 14:57:42 +02:00
Stefan Kost
e789d2253f v4l2: fix bufferpool file names in header comment 2010-01-18 14:55:38 +02:00
Tim-Philipp Müller
d68689255d v4l2src: fix memory leak in new uri handler code
Don't leak a string everytime get_uri() is called and a device
has been set. There's a limited number of devices, so just
intern the string instead of doing more elaborate housekeeping
and storing it in the instance struct or so.
2010-01-05 09:49:16 +00:00
Edward Hervey
121c001437 v4l2src: Add GstURIHandler interface. Fixes #601143
This allows using v4l2://[<device>]
2009-12-21 13:54:40 +01:00
Sebastian Dröge
7ef43f021b v4l2: Make sure to initialize variables before using them 2009-11-11 10:45:23 +01:00
Thiago Santos
72af90ae31 v4l2src: Set duration on buffers
Use framerate to estimate duration of buffers.

Fixes #590362
2009-10-14 08:00:49 -03:00
Pau Garcia i Quiles
f10435580f v4l2: Include sys/ioctl.h for the V4L ioctl requests
Old videodevice2.h kernel headers used ioctl stuff without
including ioctl.h, making compilation fail on older systems.

Note: Including ioctl.h here is only a workaround for old kernel
headers, should be removed once everybody has new enough headers.

Fixes bug #597867.
2009-10-09 11:34:16 +02:00
Stefan Kost
00ffa9c2dd v4l2src: add a function pointer for get_frame function and optimize a bit
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.
2009-09-11 22:24:47 +03:00
Stefan Kost
1a945a32cc v4l2: log buffer copies on queue underrun in perf category
v4l2src has a slow path where it does buffer-copies when it runs out of queued
buffers. Log this to performance category to help monitoring it.
2009-09-11 22:19:23 +03:00
Stefan Kost
0a68003efe docs: fix gtk-doc warnings 2009-09-10 10:26:23 +03:00
Wim Taymans
5580571f8d whitespace fixes 2009-09-09 10:27:55 +02:00
Wim Taymans
796dec5920 v4l2src: add support for mpeg formats 2009-09-07 18:28:51 +02:00
David Schleef
55d2754098 Remove Ronald Bultje from Authors field
Replaced with "GStreamer maintainers
<gstreamer-devel@lists.sourceforge.net>" or just removed,
depending on the number of other authors.
2009-09-05 20:53:10 -07:00
Sebastian Dröge
686f8376a8 v4l2: Define V4L2_FMT_FLAG_EMULATED if it's not defined yet
libv4l2 already uses this flag, even on Linux kernel versions
before 2.6.32.
2009-09-04 09:32:42 +02:00
Sebastian Dröge
0c6fba9506 v4l2: Fix stupid typo in last commit 2009-09-03 20:40:17 +02:00
Sebastian Dröge
4fda384a83 v4l2: Put emulated formats behind native formats
Fixes bug #593764.
2009-09-03 20:39:44 +02:00
Hans de Goede
10d41286d5 v4l2src: fix 'hang' with some cameras caused by bad timestamping if no framerate is available
For cameras/drivers that don't support e.g. VIDIOC_G_PARM we'd end up without
a framerate and would try to divide by 0, causing run-time warnings and all
frames to be timestamped with 0, which makes sinks that sync against the clock
drop them, causing 'hangs' (observed with the pwc driver and a Logitech QuickCam
Pro 4000). So if we do not know the framerate, simply don't adjust the
timestamps. Fixes #591451.
2009-08-14 13:30:31 +01:00
Filippo Argiolas
a3a61f8940 v4l2src: clear format list in READY->NULL
Clear format list and probed caps when going to NULL so if a new device
is set we'll probe the formats again instead of using previously
detected ones. Fixes bug #591747.
2009-08-14 10:15:43 +02:00
Tim-Philipp Müller
9590df3c2e v4l2: fix make distcheck by disting some more headers 2009-08-11 03:08:01 +01:00
Tim-Philipp Müller
8c8e6af45b v4l2src: if max == min width/height put an int in the probed caps, not an int range
Fixes #560033.
2009-08-09 14:19:42 +01: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
99e2ac121d v4l2sink: change where buffers get dequeued
It seems to cause strange occasional high latencies (almost 200ms) when dequeuing buffers from _buffer_alloc().  It is simpler and seems to work much better to dqbuf from the same thread that is queuing the next buffer.
2009-08-04 09:22:29 +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
Elaine Xiong
085f87d85f v4l2: Fix v4l2src on OpenSolaris
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>
2009-07-19 11:42:13 +01:00
Filippo Argiolas
946c20a8ba v4l2src: optional support for device probing with gudev
Enumerate v4l2 devices using gudev if available.

Fixes bug #583640.
2009-07-13 16:16:05 +02:00
Stefan Kost
5d256c201f v4l2src: set structs to zero before using them in ioctls
This fixes valgrind warnings.
2009-06-25 19:44:21 +03:00
Stefan Kost
0b475ba774 v4l2: open/close the device in READY
This allows to query the device in READY. Before one need to switch it to PAUSED
and that also starts streaming.
2009-06-22 16:24:46 +03:00
Stefan Kost
751f7fc5f8 v4l2: cleanup and commenting
Remove newlines inserted by gst-indent once. Remove unused var from instance
struct. Add comments. Add another #define for default property value.
2009-05-26 16:29:46 +03:00
James Andrewartha
2410cd7a00 Fix compiler warnings
Fixes bug #582715.
2009-05-15 15:14:52 +02:00
Stefan Kost
ad5702d492 v4l2src: move duplicated timestamping and buffer metadata code to _create()
This will include the latency changes also in the mmap case.
2009-03-25 10:08:41 +02:00
Stefan Kost
652a7fb91f v4l2src: remove win32 ifdefs introduced by commit cff3f46760eac74c9bbd7a36aca44fedf327424b
V4l2src is under sys and does not exists/run under windows anyway.
2009-03-25 10:06:48 +02:00
Stefan Kost
1d16c9cc27 v4l2src: log details if we have them, needed for #575391 2009-03-15 23:26:56 +02:00
Jan Schmidt
a32581abee v4l2src: Prepend to lists and reverse them at the end.
Gratuitous micro-optimisation - prepend to lists and reverse them, rather
than appending to them each time.
2009-03-13 15:43:52 +00:00
Stefan Kost
f86b485f3b v4l2src: fix pads, so that they are subset of template caps
Do not add w=0 | h=0. When we can't get a framerate add fraction range.
2009-03-06 21:57:53 +02:00
Sjoerd Simons
b6755a7000 Wait for a frame to become available before capturing it
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.
2009-03-01 19:55:26 +01:00
Wim Taymans
04359c8382 Conditionally compile code for YVYU
Only compile the code for the YVYU format when the format is actually defined.
Spotted by tmatth on IRC.
2009-02-23 19:53:58 +01:00
Levente Farkas
d2fc4cb3ba v4l2src: Make sort_by_frame_size conditionally compiled
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>
2009-02-23 09:20:49 -08:00
Wim Taymans
42c8aa7abc Add YVYU format to caps
Add YVYU format to the caps. We don't have anything to handle these caps yet,
though.
2009-02-23 17:05:43 +01:00
Brijesh Singh
74f84ae47f Fix comparison of the tuner norms
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.
2009-01-30 14:42:44 +01:00
Stefan Kost
8e462968cf Remove version numbers from a few gst-launch examples.
The majority of the examples doe not use -0.10 and this will also help us to maintain the docs.
2009-01-29 11:07:59 +02:00
Stefan Kost
6335307b97 Update and add documentation for platform specific plugins (sys).
Link to properties. Correct titles for examples. Fix examples.
2009-01-29 10:12:43 +02:00
Tim-Philipp Müller
6c565d2ee1 sys/v4l2/gstv4l2src.c: Fix error code (the message string also needs love, 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).
2009-01-20 15:33:05 +00:00
Jan Schmidt
90e9d8e0e1 sys/v4l2/gstv4l2src.c: Remove () from translateable string, so that it makes more sense.
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c:
Remove () from translateable string, so that it makes more sense.
2009-01-07 16:09:47 +00:00
Sascha Hauer
d576b9fdbe sys/v4l2/gstv4l2src.c: Add support for grayscale v4l2 devices. Fixes bug #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.
2009-01-05 12:30:40 +00:00
Tim-Philipp Müller
2e0d8e8b93 sys/v4l2/v4l2src_calls.c: Turns out we don't always get the frame sizes in a 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.
2008-11-17 14:04:20 +00:00
Stefan Kost
b51bb31b73 sys/v4l2/gstv4l2.c: Give it a primary rank for autovideosrc.
Original commit message from CVS:
* sys/v4l2/gstv4l2.c:
Give it a primary rank for autovideosrc.
2008-11-14 15:42:32 +00:00
Fabricio Godoy
5a4565868d sys/: Fix some spelling mistakes. Fixes #556802.
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.
2008-11-13 17:45:59 +00: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
Stefan Kost
084812bffd Don't install static libs for plugins. Fixes #550851 for -good.
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.
2008-11-04 12:28:34 +00:00
Wim Taymans
46fe1e3fa0 sys/v4l2/v4l2src_calls.c: Guard more uncommon formats with ifdefs so that we 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.
2008-10-31 10:08:50 +00:00
Wim Taymans
300da1655b sys/v4l2/gstv4l2object.h: Getting the Class from an instance is not just a 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.
2008-10-03 11:32:47 +00:00
Stefan Kost
2ea5c05241 sys/v4l2/: Fix memory leaks. Small code cleanups : No need for empty _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.
2008-08-26 12:27:11 +00:00