Commit graph

76 commits

Author SHA1 Message Date
Julien Isorce
5c07e6b45c v4l2sink: implement gstvideosink.show_frame instead of gstbasesink.render
It allows to show preroll frame. Especially it allows to update the
frame when seeking in PAUSED state.

https://bugzilla.gnome.org/show_bug.cgi?id=722303
2014-05-26 14:07:42 -04:00
Nicolas Dufresne
ea340455ae v4l2sink: Cleanup old pad alloc declaration 2014-05-26 13:43:30 -04:00
Nicolas Dufresne
b3bf4e33d0 v4l2bufferpool: Copy already queued buffer
This is required as during preroll we pass the first buffer twice, hence already
queued. It is also useful, to allow filters replaying a previous rendered buffers.
This will require 1 more buffer in sink if last-sample is enabled, since the last
sample will not be the same as the currently queued buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=722303
2014-05-26 13:43:30 -04:00
Nicolas Dufresne
815c9b7d35 v4l2bufferpool: Acquire cannot return a buffer from another pool
Return a buffer from an otherpool has unwanted side effects that lead to leaks and
prevents deactivating the pool. Instead, we change the _process() API so it can
replace the internal buffer with the buffer from the downstream pool. This implied
moving from _fill() to _create() method in the src.
2014-05-08 15:56:37 -04:00
Nicolas Dufresne
0488984f82 v4l2: Move propose allocation to v4l2object 2014-05-08 15:56:36 -04:00
Nicolas Dufresne
6196026c76 v4l2bufferpool: Enforce activation outside of process
Enforce pool being activate from before calling pool process. This should
help catching basic errors in the usage of buffer pool.
2014-05-08 15:56:35 -04:00
Nicolas Dufresne
11103c6c47 v4l2: Remove XV support
XV support for v4l2 never became upstream and ended up being
commented out with an undef for a long time now.
2014-03-15 13:54:47 +01:00
Olivier Crête
48caa1712a v4l2: De-duplicate caps probing between src and sink 2013-08-19 13:08:18 -04:00
Michael Olbrich
00ffe41e6a v4l2: Don't stop streaming when set_caps is called with unchanged caps
This can happen if other parts of the pipeline are reconfigured.
Stop streaming even for a short amount of time can be quite visible, so it
should be avoided if possible.

https://bugzilla.gnome.org/show_bug.cgi?id=700503
2013-05-20 11:13:18 +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
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