Commit graph

2053 commits

Author SHA1 Message Date
Wim Taymans 9af2c6c86b basesink: throttle-time is used 2012-05-16 13:24:23 +02:00
Wim Taymans 602bd29960 basesink: add prepare method
Add a prepare method that is called before sync happens. The purpose of this
method is to prepare the rendering of the giving buffer so that the following
render() call after sync is a quick as possible.
2012-05-16 12:08:44 +02:00
Wim Taymans d6e909994c basesrc: avoid potential deadlock
In gst_base_src_start_complete() we do a perform_seek() that will eventually
start the streaming thread which acquires the live lock and then goes to sleep
in the case of appsrc. Right after we perform seek we also try to acquire the
live lock which might then deadlock.

fix this by taking the stream lock before performing the seek. This makes sure
that the streaming thread cannot start and grab the live lock until we are done
and release the stream lock again.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676048
2012-05-16 09:24:45 +02:00
Wim Taymans 05580beb77 docs: fix docs
GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING
2012-05-11 09:14:52 +02:00
Tim-Philipp Müller e73747a7e0 tools, base: don't poke into GstTypeFindFactory struct, use public API 2012-05-01 23:23:41 +01:00
Tim-Philipp Müller ecf74cf2db typefindfactory: add gst_type_find_factory_has_function()
Add API so people don't have to poke the struct for this.
2012-05-01 23:23:41 +01:00
Sebastian Dröge 105fa1ffde basetransform/basesrc: Do bufferpool configuration inside the default decide_allocation() implementation
This allows subclasses to override it, as is necessary for e.g. the
video-crop meta. It is now necessary that after decide_allocation()
there is always a allocator and a configured buffer pool inside the
query.
2012-05-01 13:32:41 +02:00
Wim Taymans 1b87a07d8e adapter: remove _try_to_merge_up()
It causes the timestamp to go wrong, should not cause much of a performance
increase and in the cases where it is faster, it is broken in 0.10 as well.
We should try to review this when rewriting the adapter for 0.11 memory
features.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674791
2012-05-01 10:50:32 +02:00
Wim Taymans aad3812633 adapter: make internals private
Make the adapter fields private.
2012-05-01 09:32:45 +02:00
Stefan Sauer 3de656121f controlbindings: add comments for sparse control source 2012-04-25 20:19:24 +02:00
Stefan Sauer 772c58e255 controller: expand the api to offer functions for plain and GValue arrays
Rename the _get_value_array() functions to _get_g_value_array() and reintroduce
the former to operate on plain unboxed c datatypes (like in 0.10). The _g_value
variants are for bindings while the _value ones are more suited to processing
in elements.
2012-04-25 20:19:23 +02:00
Mark Nauwelaerts 6802189d68 collectpads: do not unref flush_start twice
Based on patch by Matej Knopp <matej.knopp@gmail.com>
2012-04-23 17:04:57 +02:00
Mark Nauwelaerts 6a48006c21 adapter: refresh skip following merge_up attempt
... as the latter might now adjust skip as well.
2012-04-23 16:57:21 +02:00
Mark Nauwelaerts e076e36840 collectpads2: rename to collectpads 2012-04-17 15:07:54 +02:00
Mark Nauwelaerts 9bcb0ea58e adapter: ensure writable head buffer before skipping part of it 2012-04-17 12:54:45 +02:00
Mark Nauwelaerts 304047b13d Merge remote-tracking branch 'origin/0.10'
Conflicts:
	libs/gst/base/gstcollectpads2.c
2012-04-17 12:29:50 +02:00
Mark Nauwelaerts 5823dd4724 collectpads2: always recording incoming segment info if no buffer_func set 2012-04-17 12:23:48 +02:00
Mark Nauwelaerts 225721f578 Merge remote-tracking branch 'origin/0.10'
Conflicts:
	libs/gst/base/gstcollectpads2.c
2012-04-16 16:29:34 +02:00
Mark Nauwelaerts cc21620823 collectpads2: provide query default and callback handling
... which presently mainly serves to answer SEEKING query negatively
to dissuade upstream encoders from doing any seeking and
"header finalization" (since the returned result of pushing a
sticky event is fairly useless nowadays).
2012-04-16 16:24:18 +02:00
Mark Nauwelaerts 994357a16a collectpads2: modify event handling using a default event handler
... that elements should "chain up" to.
2012-04-16 16:24:10 +02:00
Vincent Penquerc'h b642b87579 collectpads2: assume 0 based segment if no time segment was provided
https://bugzilla.gnome.org/show_bug.cgi?id=669305
2012-04-16 11:08:07 +02:00
Matej Knopp 4e7cf4c5c1 Remove skipped part of buffer when mapping the adapter
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674085
2012-04-14 10:25:12 +02:00
Mark Nauwelaerts dad68cb180 basesink: plug caps leak 2012-04-13 12:01:08 +02:00
Edward Hervey 2b49855494 controller: Chain up to parent class dispose/finalize
Avoids leaks
2012-04-12 14:59:52 +02:00
Edward Hervey ff289bbc76 consistencychecker: Use gst_object_{ref|unref} where applicable
Allows us to debug object life
2012-04-12 14:59:31 +02:00
Stefan Sauer f2ffa0fc65 controller: dup the objects to avoid premature frees 2012-04-05 21:17:57 +02:00
Sebastian Dröge b0d89da6b6 gst: Change versioning
Remove GST_MAJORMINOR and replace it by GST_API_VERSION
Also set GST_VERSION_{MAJOR,MINOR,MICRO,NANO} explicitely
now.

All versions are at 1.0.0 now for the release soon but
API/ABI can still change until the 1.0.0 release.

Next release versions until 1.0.0 will be 0.10.9X and
these will be release candidates. GST_VERSION_* will
nonetheless stay at 1.0.0.0.
2012-04-04 14:28:55 +02:00
Mark Nauwelaerts 1e37964202 consistencychecker: allow some more events before a segment event 2012-04-03 18:26:12 +02:00
Edward Hervey 98e1463411 baseparse: always attempt to push if not-linked
This avoids ending up with plenty of pending data (since we'll only
 try to parse/push one frame from the incoming buffer).

Fixes increasing memory consumption when parsers aren't linked

Conflicts:

	libs/gst/base/gstbaseparse.c
2012-04-02 15:27:14 +02:00
Edward Hervey df6d0b0696 baseparse: always attempt to push if not-linked
This avoids ending up with plenty of pending data (since we'll only
 try to parse/push one frame from the incoming buffer).

Fixes increasing memory consumption when parsers aren't linked
2012-04-02 15:17:25 +02:00
Wim Taymans a3d5db491c trans: add transform_ip_on_passthrough
Add an option to control if transform_ip is called in passthrough mode or not.
for elements that don't want to look at the data in passthrough mode, this can
avoid some extra processing, mostly in subclasses.
2012-04-02 11:09:50 +02:00
Wim Taymans d89719a4b3 adapter: use buffer_wrap 2012-03-31 18:34:23 +02:00
Wim Taymans 38b96e6c8c buffer: improve the buffer memory methods
gst_buffer_take_memory -> gst_buffer_insert_memory because insert is what the
method does.
Make all methods deal with ranges so that we can replace, merge, remove and map
a certain subset of the memory in a buffer. With the new methods we can make
some code nicer and reuse more code. Being able to deal with a subset of the
buffer memory allows us to optimize more cases later (most notably RTP headers
and payload that could be in different memory objects).
Make some more convenient macros that call the more generic range methods.
2012-03-30 18:15:24 +02:00
Mark Nauwelaerts a0649dd357 typefindhelper: also unmap collected mapped buffers 2012-03-30 16:53:05 +02:00
Mark Nauwelaerts 096d36e5c5 basetransform: plug caps leak 2012-03-30 16:53:00 +02:00
Sebastian Dröge eadebb172d baseparse: Rename ::event() to ::sink_event() for consistency 2012-03-30 12:03:40 +02:00
Edward Hervey 00feec6068 basesink: lower GST_BASE_SRC_FLAG_LAST
It wouldn't leave that much room for subclass users
2012-03-30 11:49:16 +02:00
Sebastian Dröge 4bffd22394 bytewriter: Actually commit the .c file changes too 2012-03-29 18:03:35 +02:00
Sebastian Dröge d4dcb87c69 bytewriter: Add unchecked/inline variant of gst_byte_writer_put_buffer() 2012-03-29 18:01:11 +02:00
Wim Taymans 9aa9751938 review some docs 2012-03-28 18:12:23 +02:00
Wim Taymans bb876588ac buffer: unify buffer merge methods
Add gst_buffer_append() which appends the memory blocks from one buffer to
another. Remove the old inefficient _merge() and _join() methods which forced a
premature memcpy in most cases.
Remove the _is_span() and _span() methods they are not needed anymore now that
we can _append(). Merging and spanning will be delayed until mapping or maybe
not at all when the element can deal with the different memory blocks.
2012-03-28 12:51:58 +02:00
Mark Nauwelaerts 41e9ca9b17 basetransform: remove automatic and undocumented setting of always_in_place
... which controls how to (forcibly) deal with (non-)writable data and
is not necessarily related to identical caps.

In particular, it is also not so helpful anymore with a more advanced
GstVideoFilter subclass which always has a transform_ip method currently,
even though its subclass may not have a corresponding _ip method.
2012-03-22 15:24:08 +01:00
Wim Taymans 007a00cd1b Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2012-03-22 10:45:06 +01:00
Wim Taymans ab7d8886f0 dist net directory only once 2012-03-21 12:10:21 +01:00
Wim Taymans e017498cb0 baseparse: do queries more directly
Just call our internal query function instead of going through the pad and the
query handler etc.
2012-03-20 17:11:19 +01:00
Wim Taymans f3f209c919 adapter: add some performance debug 2012-03-20 17:11:12 +01:00
Wim Taymans f9c85a53dc pad: improve docs of get/pull_range
Improve the docs of the get/pull_range functions, define the lifetime of the
buffer in case of errors and short reads.
Make sure the code does what the docs say.
2012-03-20 13:14:55 +01:00
Wim Taymans 07c9fba116 basetransform: make more stuff private 2012-03-16 22:51:14 +01:00
Wim Taymans f9c4b70a98 basetransform: small cleanups 2012-03-16 22:25:38 +01:00
Wim Taymans db1318ab4a pad: change the semantics of get/pull_range a little
Make it so that one can specify a buffer for get/pull_range where the downstream
element should write into. When passing NULL, upstream should allocate a buffer,
like in 0.10.
We also need to change the probes a little because before the pull probe, there
could already be a buffer passed. This then allows us to use the same PROBE
macro for before and after pulling.
While we're at the probes, make the query probe more powerful by handling the
GST_PAD_PROBE_DROP return value. Returning _DROP from a query probe will now
return TRUE upstream and will not forward the probe to the peer or handler.
Also handle _DROP for get/pull_range properly by not dispatching to the
peer/handler or by generating EOS when the probe returns DROP and no buffer.
Make filesrc handle the non-NULL buffer passed in the get_range function and
skip the allocation in that case, writing directly into the downstream provided
buffer.
Update tests because now we need to make sure to not pass a random value in the
buffer pointer to get/pull_range
2012-03-16 21:37:10 +01:00