Commit graph

186 commits

Author SHA1 Message Date
Sebastian Dröge
982148c07c v4l2src: Update for basesrc API changes 2012-05-01 13:33:46 +02:00
Wim Taymans
a473750350 v4l2: improve timestamp code
Sample the pipeline clock and device clock closer to eachother to reduce jitter.
Don't subtract the frame duration from the timestamp when we can use the device
timestamps.
Assume a delay of 1 frame in read-write mode.
2012-04-25 09:41:46 +02:00
Wim Taymans
46045316ce v4l2: use driver timestamps
Use the drive timestamps for timestamping outgoing buffers.
2012-04-24 12:37:33 +02:00
Wim Taymans
eecb9a96a6 v4l2: Improve buffer management
Query the amount of available buffers when doing set_config(). This allows us to
configure the parent bufferpool with the number of buffers to preallocate.
Keep track of the provided allocator and use it when we need to allocate a
buffer in RW mode.
When we are can not allocate the requested max_buffers amount of buffers, make
sure we keep 2 buffers around in the pool and copy them into an output buffer.
This makes sure that we always have a buffer to capture into. We also need to
detect those copied buffers and unref them when they return to the pool.
2012-04-23 18:10:33 +02:00
Mart Raudsepp
8719375be7 docs: Add Since tag for new GstV4l2Src::prepare-format signal 2012-04-23 11:24:19 +02:00
Sebastian Dröge
deb7cdcdda v4l2src: Rename pre-set-format signal to prepare-format 2012-04-19 09:50:01 +02:00
Youness Alaoui
06d64c7792 v4l2src: Adding a pre-set-format signal
In order to support UVC H264 encoding cameras, an H264 Probe&Commit
must happen before the normal v4l2 set-format. This new signal is
meant to allow an external application or bin to do it.
It also serves to expose the file descriptor used by v4l2src in case
some custom ioctls need to be called.

Conflicts:

	sys/v4l2/Makefile.am
	sys/v4l2/gstv4l2src.c
	sys/v4l2/v4l2src_calls.c
2012-04-19 09:45:49 +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
01838ff975 v4l2src: don't error in shutdown
Don't log with the ERROR category when we are stopping because we are shutting
down.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=672824
2012-03-26 16:00:42 +02:00
Wim Taymans
cfe58e7156 v4l2: fix latency 2012-03-26 15:51:28 +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
a32d944a38 fix for caps api changes 2012-03-11 19:06:37 +01:00
Wim Taymans
9c789aa434 update for metadata API changes 2012-02-29 17:26:01 +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
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
Wim Taymans
4b8975f867 update for removed property probe 2011-12-21 11:59:46 +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
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
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
75e153bb13 allocation: fix for vmethod changes 2011-08-26 14:20:49 +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
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
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
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
f7c500fe9c v4l2src: add metadata 2011-07-27 13:43:08 +02: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
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
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
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
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
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
b7ad28ba53 v4l2: remove more unused parameters 2011-07-12 18:41:47 +01: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
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
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
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
Rob Clark
6c8268dbfd v4l2: add interlaced support 2010-12-29 11:46:42 -06:00