Wim Taymans
63d95063a7
basesrc: handle latency event
2012-01-02 15:42:46 +01:00
Tim-Philipp Müller
c61b2ade7b
index: rename GstAssocFlags to GstIndexAssociationFlags
...
Just in case we resurrect this later.
2011-12-30 18:32:59 +00:00
Tim-Philipp Müller
3f11fc0514
base: disable unused index API and make functions static
...
It's simply private helper API for now, until someone
fixes up GstBaseParse not to need it any more.
2011-12-30 18:32:58 +00:00
Tim-Philipp Müller
be04f3945c
index: remove GstIndex and GstIndexFactory for now
...
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.
2011-12-30 18:32:57 +00:00
Tim-Philipp Müller
b193d03c8a
collectpads2: fix up compilation after merge
2011-12-25 12:13:57 +00:00
Tim-Philipp Müller
f6a4af20b2
Merge remote-tracking branch 'origin/master' into 0.11
...
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.
2011-12-25 11:58:12 +00:00
Sebastian Dröge
2f93cee988
basetransform: If the filtered peer caps are already empty error out early
2011-12-20 14:37:09 +01:00
Mark Nauwelaerts
28e9d735bb
collectpads2: add convenience clipping function
...
... which also converts to running time; useful for typical muxer.
2011-12-19 17:45:25 +01:00
Mark Nauwelaerts
78565da18b
basetransform: do not delay sparse stream newsegment updates
2011-12-19 17:39:11 +01:00
Mark Nauwelaerts
b3886b7935
basetransform: suggestion compatible with upstream is not much of a suggestion
...
... in that upstream is already complying with that suggestion.
Fixes #666174 .
2011-12-19 12:34:51 +01:00
Mark Nauwelaerts
eb79c0a835
collectpads2: delay collecting buffer if a pad newly set waiting
...
... as commented; make code correspond to it (again).
2011-12-15 16:51:49 +01:00
Matej Knopp
f4040d3f6b
baseparse: Clear queued frames with other queues
2011-12-12 13:37:25 +01:00
Wim Taymans
768e28e1c4
basesrc: say we handle RECONFIGURE event
...
We handle the RECONFIGURE event so return TRUE from the event handler.
2011-12-10 11:08:22 +01:00
Wim Taymans
e32fa21071
basesrc: stop when negotiation fails
2011-12-09 10:01:16 +01:00
Sebastian Dröge
a6bb6d0fc3
basetransform: Fix code path to come up with possible caps if incompatible caps are provided to buffer_alloc()
...
Previous code could almost never work and this should be slightly
better.
2011-12-08 18:11:43 +01:00
Sebastian Dröge
57573d8705
basetransform: Fall back to upstream provided caps if suggested caps are not supported by the sinkpad
2011-12-08 18:11:43 +01:00
Sebastian Dröge
aad7225eb5
basetransform: Fall back to upstream provided caps if fixation of suggested caps failed
2011-12-08 18:11:43 +01:00
Sebastian Dröge
26a1ac0ce7
basetransform: Refactor gst_base_transform_buffer_alloc() code
...
Don't check if upstream provided caps are compatible with upstream
and don't try to fixate these caps. They must be fixated in any case.
2011-12-08 18:11:42 +01:00
Tim-Philipp Müller
eaa2d81474
Merge remote-tracking branch 'origin/master' into 0.11
...
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.
2011-12-08 00:39:10 +00:00
Vincent Penquerc'h
e7b3305f70
baseparse: do not use a byte value instead of a time value when bisecting
...
This fixes FLAC seeking on some FLAC files.
2011-12-07 17:57:49 +00:00
Sebastian Dröge
7fb67e9d6f
basetransform: If suggested caps are not compatible with upstream try to come up with compatible caps
...
Fixes bug #662199 .
2011-12-07 09:51:42 +01:00
Wim Taymans
ebc25e895f
basesrc: add async start option
...
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().
2011-12-06 14:01:50 +01:00
Wim Taymans
be0e58a637
make some more macros as inline functions
...
Make some macros as inline functions for added type checking.
USe new gst_caps_take() in typefind
2011-12-05 10:24:34 +01:00
Tim-Philipp Müller
a1daf846f3
Merge remote-tracking branch 'origin/master' into 0.11
...
Conflicts:
gst/gstobject.h
libs/gst/check/gstcheck.h
libs/gst/controller/gstcontroller.c
plugins/elements/gstidentity.c
tools/gst-xmlinspect.c
2011-12-04 15:38:09 +00:00
Tim-Philipp Müller
2666450864
Suppress deprecation warnings in selected files, for g_static_rec_mutex_* mostly
...
GStaticRecMutex is part of our API/ABI, not much we can do here in 0.10.
2011-12-04 14:38:26 +00:00
Tim-Philipp Müller
5889260d5a
Work around deprecated thread API in glib master
...
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.
2011-12-04 13:35:38 +00:00
Wim Taymans
543b56c78f
basesink: use dts and pts for sync
...
First use DTS, then fall back to PTS for synchronization.
2011-12-03 07:06:11 +01:00
Wim Taymans
e1b64d971e
basesink: small cleanups
2011-12-03 07:01:45 +01:00
Wim Taymans
f62c3922c2
basesink: merge preroll functions
...
Inline a function that is only called from one place to make things a little
easier to follow.
2011-12-03 06:45:46 +01:00
Wim Taymans
ee15bd7287
basesink: more cleanups
...
Don't pass around the object type, we can find that very efficiently from the
object itself now.
2011-12-03 06:29:42 +01:00
Wim Taymans
64bd0b6416
basesink: clean up method names
2011-12-02 23:13:23 +01:00
Wim Taymans
4be2edeb50
basesink: merge render_object into chain
...
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.
2011-12-02 22:50:55 +01:00
Wim Taymans
cc8359259b
basesink: remove obsolete code
...
Remove some more code now that the render_object ethod is only
called with buffers or bufferlsts.
2011-12-02 22:36:38 +01:00
Wim Taymans
0e38f0dad0
basesink: clean up event handling
...
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.
2011-12-02 22:20:08 +01:00
Wim Taymans
b6335d9505
basesink: small cleanup
...
Avoid passing around the segment.
2011-12-02 13:35:58 +01:00
Wim Taymans
bf4e681f5e
basesink: remove clip_segment
...
We only need one segment now that the preroll queue is gone.
2011-12-02 13:28:18 +01:00
Wim Taymans
621aef1033
basesink: more cleanups
...
Remove some unneeded functions, inline the code.
Remove the queue_object functions, we can proceed with the rendering
immediately.
2011-12-02 12:42:50 +01:00
Wim Taymans
68cc637e87
basesink: remove obsolete code
...
Remove the preroll queue and proceed directly to the rendering of objects.
2011-12-02 12:20:02 +01:00
Wim Taymans
8acc2d9dc7
basesink: last-buffer -> last-sample
...
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.
2011-12-01 16:46:06 +01:00
Wim Taymans
a275d2e863
basetrans: add some more debug
2011-12-01 15:35:26 +01:00
Wim Taymans
d893040aec
basesrc: add some more debug
2011-12-01 15:35:02 +01:00
Wim Taymans
23bec521bf
basesink: remove old property
2011-11-30 14:31:12 +01:00
Sebastian Dröge
e6d2da7cf8
basetransform: Always intersect the suggested sink caps with the peer caps
...
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 .
2011-11-30 14:01:22 +01:00
Wim Taymans
8356be8ae5
update for indexable change
2011-11-28 18:23:41 +01:00
Wim Taymans
d65773b5fa
element: clean up element flags
...
Clean up the element flags
2011-11-28 16:54:55 +01:00
Matej Knopp
396c76a34e
baseparse: fix broken default caps query
...
https://bugzilla.gnome.org/show_bug.cgi?id=664880
2011-11-26 20:03:01 +00:00
Tim-Philipp Müller
2d7f9cfe92
Merge remote-tracking branch 'origin/master' into 0.11
...
Conflicts:
gst/gstbuffer.h
gst/gstbufferlist.h
gst/gstcaps.h
gst/gstdatetime.h
gst/gstelementfactory.h
gst/gstevent.h
gst/gstghostpad.h
gst/gstindexfactory.h
gst/gstiterator.h
gst/gstmessage.h
gst/gstminiobject.h
gst/gstpipeline.h
gst/gstquery.h
gst/gstsegment.h
gst/gststructure.h
gst/gsttaglist.h
gst/gsturi.h
gst/gstvalue.h
libs/gst/base/gstbitreader.h
libs/gst/base/gstbytereader.h
libs/gst/base/gstbytewriter.h
Note: can't use G_GNUC_MALLOC with GstCaps return
values in 0.11 because of the EMPTY+ANY singletons.
2011-11-26 19:44:23 +00:00
Tim-Philipp Müller
4d2cb74850
libs: sprinkle some G_GNUC_MALLOC
...
Maybe gcc can do something clever with that, or at least
warn us if we don't save the return value somewhere.
2011-11-26 18:58:38 +00:00
Sebastian Dröge
1fa356a23c
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstpad.c
libs/gst/base/gstbaseparse.c
2011-11-24 11:23:07 +01:00
Sebastian Dröge
aa9ba2dd4e
baseparse: Return template caps instead of other side's peer caps if get_sink_caps vfunc is not implemented
...
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 .
2011-11-23 13:42:56 +01:00
René Stadler
e694f5e71c
bytewriter: add method to write out a buffer
...
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()
2011-11-23 11:04:00 +01:00
Wim Taymans
b7ea5ca1e0
baseparse: also let caps events go through
2011-11-22 18:40:49 +01:00
Matej Knopp
f33b1397d3
adapter: fix return type of _map() to gconstpointer
...
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
2011-11-22 11:53:42 +00:00
Matej Knopp
6ea74a0572
Fix printf format compiler warnings on OSX/64bit
...
https://bugzilla.gnome.org/show_bug.cgi?id=664491
2011-11-22 00:51:06 +00:00
Wim Taymans
2f1ed65339
pad: Merge pad mode activation functions
...
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.
2011-11-21 13:29:05 +01:00
Wim Taymans
770159fb1c
query: improve scheduling query
...
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.
2011-11-18 17:27:16 +01:00
Wim Taymans
39a5e26ea9
pad: add parent to activate functions
2011-11-18 13:54:29 +01:00
Wim Taymans
12d5f03453
pad: fix scheduling mode enums
...
GstPadActivateMode -> GstPadMode
GST_PAD_ACTIVATE_* -> GST_PAD_MODE_*
2011-11-18 12:39:55 +01:00
Wim Taymans
cb54ab7d90
typefind: fix for new getrange method signature
...
gst_type_find_helper_get_range_ext -> gst_type_find_helper_get_range
2011-11-17 16:15:23 +01:00
Wim Taymans
612b1fbb14
pad: add parent to other functions
...
Add parent to chain, chain_list, getrange and event functions.
2011-11-17 12:40:45 +01:00
Stefan Sauer
009d799087
collectpads: move fields out of reserved and restore padding
...
Do the 0.11 ABI changes. Add extra fields for destroy_notify and drop the qdata
hack. Rename _add_pad_full to _add_pad and remove the old _add_pad.
2011-11-17 08:39:01 +01:00
Wim Taymans
09a8294d36
pad: add parent to the query function
2011-11-16 17:22:56 +01:00
Wim Taymans
54e1174060
GstPadFlags: rename flags GST_PAD_* -> GST_PAD_FLAG_*
2011-11-16 12:36:51 +01:00
Wim Taymans
e85198bc32
_query_peer_*() -> _peer_query_*()
2011-11-15 17:50:34 +01:00
Wim Taymans
2358938dbd
_accept_caps() -> _query_accept_caps()
2011-11-15 17:40:19 +01:00
Wim Taymans
c55962c2d3
_peer_get_caps() -> peer_query_caps()
2011-11-15 17:11:46 +01:00
Wim Taymans
d805f0f034
pad: _get_caps() -> _query_caps()
2011-11-15 16:46:37 +01:00
Wim Taymans
b5c3e254b1
pad: remove getcaps and use caps query
...
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.
2011-11-15 11:20:48 +01:00
René Stadler
cb4ac0cf70
basetransform: fix caps unref in transform_caps filter subset check
...
I did not test this, but the code looked very wrong.
2011-11-12 01:55:45 +01:00
Wim Taymans
841ad590b9
.h: fix header files
...
Ensure correct indentation and retab
Make sure all structure have padding
2011-11-11 17:30:03 +01:00
Wim Taymans
4b216bf73a
adapter: remove flush from _unmap
2011-11-10 18:18:24 +01:00
Wim Taymans
54a9c5d3f8
basesrc: implement a default get_caps function
...
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.
2011-11-10 16:04:55 +01:00
Edward Hervey
deb8e74cad
introspection: Add --warn-all to introspection scanner
...
... and let's get fixing all those docs !
2011-11-10 13:54:02 +01:00
Wim Taymans
11aacfadc8
basetransform: fix vmethods
...
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.
2011-11-10 13:38:58 +01:00
Wim Taymans
4760e1902a
pushsrc: make alloc method a vmethod
2011-11-10 13:36:10 +01:00
Wim Taymans
41bb41616b
basesink: reorder vmethod according to .h file
2011-11-10 12:33:49 +01:00
Wim Taymans
af63938333
basesink: improve comments
2011-11-10 12:33:33 +01:00
Wim Taymans
b3998146c1
basesrc: don't do things in the vmethod trampoline
2011-11-10 12:33:10 +01:00
Wim Taymans
c5ef50d4de
adapter: use gpointer for return types
2011-11-10 11:42:26 +01:00
Wim Taymans
37318a8cd2
pad: remove GstPadFixateCapsFunction
...
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.
2011-11-10 10:58:42 +01:00
Wim Taymans
b7966c0c7d
pad: make an ACCEPT_CAPS query
...
Replace the acceptcaps function with a query.
2011-11-09 17:36:00 +01:00
Wim Taymans
6ed869c9f4
element: remove more query_types
2011-11-09 17:23:37 +01:00
Wim Taymans
6cc7254166
remove query types
...
It was not really useful
2011-11-09 11:47:10 +01:00
Wim Taymans
9c0d8ca718
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstelement.h
gst/gstghostpad.c
gst/gstminiobject.c
2011-11-08 12:54:15 +01:00
Tim-Philipp Müller
16dcd5e958
docs: fix Since: markers for API added after 0.10.35
2011-11-08 00:32:36 +00:00
Wim Taymans
c2c9776027
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstbin.c
2011-11-04 19:11:19 +01:00
Sjoerd Simons
e97eeb5cd4
basetransform: Only use the cached transform on strictly equal caps
...
https://bugzilla.gnome.org/show_bug.cgi?id=663333
2011-11-04 17:49:55 +00:00
Tim-Philipp Müller
2a4fca230f
collectpads2: use flags enum instead of guint in structure
2011-11-03 22:51:57 +00:00
Wim Taymans
6c627481b3
utils: remove _found_tags_ API
...
remove gst_element_found_tags() and gst_element_found_tags_for_pad(), they are
nothing more than a wrapper around gst_pad_push_event()
2011-11-02 12:06:47 +01:00
Wim Taymans
f1b07c580e
Merge branch 'master' into 0.11
...
Conflicts:
common
configure.ac
2011-11-02 10:29:04 +01:00
Wim Taymans
88e12228cf
bufferlist: clean up API
...
gst_buffer_list_len() -> gst_buffer_list_length()
gst_buffer_list_sized_new() -> gst_buffer_list_new_sized()
2011-11-02 08:59:43 +01:00
Tim-Philipp Müller
cf69ce1df6
adapter: simplify gst_adapter_take_list()
...
Use a stack-allocated GQueue to assemble our GList.
2011-11-01 14:17:21 +00:00
Tim-Philipp Müller
4f004eff38
pad: rename GstActivateMode to GstPadActivateMode
...
These might be useful:
sed -i -e 's/GstActivateMode/GstPadActivateMode/g' `git grep GstActivateMode | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_ACTIVATE_/GST_PAD_ACTIVATE_/g' `git grep GST_ACTIVATE_ | sed -e 's/:.*//' | sort -u`
2011-11-01 00:25:02 +00:00
René Stadler
de58242760
basetransform: fix crash/warning in find_transform when pad is unlinked
...
Looks like the revert conflict in commit a44271 was resolved incorrectly.
2011-10-31 19:27:07 +01:00
Tim-Philipp Müller
4e7944b0b9
taglist: rename _new() to _new_empty() and new_full*() to new*()
2011-10-30 22:24:25 +00:00
René Stadler
c7fba914a0
basetransform: fix invalid access to unreffed allocation query
2011-10-28 21:42:10 +02:00
Sebastian Dröge
5385f27594
bytewriter: Add padding
2011-10-28 13:02:26 +02:00
Sebastian Dröge
1cb711c1ae
bitreader: Add padding
2011-10-28 13:02:19 +02:00
Sebastian Dröge
e3d4875af5
bytereader: Add padding
2011-10-28 13:02:10 +02:00
Wim Taymans
a495701900
adapter: use pts/dts on buffers
2011-10-28 12:26:28 +02:00
Sjoerd Simons
1aa5b76a6f
basetransform: Also fush the cache when changing the upstream caps suggestion
2011-10-28 11:53:32 +02:00
Sjoerd Simons
383d637f85
basetransform: Add debug output when returning a cached transform
2011-10-28 11:50:23 +02:00
Wim Taymans
b8e1506b08
Merge branch 'master' into 0.11
2011-10-28 11:33:44 +02:00
Wim Taymans
f2102d386f
coolectpads2: port to 0.11
2011-10-28 11:30:57 +02:00
Wim Taymans
d110c4db31
Merge branch 'master' into 0.11
2011-10-28 11:13:55 +02:00
Sebastian Dröge
1eb3380973
collectpads2: Fix refcount handling if a buffer was dropped due to clipping
2011-10-28 10:54:19 +02:00
Sebastian Dröge
2f100e86f6
collectpads2: Merge the clip and prepare_buffer function into one
2011-10-28 10:38:24 +02:00
Sebastian Dröge
415f3dd808
collectpads2: Merge clipping API from old collectpads
2011-10-28 10:38:24 +02:00
Tim-Philipp Müller
ab2d45283e
basesink: make default query function name show up in gst-inspect
2011-10-28 09:28:14 +01:00
Mark Nauwelaerts
ce88f417b1
collectpads2: avoid hanging in case of sparse newsegment events
...
... 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 .
2011-10-28 09:39:00 +02:00
Sebastian Dröge
2a13275985
collectpads2: Use G_DEFINE_TYPE instead of GST_BOILERPLATE
2011-10-28 09:38:35 +02:00
Sebastian Dröge
6f231f89d6
base: Add collectpads2
...
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
2011-10-28 09:36:06 +02:00
Wim Taymans
852851edab
Merge branch 'master' into 0.11
...
Conflicts:
libs/gst/base/gstbasetransform.c
2011-10-27 15:27:19 +02:00
Jan Schmidt
9a5109b86e
basetransform: Fix refcount leak
...
Don't leak peercaps and a ref to the basetransform when returning
the cached caps.
2011-10-27 23:08:14 +11:00
Edward Hervey
df6044f7eb
Merging origin/master
...
Conflicts:
gst/gstbin.c
gst/gstbus.c
gst/gstdebugutils.c
gst/gstpad.c
libs/gst/base/gstbaseparse.c
libs/gst/base/gstbasesrc.c
2011-10-21 10:52:46 +02:00
Sebastian Dröge
b046ba6e3a
baseparse: Fix documentation, it's pre_push_frame and not pre_push_buffer
2011-10-20 16:59:01 +02:00
Vincent Penquerc'h
168e5c0abb
basetransform: cache transformed caps where appropriate
...
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
2011-10-20 16:54:27 +02:00
Sebastian Dröge
64493d9603
basebarse: Add detect vfunc to allow subclasses to do format detection before anything else
...
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.
2011-10-20 11:48:24 +02:00
Thiago Santos
4c1397d572
baseparse: add since doc to new getcaps function
2011-10-18 18:58:14 -03:00
Stefan Sauer
2e6b434730
logging: more logging and prefer human readable details over memory locations
2011-10-18 15:24:21 +02:00
Thiago Santos
e3f2d7db71
baseparse: add getcaps function
...
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
2011-10-18 08:04:31 -03:00
Wim Taymans
f08b2203c8
basesrc: also update the stream time
2011-10-18 12:39:03 +02:00
Sebastian Dröge
1eb73339b9
baseparse: Fix handling of queued frames
...
gst_base_parse_push_frame() already frees the frame, no need to
do it another time again.
2011-10-18 10:58:57 +02:00
Wim Taymans
216a877825
baseparse: remove the memory from the tmpbuf
...
We use a tmpbuf to hold a temporary pointer to the adapter memory. We need to
remove that memory when we no longer need it.
2011-10-17 17:04:10 +02:00
René Stadler
4b79582925
basesrc: fix caps leak
2011-10-13 12:23:59 +02:00
Wim Taymans
cdd3c303f1
basesrc: properly adjust start time
...
When we do a non-flushing seek and closed the current segment,
make sure that we open the next segment from where we closed.
2011-10-12 17:17:53 +02:00
Edward Hervey
ece5909804
basetransform: Fix a caps leak and move a codeblock
...
The result from the block of code that was moved would only have
been used if 'peercaps' was present.
2011-10-11 13:51:54 +02:00
Thiago Santos
59319194b8
basesrc: avoid trying to alloc enormous buffer
...
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.
2011-10-10 12:28:46 -03:00
Wim Taymans
ea012d3dd7
pad: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS
2011-10-10 11:33:51 +02:00
Tim-Philipp Müller
434e7042d8
base: make GstDataQueue private API for multiqueue
...
There's no code that uses it other than multiqueue, so make it private
to multiqueue for now. That way we can also do optimisations that
require API/ABI breaks. If anyone ever wants to use it, we can still
make it public again.
2011-10-07 13:54:37 +01:00
Wim Taymans
c6f005fef1
Merge branch 'master' into 0.11
2011-10-06 17:27:47 +02:00
Mark Nauwelaerts
49bd7b40ca
baseparse: send duration message when updating internal duration
2011-10-06 14:47:54 +02:00
Wim Taymans
544aa9773a
Merge branch 'master' into 0.11
2011-10-04 17:39:17 +02:00
Stas Sergeev
fafbc109f1
baseparse: Return success if optional start/stop method is not provided
...
This allows to not implement the optional start/stop methods.
2011-10-03 11:40:36 +02:00
Wim Taymans
4f8bb4085f
Merge branch 'master' into 0.11
...
Conflicts:
libs/gst/base/gstbaseparse.c
2011-10-03 10:06:17 +02:00
Tim-Philipp Müller
0ac0b70c15
baseparse: make estimating the position in query handler actually work
...
No point estimating if we don't set the result afterwards.
2011-09-30 15:25:20 +01:00
Vincent Penquerc'h
f94701261a
baseparse: answer position query in stream time and try upstream first
...
Let the demuxer have first say as well.
https://bugzilla.gnome.org/show_bug.cgi?id=659485
2011-09-30 15:23:33 +01:00
Wim Taymans
47f77a9e24
transform: fix after merge
2011-09-28 11:28:25 +02:00
Wim Taymans
99d4a57d7c
Merge branch 'master' into 0.11
2011-09-28 11:24:42 +02:00
Wim Taymans
947276484f
docs: fix some more docs
2011-09-28 11:16:33 +02:00
Vincent Penquerc'h
01172b8126
basetransform: send delayed events earlier
...
Some elements (such as videorate) might push buffers early,
for instance in in transform_ip. We want events (and in particular
any NEWSEGMENT event) to be pushed before that.
This fixes transmageddon wedging on converting a file starting
with a non zero offset to Ogg.
https://bugzilla.gnome.org/show_bug.cgi?id=660165
2011-09-27 12:00:23 +02:00
Edward Hervey
10e7159cf8
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstcaps.c
gst/gstpad.c
libs/gst/base/gstbasesink.c
libs/gst/base/gstbasesink.h
libs/gst/base/gstbasetransform.c
2011-09-23 13:09:25 +02:00
Vincent Penquerc'h
56b3acb043
basetransform: delay serialized events when src caps are not set yet
...
https://bugzilla.gnome.org/show_bug.cgi?id=659571
2011-09-21 13:22:02 +02:00
Nicolas Dufresne
f0219b327d
basesink: make it easy to override the pad query
...
Add a vmethod to handle the pad query.
Install a default handler for the pad query.
Use the new query function in filesink
2011-09-08 14:46:59 +02:00
Sebastian Dröge
a44271899c
Revert "Revert "basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible""
...
This reverts commit 0bc6d49c95
.
Conflicts:
libs/gst/base/gstbasetransform.c
2011-09-08 14:39:30 +02:00
Sebastian Dröge
43538e2e75
Merge branch 'master' into 0.11
...
Conflicts:
docs/design/draft-buffer2.txt
docs/design/part-TODO.txt
docs/design/part-block.txt
docs/design/part-bufferlist.txt
docs/design/part-caps.txt
docs/design/part-element-transform.txt
docs/design/part-events.txt
docs/design/part-negotiation.txt
gst/gstcaps.c
gst/gstevent.h
gst/gstghostpad.c
gst/gstinterface.c
gst/gstpad.c
gst/gstpad.h
gst/gstutils.c
libs/gst/base/gstbasesink.c
libs/gst/base/gstbasesrc.c
libs/gst/base/gstbasetransform.c
libs/gst/base/gsttypefindhelper.c
plugins/elements/gstcapsfilter.c
plugins/elements/gsttee.c
tests/check/generic/sinks.c
tools/gst-launch.1.in
2011-09-08 14:28:23 +02:00
Sebastian Dröge
0bc6d49c95
Revert "basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible"
...
This reverts commit 5e5cc5e89e
.
See bug #658541 .
2011-09-08 13:42:52 +02:00
Piotr Fusik
14f5518f3d
docs, gst: typo fixes
...
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Sebastian Dröge
a121713f0c
basetransform: If there's no peer we still have to transform ANY caps in getcaps()
...
Otherwise elements like capsfilter will return ANY caps if no
peer is present instead of the filter caps. The transform_caps()
vfunc could do transformations to the template caps that do not
result in the unmodified template caps.
2011-09-07 16:05:07 +02:00
Sebastian Dröge
5e5cc5e89e
basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible
2011-09-06 12:37:16 +02:00
Wim Taymans
5cf8e68944
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstmessage.c
gst/gstquery.c
gst/gstregistrychunks.c
gst/gstsegment.c
libs/gst/base/gstbasetransform.c
libs/gst/base/gstbasetransform.h
libs/gst/base/gsttypefindhelper.c
plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +02:00
Wim Taymans
d924c30f5b
base: rename allocation vmethods
...
Name the allocation vmethod on srcpad decide_allocation because source pads will
have to decide what allocation parameters will be used.
Name the allocation vmethod on sinkpads propose_allocation because they will
need to configure the allocation query with a proposed values for upstream.
2011-08-26 14:18:33 +02:00
Josep Torra
306e317ae9
typefind: add GST_TYPE_FIND_NONE and use it
...
Fixes warning #188 : enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Josep Torra
81794a4248
baseparse: use the enum values for 0 and don't abuse on gboolean coincidence
...
Fixes warning #188 : enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Josep Torra
ab3c6173b3
baseparse: put the arguments of g_return_val_if_fail in the proper order
2011-08-26 14:11:15 +02:00
Sjoerd Simons
0c0dc0441f
basetransform: Fix bodged previous commit
2011-08-26 13:02:34 +01:00
Sjoerd Simons
888e6a91a4
basetransform: Use GstPadDirection in the query vfunc
...
Wim suggested that using GstPadDirection instead of a GstPad in the
arguments to the new query vfunc would be more consistent with the other
functions.
2011-08-26 12:43:13 +01:00
Wim Taymans
5c8efa9ffe
basetransform: remove some unused variables
2011-08-26 12:28:28 +02:00
Wim Taymans
b91a5ab60a
basetransform: add vmethod to configure upstream bufferpool
...
Add a vmethod that can be implemented to influence the bufferpool that upstream
elements will use.
2011-08-26 11:44:12 +02:00
Wim Taymans
f1566e85c0
basetransform: use pad direction like other vmethods
2011-08-26 11:24:42 +02:00
Wim Taymans
31b70ea701
Merge branch 'master' into 0.11
...
Conflicts:
libs/gst/base/gstbasetransform.c
libs/gst/base/gstbasetransform.h
2011-08-26 11:09:07 +02:00
Sjoerd Simons
63a21ca8b1
BaseTransform: Add a query vfunc
2011-08-26 10:39:44 +02:00
Wim Taymans
b5ef693e88
buffer: always copy all buffer flags when asked
...
Don't try to be smart and copy only a subset of buffer flag
2011-08-25 16:20:21 +02:00
Wim Taymans
d8d7c62789
basesink: remove preroll-queue-len property
...
Remove the preroll-queue-len property and move its variables to a private
section so that we can remove them later.
2011-08-25 12:38:58 +02:00
Wim Taymans
6f295dc239
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstobject.c
2011-08-24 10:43:09 +02:00
Mark Nauwelaerts
c1988b7e55
basesink: ensure start_time reset upon flush
2011-08-23 18:21:38 +02:00
Wim Taymans
8170c34c94
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstbuffer.h
gst/gstcaps.c
gst/gstcaps.h
gst/gstevent.c
2011-08-22 12:33:35 +02:00
Tim-Philipp Müller
c7f2e85d86
baseparse: don't use == in debug string
...
It messes up GST_DEBUG=*:5 make foo/bar.valgrind, because
our Makefile looks for '==' as marker of valgrind output.
2011-08-18 20:46:01 +01:00
Tim-Philipp Müller
7043bf9d55
baseparse: fix crash on seek from streaming thread on newsegment event
...
Event if it's not allowed, we can easily prevent it, so let's do
that.
https://bugzilla.gnome.org/show_bug.cgi?id=656771
2011-08-18 20:44:01 +01:00
Wim Taymans
6b876ebf82
basesrc: add default fixate function
...
Add a default fixate function which does gst_caps_fixate() because
gst_pad_fixate() does not do that anymore.
2011-08-17 17:16:21 +02:00
Wim Taymans
e4db8d0f55
docs: improve some docs
2011-08-17 09:25:04 +02:00
Wim Taymans
8698a8c94e
buffer: rename PREROLL -> LIVE flag
...
Rename the GST_BUFFER_FLAG_PREROLL to GST_BUFFER_FLAG_LIVE and give the new flag
a meaning. The old PREROLL flag never had a clear meaning.
2011-08-16 17:32:20 +02:00
Josep Torra
178bdccb76
Fix and clarify debug statements
...
Fixes build on MacOSX
Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
2011-08-10 11:01:58 +02:00
Wim Taymans
10485ea803
basesrc: add alloc vmethod
...
Make an alloc vmethod so that subclasses can override or call the default
implementation when they want.
2011-08-04 18:00:02 +02:00
Wim Taymans
dc096f39d1
basesrc: cleanups and mark reconfigure
...
Don't abuse the result variable.
Mark the srcpad with a reconfigure so that negotiation happens.
2011-08-04 17:12:47 +02:00
Wim Taymans
6bae6b8253
basesrc: remove negotiation from the state change
...
Remove the negotiation from the state change function, it causes data transfer
and bufferpool negotiation, which is not supposed to be done. Since we have the
reconfigure state on the pad, the create function will do the negotiation as
soon as it gets in the streaming thread.
2011-08-04 16:56:42 +02:00
Wim Taymans
fd75c12631
basesrc: expose set_caps method
...
Expose a previously static method so that custom negotiate implementation can
call it and do the right thing.
2011-08-04 16:34:49 +02:00
Wim Taymans
21ea3fdd96
basesrc: PAUSED<->PLAY doesn't change pool state
...
Don't change the state of the bufferpool when going between PAUSED and PLAYING,
it will dealloc and realloc all buffers, which is clearly too invasive. We will
need to add some other way of unblocking the bufferpool.
2011-08-04 13:48:11 +02:00
Tim-Philipp Müller
913e5e310c
base: update for query API changes
2011-07-28 11:24:19 +01:00
Wim Taymans
cf18fa9ce5
Merge branch 'master' into 0.11
2011-07-27 12:50:39 +02:00
Wim Taymans
83e057cdc1
basetransform: add more comments
2011-07-27 12:49:40 +02:00
Wim Taymans
c266912124
basetrans: also pass allocation query in in_place
...
When we are doing an in_place transform, don't do the allocation query but let
the upstream element decide.
2011-07-27 12:45:17 +01:00
Evan Nemerson
cf6b41aa78
base: add missing (out) annotation for byte reader/writer functions
...
https://bugzilla.gnome.org/show_bug.cgi?id=655381
2011-07-27 10:12:33 +01:00
Wim Taymans
6b0a490740
basesrc: add some more debug info
2011-07-26 14:37:51 +02:00
Wim Taymans
32841d258d
basesink: make it easy to override the pad query
...
Add a vmethod to handle the pad query.
Install a default handler for the pad query.
Add a vmethod to setup the allocation properties.
Use the new query function in filesink
2011-07-26 12:21:38 +02:00
Wim Taymans
36de9b92a1
basesrc: improve docs
2011-07-26 12:20:55 +02:00
Wim Taymans
c887dd41f8
basesrc: use DEBUG instead of ERROR for logging
...
Don't use the ERROR log category because the allocation failure migh only be
bacause of a state change.
2011-07-25 12:49:24 +02:00
Wim Taymans
2ff17fb622
basetransform: fix sink event handling
...
Implement the sink event handling like the src event handler. Make the default
implementation parse and forward the event. This makes it possible to actually
return an error value from the event handler.
2011-07-22 21:17:42 +02:00
Wim Taymans
5dde10f0e4
basetransform: handle failures
...
Handle failure to activate the bufferpool.
2011-07-22 19:19:59 +02:00
Wim Taymans
8059ab109a
basetrans: improve debugging.
2011-07-22 19:11:56 +02:00
Wim Taymans
85d2355125
basetrans: Remove ref in passthrough
...
Remove the requirement to have to return a ref to the input buffer when in
passthrough mode. This saves a few ref/unref cycles and fixes another 0.11
FIXME.
2011-07-21 17:42:08 +02:00
Wim Taymans
70d13ae70e
basetransform: make new copy_metadata vmethod
...
Make a new copy_metadata vmethod and move the code to copy the timestamps, flags
and offsets into a default implementation. This will allow us to give the
subclasses a chance to override the copy method.
2011-07-21 17:29:13 +02:00
Wim Taymans
92aa4fede9
Merge branch 'master' into 0.11
...
Conflicts:
libs/gst/base/gstbaseparse.c
libs/gst/base/gstbasesink.c
2011-07-21 16:49:13 +02:00
Wim Taymans
2763f2bdcd
basetrans: avoid intermediate method
...
Simply call the prepare_output_buffer method instead of calling an intermediate
function.
2011-07-21 16:39:04 +02:00
Wim Taymans
f8e75ce406
basetransform: move the metadata copy code
...
Move the metadata copy code to the default prepare_output_buffer implementation.
2011-07-21 16:30:07 +02:00
Wim Taymans
5253a52cb2
basetransform: move prepare_output_buffer code
...
Move the code for prepare_output_buffer to a default implementation. this allows
us to simplify some things and have subclasses call into the default
implementation when needed.
2011-07-21 15:49:00 +02:00
Wim Taymans
560c3d7fbc
basetransform: only get size for debug
2011-07-21 15:48:25 +02:00
Wim Taymans
f1f2a2ff18
basetrans: fix comment and warn
...
Emit a warning in the debug log when something seems weird.
2011-07-21 14:18:30 +02:00
Wim Taymans
3bb167a1bf
basetransform: only get caps for size transform
...
Delay getting the caps until we need to call the transform_size function.
2011-07-21 14:14:58 +02:00
Wim Taymans
e4ee356449
basetrans: remove useless variables from prepare_output_buffer
...
Remove the caps and size from the prepare_output_buffer function. with
bufferpools and capsnego done differently, we don't need this in most cases and
if we do, we can simply use the transform_size function and get the caps from
the srcpad.
2011-07-21 13:56:11 +02:00