Commit graph

1876 commits

Author SHA1 Message Date
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
René Stadler f6e992cb06 check: drop caps argument from gst_check_setup_{src,sink}_pad
Calling set_caps at that point is not useful in 0.10 (FIXME comment!), and in
0.11 it is totally pointless: the caps event doesn't stick to a flushing pad.
2011-11-24 21:43:31 +01: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
Tim-Philipp Müller bb18ca7fa4 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tools/gst-inspect.c
2011-11-13 13:23:09 +00:00
Tim-Philipp Müller 4d6795dcd1 gst, controller: replace g_list_prepend + reverse with GQueue 2011-11-12 14:57:48 +00: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 08d9f54044 netmeta: avoid using g[u]long in headers 2011-11-10 18:58:35 +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
Wim Taymans ba3028aeeb pad: Add GstPadProbeInfo
Make a new GstPadProbeInfo structure and pass this in the probe callback. This
allows us to add more things later and also allow the callback to replace or
modify the passed object.
2011-11-08 11:04:19 +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 24e596a1fb pad: rework pad probes
Make a separate cookie to detect chancges in the list of probes and keeping
track of what hooks have been invoked yet.
Remove the requirement to have probes on srcpads in push mode and sinkpads in
pull mode.
Add some more debug.
Keep track of what callbacks got executed. If no callback is called and we are a
blocking pad, let the item pass. This allows you to block pads on selected
items only.
Explicitly have an UPSTREAM and DOWNSTREAM PadProbeType. This allows you to only
block the pad on upstream or downstream items.
Add convenience macros to only block on downstream/upstream items.
2011-11-07 17:15:17 +01:00
Stefan Sauer 9a27b9c056 controller: move to core/gstobject
Move the controller to gstobject as a simple delegate. The controller and
controlsource are not classes in core. The controlsources stay separate as a lib
for now. This way we can avoid the qdata lookups.

Also remove controller_init(). There is no more need to link to controller for
elements.

Also sanitize the API. We now have functions to add properties like we had
methods to remove that. That avoids then ref count hacks we had in _new.
2011-11-04 20:11:51 +01: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 80dd206216 net: add net address metadata 2011-11-03 16:46:35 +01:00
Wim Taymans af69a0f296 nettime: clean up header 2011-11-03 14:26:12 +01: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
Tim-Philipp Müller bffc9207b5 pad: rename GstProbeType and GstProbeReturn to GstPadProbe{Type,Return}
Better now than later in the cycle. These might come in handy:

sed -i -e 's/GstProbeReturn/GstPadProbeReturn/g'   `git grep GstProbeReturn  | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_PROBE_/GST_PAD_PROBE_/g'          `git grep GST_PROBE_      | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GstProbeType/GstPadProbeType/g'       `git grep GstProbeType    | sed -e 's/:.*//' | sort -u`
2011-11-01 00:15:17 +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 04d5233287 check: also debug the DTS 2011-10-28 12:26:28 +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
Stefan Sauer 03797b9a12 controller: fix wrong order of calls in the docs. 2011-10-27 10:38:10 +02: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