Wim Taymans [Sat, 3 Dec 2011 06:01:45 +0000 (07:01 +0100)]
basesink: small cleanups
Wim Taymans [Sat, 3 Dec 2011 05:45:26 +0000 (06:45 +0100)]
basesink: merge preroll functions
Inline a function that is only called from one place to make things a little
easier to follow.
Wim Taymans [Sat, 3 Dec 2011 05:29:42 +0000 (06:29 +0100)]
basesink: more cleanups
Don't pass around the object type, we can find that very efficiently from the
object itself now.
Wim Taymans [Fri, 2 Dec 2011 22:13:23 +0000 (23:13 +0100)]
basesink: clean up method names
Wim Taymans [Fri, 2 Dec 2011 21:50:55 +0000 (22:50 +0100)]
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.
Wim Taymans [Fri, 2 Dec 2011 21:36:38 +0000 (22:36 +0100)]
basesink: remove obsolete code
Remove some more code now that the render_object ethod is only
called with buffers or bufferlsts.
Wim Taymans [Fri, 2 Dec 2011 21:20:08 +0000 (22:20 +0100)]
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.
Wim Taymans [Fri, 2 Dec 2011 12:35:58 +0000 (13:35 +0100)]
basesink: small cleanup
Avoid passing around the segment.
Wim Taymans [Fri, 2 Dec 2011 12:28:18 +0000 (13:28 +0100)]
basesink: remove clip_segment
We only need one segment now that the preroll queue is gone.
Wim Taymans [Fri, 2 Dec 2011 11:42:50 +0000 (12:42 +0100)]
basesink: more cleanups
Remove some unneeded functions, inline the code.
Remove the queue_object functions, we can proceed with the rendering
immediately.
Wim Taymans [Fri, 2 Dec 2011 11:20:02 +0000 (12:20 +0100)]
basesink: remove obsolete code
Remove the preroll queue and proceed directly to the rendering of objects.
Tim-Philipp Müller [Thu, 1 Dec 2011 23:35:26 +0000 (23:35 +0000)]
Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
gst/gstbus.c
gst/gstevent.c
libs/gst/base/gstbasetransform.c
Wim Taymans [Thu, 1 Dec 2011 17:50:32 +0000 (18:50 +0100)]
taglist: make some tags of type GstSample
Make the image and attachment tags of type GstSample so that we can include
extra caps and info along with the buffer data.
Wim Taymans [Thu, 1 Dec 2011 17:49:34 +0000 (18:49 +0100)]
sample: remove const
The writability of the structure is ensured by the refcount of the parent
miniobject and we're fine if the parent is writable.
Wim Taymans [Thu, 1 Dec 2011 15:46:06 +0000 (16:46 +0100)]
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.
Wim Taymans [Thu, 1 Dec 2011 15:37:46 +0000 (16:37 +0100)]
sample: add new sample miniobject
Add a new simple miniobject that is a combination of a GstBuffer, GstCaps,
GstSegment and other arbitrary info organized in a GstStructure. This object can
be used to exchange samples between an element and the application or for
storing album art in tags etc.
Stefan Sauer [Thu, 1 Dec 2011 15:25:07 +0000 (16:25 +0100)]
bus: use GST_MESSAGE_SOURCE_NAME() which also takes care of src=NULL.
Wim Taymans [Thu, 1 Dec 2011 14:35:26 +0000 (15:35 +0100)]
basetrans: add some more debug
Wim Taymans [Thu, 1 Dec 2011 14:35:02 +0000 (15:35 +0100)]
basesrc: add some more debug
Wim Taymans [Thu, 1 Dec 2011 14:34:06 +0000 (15:34 +0100)]
buffer: add copy flag for meta
Add a flag to control if the meta should be copied or not instead of always
copying.
Wim Taymans [Tue, 29 Nov 2011 18:08:41 +0000 (19:08 +0100)]
basesink: remove old property
Sebastian Dröge [Wed, 30 Nov 2011 12:59:46 +0000 (13:59 +0100)]
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.
Tim-Philipp Müller [Wed, 30 Nov 2011 12:39:34 +0000 (12:39 +0000)]
info: move FIXME log level after WARNING
So it's now ERROR < WARNING < FIXME < INFO and *:5 becomes *:6.
Tim-Philipp Müller [Wed, 30 Nov 2011 00:24:32 +0000 (00:24 +0000)]
event: warn and fail instead of creating newsegment events in GST_FORMAT_UNDEFINED
Wim Taymans [Tue, 29 Nov 2011 14:53:01 +0000 (15:53 +0100)]
bin: keep the element flags up-to-date
Keep the require/provide_clock flags up to date.
Edward Hervey [Tue, 29 Nov 2011 10:47:34 +0000 (11:47 +0100)]
queue: source and sink pads proxy caps
Tim-Philipp Müller [Mon, 28 Nov 2011 21:15:31 +0000 (21:15 +0000)]
Merge remote-tracking branch 'origin/master' into 0.11
Wim Taymans [Mon, 28 Nov 2011 17:23:41 +0000 (18:23 +0100)]
update for indexable change
Wim Taymans [Mon, 28 Nov 2011 17:12:34 +0000 (18:12 +0100)]
element: add indexable flag
Remove the is_indexable method check and use an element flag to check if the
element can use an index.
Wim Taymans [Mon, 28 Nov 2011 16:50:17 +0000 (17:50 +0100)]
defs: update
Wim Taymans [Mon, 28 Nov 2011 16:22:44 +0000 (17:22 +0100)]
element: use flags for require/provide clock
Remove the _require/_provide_clock() methods and use element flags to mark
elements instead of looking at the implementation of the vmethod.
Wim Taymans [Mon, 28 Nov 2011 15:54:55 +0000 (16:54 +0100)]
element: clean up element flags
Clean up the element flags
Wim Taymans [Mon, 28 Nov 2011 14:35:21 +0000 (15:35 +0100)]
event: add sticky custom quark
Wim Taymans [Mon, 28 Nov 2011 13:24:16 +0000 (14:24 +0100)]
caps: _CAPS_FLAGS_ -> CAPS_FLAG_
Vincent Penquerc'h [Mon, 28 Nov 2011 12:30:15 +0000 (12:30 +0000)]
gstelement: add gst_element_class_add_pad_template_from_static
This function helps ensure the pad template is unreffed
without having to complicate the calling code.
https://bugzilla.gnome.org/show_bug.cgi?id=662664
Wim Taymans [Mon, 28 Nov 2011 12:54:43 +0000 (13:54 +0100)]
pad: Handle sticky event errors
Use GstFlowReturn to internally pass events between pads.
When we sticky events cause an error, translate this error into a GstFlowReturn.
Caps events will, for example, generate a NOT_NEGOTIATED return when the event
function returns an error.
This allows us then to refuse sending buffers if one of the sticky events is
refused and generate a correct error return value.
Wim Taymans [Mon, 28 Nov 2011 12:52:00 +0000 (13:52 +0100)]
tests: don't return FALSE from events
Returning FALSE from the event handler shuts down the sender.
Wim Taymans [Mon, 28 Nov 2011 12:51:11 +0000 (13:51 +0100)]
test: fix refcount error
Edward Hervey [Mon, 28 Nov 2011 10:15:27 +0000 (11:15 +0100)]
gstmeta: Some more docs
Wim Taymans [Mon, 28 Nov 2011 09:55:28 +0000 (10:55 +0100)]
event: add custom downstream sticky event
Tim-Philipp Müller [Mon, 28 Nov 2011 01:12:48 +0000 (01:12 +0000)]
queue2: fix up comment after merge from 0.10
Tim-Philipp Müller [Mon, 28 Nov 2011 01:11:47 +0000 (01:11 +0000)]
Merge remote-tracking branch 'origin/master' into 0.11
Tim-Philipp Müller [Mon, 28 Nov 2011 01:10:20 +0000 (01:10 +0000)]
queue2: fix refactoring of draining-on-eos, munge flow return to FLOW_OK
Tim-Philipp Müller [Mon, 28 Nov 2011 01:00:28 +0000 (01:00 +0000)]
queue2: fix up new bufferlist code for 0.11
Tim-Philipp Müller [Mon, 28 Nov 2011 00:40:55 +0000 (00:40 +0000)]
Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
plugins/elements/gstqueue2.c
Tim-Philipp Müller [Thu, 3 Nov 2011 10:34:49 +0000 (10:34 +0000)]
queue2: add bufferlist support
We want to maintain buffer lists if possible.
Tim-Philipp Müller [Thu, 3 Nov 2011 13:02:36 +0000 (13:02 +0000)]
queue2: split out draining of queue on FLOW_UNEXPECTED into separate function
Tim-Philipp Müller [Thu, 3 Nov 2011 08:55:20 +0000 (08:55 +0000)]
queue2: pass item type enum to _enqueue instead of simple isbuffer boolean
Avoids some unnecessary GST_IS_EVENT()
Matej Knopp [Sun, 27 Nov 2011 19:32:14 +0000 (20:32 +0100)]
caps: fix compilation warning
GST_STATIC_CAPS is missing initializer for GstMiniObject's n_weak_refs and
weak_refs resulting in compilation warning (llvm-gcc -Wall)
https://bugzilla.gnome.org/show_bug.cgi?id=664927
Tim-Philipp Müller [Sun, 27 Nov 2011 22:26:12 +0000 (22:26 +0000)]
Merge remote-tracking branch 'origin/master' into 0.11
Stefan Sauer [Sun, 27 Nov 2011 19:36:31 +0000 (20:36 +0100)]
warnings: avoid set-but-unused warnings with load-save disabled
Matej Knopp [Sat, 26 Nov 2011 16:34:12 +0000 (17:34 +0100)]
baseparse: fix broken default caps query
https://bugzilla.gnome.org/show_bug.cgi?id=664880
Tim-Philipp Müller [Sat, 26 Nov 2011 19:51:37 +0000 (19:51 +0000)]
Merge remote-tracking branch 'origin/master' into 0.11
Tim-Philipp Müller [Sat, 26 Nov 2011 19:45:48 +0000 (19:45 +0000)]
uri: fix wrong G_GNUC_MALLOC
_get_protocols() points to const memory in 0.10
despite the non-const return value.
Tim-Philipp Müller [Sat, 26 Nov 2011 19:44:23 +0000 (19:44 +0000)]
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.
Tim-Philipp Müller [Sat, 26 Nov 2011 18:58:38 +0000 (18:58 +0000)]
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.
Tim-Philipp Müller [Sat, 26 Nov 2011 18:57:44 +0000 (18:57 +0000)]
gst: 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.
Tim-Philipp Müller [Fri, 25 Nov 2011 23:54:57 +0000 (23:54 +0000)]
Merge remote-tracking branch 'origin/master' into 0.11
Stefan Sauer [Fri, 25 Nov 2011 22:15:23 +0000 (23:15 +0100)]
docs: update porting docs.
Tim-Philipp Müller [Wed, 16 Nov 2011 01:04:45 +0000 (01:04 +0000)]
buffer: add gst_buffer_{set,get}_qdata()
Allows people/us to attach arbitrary metadata to buffers.
https://bugzilla.gnome.org/show_bug.cgi?id=664720
API: gst_buffer_set_qdata()
API: get_buffer_get_qdata()
Wim Taymans [Fri, 25 Nov 2011 06:11:24 +0000 (07:11 +0100)]
pad: fix blocking probe emission
If we are dealing with a blocking probe, only then check if one the
blocking flags of the hook matches.
Add some more debug.
Make the pad unit test less racy.
Matej Knopp [Thu, 24 Nov 2011 16:47:09 +0000 (17:47 +0100)]
Add test for PAD_PROBE_TYPE_BLOCK and PAD_PROBE_TYPE_BLOCKING
Wim Taymans [Fri, 25 Nov 2011 04:54:09 +0000 (05:54 +0100)]
utils: fix debug of query result
René Stadler [Thu, 24 Nov 2011 21:52:19 +0000 (22:52 +0100)]
query: fix typo in doc
Causes a warning from the introspection scanner.
René Stadler [Thu, 24 Nov 2011 20:36:12 +0000 (21:36 +0100)]
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.
René Stadler [Thu, 24 Nov 2011 13:07:14 +0000 (14:07 +0100)]
defs: update for byte_writer_put_buffer
Sebastian Dröge [Thu, 24 Nov 2011 10:23:07 +0000 (11:23 +0100)]
Merge branch 'master' into 0.11
Conflicts:
gst/gstpad.c
libs/gst/base/gstbaseparse.c
Sebastian Dröge [Thu, 24 Nov 2011 10:15:29 +0000 (11:15 +0100)]
pad: Remove g_warning() if pad accepted caps that are not a subset of the pad caps
This check is correct but unfortunately it's impossible to implement
in a threadsafe way because the caps could have changed in the meantime.
Fixes bug #659606.
Vincent Penquerc'h [Mon, 3 Oct 2011 11:34:20 +0000 (12:34 +0100)]
multiqueue: check filled state of queues even if another one is empty
This will avoid a case where overrun is never signalled if some
stream never produces any data, causing playbin2 to not end preroll.
https://bugzilla.gnome.org/show_bug.cgi?id=660778
Edward Hervey [Thu, 24 Nov 2011 08:31:14 +0000 (09:31 +0100)]
tests: Check for dataflow with incompatible caps
This test currently fails, but is there to ensure we fix this issue
and keep it fixed, since it completely breaks delayed negotiation
use-cases.
This behaviour started breaking since
dd65aae9a177f7b11dcef0f690a78d698f667cd4
Edward Hervey [Thu, 24 Nov 2011 08:31:02 +0000 (09:31 +0100)]
tests: Add comments to gstpad tests
Edward Hervey [Thu, 24 Nov 2011 08:30:14 +0000 (09:30 +0100)]
tests: Remove "#if 0" block for behaviour that now works
Edward Hervey [Thu, 24 Nov 2011 08:28:32 +0000 (09:28 +0100)]
tests: Remove commented block
This behaviour is actually tested in test_push_unlinked
Tim-Philipp Müller [Thu, 24 Nov 2011 01:06:52 +0000 (01:06 +0000)]
tools: make gst-inspect print a nasty debug message for non-grata property type
Try to eradicate properties of long/ulong/char/uchar type.
Wim Taymans [Wed, 23 Nov 2011 16:50:17 +0000 (17:50 +0100)]
event: add STICKY_MULTY events
Add a new event flag for sticky events so that multiple events of that type can
be stored on a pad at the same time. Change the _get_sticky_event() function to
loop over the multiple events of a type.
Change the foreach function to make it possible to removed and modify the sticky
events on a pad.
Use an variable size array now to store the events. This could later be
optimized some more.
Wim Taymans [Wed, 23 Nov 2011 16:39:43 +0000 (17:39 +0100)]
bus: handle NULL message src in debug
Wim Taymans [Wed, 23 Nov 2011 16:38:24 +0000 (17:38 +0100)]
bufferlist: avoid reading past the array
When the foreach function told us to remove the buffer from the list, decrease
the length of the array or else we might read past the last item in the array.
Sebastian Dröge [Wed, 23 Nov 2011 12:42:56 +0000 (13:42 +0100)]
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.
René Stadler [Wed, 23 Nov 2011 10:03:19 +0000 (11:03 +0100)]
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()
Wim Taymans [Wed, 23 Nov 2011 07:17:36 +0000 (08:17 +0100)]
pad: take peerpad correctly
Don't take the peerpad too early, it might change because of the
probes.
Wim Taymans [Tue, 22 Nov 2011 17:32:51 +0000 (18:32 +0100)]
pad: rework sticky events
Rewrite sticky events, trying to make it a bit more simple.
When sticky events are pushed on a srcpad, store them in the sticky event
array and mark the event with received = FALSE.
When the sticky event is successfully sent to the peer pad, make
received = TRUE.
Keep a PENDING_EVENTS pad flag that is set when one of the events is in
the received = FALSE state for some reason.
when activating a sinkpad, mark all events received = FALSE on the peer
srcpad.
When pushing a buffer, check the PENDING_EVENTS flag and if it is set, push all
events to the peer pad first.
Wim Taymans [Tue, 22 Nov 2011 17:32:23 +0000 (18:32 +0100)]
baseparse: also let caps events go through
Wim Taymans [Tue, 22 Nov 2011 15:43:34 +0000 (16:43 +0100)]
gst: add new flags
Matej Knopp [Mon, 21 Nov 2011 17:56:19 +0000 (18:56 +0100)]
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
Wim Taymans [Tue, 22 Nov 2011 11:46:39 +0000 (12:46 +0100)]
defs: update defs files
Wim Taymans [Tue, 22 Nov 2011 11:45:41 +0000 (12:45 +0100)]
padd return value from _mini_object_replace()
Matej Knopp [Mon, 21 Nov 2011 17:56:19 +0000 (18:56 +0100)]
Fix printf format compiler warnings on OSX/64bit
https://bugzilla.gnome.org/show_bug.cgi?id=664491
Wim Taymans [Mon, 21 Nov 2011 16:46:45 +0000 (17:46 +0100)]
tests: improve pad tests
Wim Taymans [Mon, 21 Nov 2011 16:43:51 +0000 (17:43 +0100)]
pad: fix locking order error
Wim Taymans [Mon, 21 Nov 2011 16:43:04 +0000 (17:43 +0100)]
ghostpad: fix print format
Wim Taymans [Mon, 21 Nov 2011 14:47:01 +0000 (15:47 +0100)]
pad: Add destroy notify to pad functions
Add _full variants of the pad function setters that take a destroy notify.
Make some macros that make the old method name pass NULL to this new
function.
Wim Taymans [Mon, 21 Nov 2011 12:29:05 +0000 (13:29 +0100)]
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.
Wim Taymans [Fri, 18 Nov 2011 17:08:21 +0000 (18:08 +0100)]
docs: update design doc
also fix default alignment value (0 == no-alignment)
Wim Taymans [Fri, 18 Nov 2011 16:27:16 +0000 (17:27 +0100)]
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.
Wim Taymans [Fri, 18 Nov 2011 13:08:45 +0000 (14:08 +0100)]
query: move flags closer to buffering query
Wim Taymans [Fri, 18 Nov 2011 12:46:46 +0000 (13:46 +0100)]
pad: add parent to activate functions
Wim Taymans [Fri, 18 Nov 2011 11:35:46 +0000 (12:35 +0100)]
pad: fix scheduling mode enums
GstPadActivateMode -> GstPadMode
GST_PAD_ACTIVATE_* -> GST_PAD_MODE_*
Wim Taymans [Thu, 17 Nov 2011 15:14:34 +0000 (16:14 +0100)]
typefind: fix for new getrange method signature
gst_type_find_helper_get_range_ext -> gst_type_find_helper_get_range
Wim Taymans [Thu, 17 Nov 2011 11:40:45 +0000 (12:40 +0100)]
pad: add parent to other functions
Add parent to chain, chain_list, getrange and event functions.
Stefan Sauer [Thu, 17 Nov 2011 07:21:05 +0000 (08:21 +0100)]
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.