Commit graph

66 commits

Author SHA1 Message Date
Tim-Philipp Müller
4bb52bbadf docs: gst-launch -> gst-launch-1.0 and ffmpegcolorspace -> videoconvert 2012-08-27 21:20:30 +01:00
Wim Taymans
16b8e2d171 update for query api changes 2012-07-06 11:50:50 +02:00
Wim Taymans
77813e67e1 update for allocation query changes 2012-07-06 11:05:11 +02:00
Tim-Philipp Müller
e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Wim Taymans
e310ee8218 caps: improve caps handling
Avoid caps copy and leaks
2012-03-27 16:42:41 +02:00
Wim Taymans
098d8ceae7 v4l2: update for get_param
Remove const from the GstCaps.
Plug some GstStructure leaks
2012-03-27 12:44:46 +02:00
Wim Taymans
ced47580b7 update for bufferpool changes 2012-03-15 22:11:17 +01:00
Wim Taymans
f3a770a20c update for allocation query changes 2012-03-15 20:37:56 +01:00
Wim Taymans
751fcf035b take padding into account 2012-03-14 19:56:56 +01:00
Wim Taymans
9c789aa434 update for metadata API changes 2012-02-29 17:26:01 +01:00
Wim Taymans
4b8975f867 update for removed property probe 2011-12-21 11:59:46 +01:00
Wim Taymans
b1ef7e8a86 update for meta api change 2011-11-02 09:06:37 +01:00
Wim Taymans
75e153bb13 allocation: fix for vmethod changes 2011-08-26 14:20:49 +02:00
Tim-Philipp Müller
d5db5ca9be v4l2: update for GstXOverlay => GstVideoOverlay rename 2011-08-08 15:25:31 +01: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
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
e43ab9f2cd v4l2: use new setup_allocation vmethod 2011-07-26 13:18:55 +02: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
549a4ddc8f v4l2: add ALLOCATION query to the sink 2011-07-15 11:30:25 +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
d7a27613c1 v4l2: stop streaming in READY and NULL 2011-07-13 16:56:21 +01: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
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
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
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
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
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
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
Tim-Philipp Müller
86d8c8162e v4l2sink: fix another unused-but-set-variable warning 2011-04-16 18:16:11 +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
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
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
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