And only forward the allocation query if we're working in
passthrough mode if no ::propose_allocation is implemented.
In place buffer transformations will change the buffer
content and require explicit handling of all metas.
When _clear gets called between _map and _unmap, buffers
will be unreffed. If the adapter was mapped, memory leaks
may occur.
While calling _clear between _map and _unmap does not seem
like such a great idea, this is possible in the audio
encoder base class, as _clear may be called in _finish_frame.
Since the audio encoder relies on flushing to keep track of
timestamps, delaying flushing till after handle_frame seems
dangerous.
So, we unmap on clear, as the next unmap will do nothing.
This makes _clear safe to call between _map and _unmap,
while avoiding leaking the mapped buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=664133
GstBaseParse was not clearing its adapter on reset causing
problems when a pipeline went for example from PLAYING to NULL
state and then back to PLAYING again. The data from the last
stream would be used in the parser.
https://bugzilla.gnome.org/show_bug.cgi?id=667444
There are many good use cases for GstIndex and we want
to add it back again in some form, but possibly not with
the current API, which is very powerful (maybe too powerful),
but also a bit confusing. At the very least we'd need to
make the API bindings-friendly.
Conflicts:
libs/gst/base/gstbasetransform.c
libs/gst/controller/gstinterpolationcontrolsource.c
libs/gst/controller/gstlfocontrolsource.c
plugins/elements/gstfilesrc.c
Dit not merge controller or basetransform changes.
Conflicts:
gst/gstindexfactory.c
libs/gst/base/gstbasetransform.c
plugins/elements/gstfakesink.c
plugins/elements/gstfakesrc.c
plugins/elements/gstidentity.c
plugins/elements/gstinputselector.c
plugins/elements/gstoutputselector.c
Note: did not merge any of the basetransform changes from 0.10.
Add a method to enable async start behaviour. The subclass can then complete the
start operation from any other thread by caling gst_base_src_start_complete().
The base class can wait for the start to complete with
gst_base_src_start_wait().
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 can't change most of
these in 0.10 because they're part of our API and ABI.
Merge the render_object code with the chain method. It is only called from there
and there are quite a few variables that can be reused to makes things less
confusing.
Add new wait_eos vmethod to wait for the eos timeout before posting the EOS
message on the bus.
Add default event handler. Move the default event actions in there. Call the
event vmethod from the pad event handler. Subclasses are now supposed to chain
up to the parent event handler or unref the event and do their own thing.
Avoid passing unused parameters to functions.
Rename the last-buffer property to last-sample and make it return the new
GstSample type so that we can include caps and timing info in one nice bundle.
This makes sure that we get correct and complete caps. The suggested caps
could be incomplete, e.g. video/x-raw-rgb without any fields, and by
intersecting with the peer caps we get something usable.
Fixes bug #662199.
Using gst_pad_proxy_get_caps() breaks backwards compatibility with old
parsers because it will propagate the other side's fields like "parsed"
and "framed" and also breaks parser/converters.
Fixes bug #664221.
In 0.10, this can be done with a one-liner by using GST_BUFFER_DATA/SIZE with
put_data. A 0.11 user has to resort to gst_buffer_map, which is less convenient
and might require a memcpy internally.
API: gst_byte_writer_put_buffer()
Fixes compiler warnings on OSX:
gstadapter.h:82: warning: type qualifiers ignored on function return type
gstadapter.c:412: warning: type qualifiers ignored on function return type
const gpointer is not the same as gconstpointer or const void *.
https://bugzilla.gnome.org/show_bug.cgi?id=664491
Add the pad mode to the activate function so that we can reuse the same function
for all activation modes. This makes the core logic smaller and allows for some
elements to make their activation code easier. It would allow us to add more
scheduling modes later without having to add more activate functions.
Turns some boolean arguments in the scheduling query to flags, which are easier
to extend and makes the code easier to read.
Make extra methods for configuring and querying the supported scheduling modes.
This should make it easier to add new modes later.
Remove the getcaps function on the pad and use the CAPS query for
the same effect.
Add PROXY_CAPS to the pad flags. This instructs the default caps event and query
handlers to pass on the CAPS related queries and events. This simplifies a lot
of elements that passtrough caps negotiation.
Make two utility functions to proxy caps queries and aggregate the result. Needs
to use the pad forward function instead later.
Make the _query_peer_ utility functions use the gst_pad_peer_query() function to
make sure the probes are emited properly.
Don't rely on the return value of a vmethod to trigger the default
implementation but make a real defaul implementation of the method that the
subclass can chain up to.
Make a default implementation of the transform_caps vmethod so that subclasses
can call into it.
Make a default implementation of transform_size.
Avoid doing something in the vmethod trampoline.
The fixate caps function was not used externally and we have vmethods in the
base classes where it is needed.
Update some docs.
simplify some fixate functions in the base classes. Also pass the untruncated
caps to the vmethod.
... in the extent that a non-waiting pad (so indicated by newsegment)
turns out to provide the best buffer, which is then forced to waiting
for book-keeping purposes, but that should only be temporary.
See bug #415754.
This handles muxing of sparse/subtitle streams and has
lots of cleanup. Still missing is special support for
live streams but this can be added later without breaking
API/ABI.
Based on the version from the videomixer plugin.
https://bugzilla.gnome.org/show_bug.cgi?id=415754
Speeds up negotiation a fair bit on a contrived pipeline
with a dozen colorspace conversions.
Hopefully clears out the cache every time it ought to.
https://bugzilla.gnome.org/show_bug.cgi?id=662291
API: GstBaseParseClass::detect()
This is called with the first buffers until the subclass has finished detection
and only afterwards the original buffers are handled as before. The vfunc allows
detection of the stream format without breaking the upstream framing.
Adds a getcaps function to the sink pad to make parsers propagate
downstream caps restrictions to upstream.
The pipeline "audiotestsrc num-buffers=100 ! faac ! aacparse !
"audio/mpeg, version=(int)4, stream-format=(string)adts" ! filesink"
wouldn't work because aacparse wouldn't propagate the adts restriction
upstream to faac.
This patch adds a default getcaps to the sink pad to simply proxy
downstream caps and also adds a 'get_sink_caps' function pointer
to GstBaseParseClass for subclasses that need more refined getcaps.
https://bugzilla.gnome.org/show_bug.cgi?id=661874
If a class extending basesrc doesn't set blocksize, basesrc
would try to allocate a (guint)-1 sized buffer, which is enormous
and likely would fail.
Avoid it and error out.