Commit graph

145 commits

Author SHA1 Message Date
Stefan Sauer
7eea54d6a1 collectpads: mention the query function in the docs as well 2017-10-15 15:59:11 +02:00
Stefan Sauer
7a4df51b08 collectpads: correct some comments and add more logging
Add more logging to analyze event handling (especially failure cases).
2017-07-09 21:17:43 +02:00
Sebastian Dröge
daa98fc02a gst: Don't ref_sink() GstObject subclasses in instance_init/constructor
This is something bindings can't handle and it causes leaks. Instead
move the ref_sink() to the explicit, new() constructors.

This means that abstract classes, and anything that can have subclasses,
will have to do ref_sink() in their new() function now. Specifically
this affects GstClock and GstControlSource.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:37 +03:00
Thibault Saunier
a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Nicolas Dufresne
eab0e76268 Revert "collectpads: Assume PTS is equal DTS if PTS is missing"
This reverts commit 9b0d42ceec.

https://bugzilla.gnome.org/show_bug.cgi?id=762207
2016-10-24 11:54:34 -04:00
Aurélien Zanelli
ec2723d366 collectpads: add g-i transfer annotations to peek/pop/read_buffer/take_buffer functions
https://bugzilla.gnome.org/show_bug.cgi?id=768948
2016-07-20 12:34:00 +01:00
Nicolas Dufresne
9b0d42ceec collectpads: Assume PTS is equal DTS if PTS is missing
This is the best guess we can make if such a buffer reached the collect
pad. This is uncommon, we do expect parsers to have tried and fixed that
if possible (or needed).

https://bugzilla.gnome.org/show_bug.cgi?id=762207
2016-03-24 14:29:47 +02:00
Thiago Santos
42d45a0f40 collectpads: handle buffer with dts-only when mapping to running time
Otherwise the buffer was left with the original values and later would
be compared with other buffers that were converted to runninn time,
leading to bad interleaving of multiple streams.

https://bugzilla.gnome.org/show_bug.cgi?id=757961
2015-11-14 10:50:35 -03:00
Edward Hervey
16458daddb collectpads: Use GST_BUFFER_DTS_OR_PTS
Simplifies code a bit
2015-10-27 08:33:41 +01:00
Nicolas Dufresne
32900408c1 gi: Set collectpads function param scope 2015-06-13 13:48:03 -04:00
Nicolas Dufresne
51549bf6ba collectpads: Don't initially send an invalid DTS
Sending a possibly invalid DTS may confuse the muxers, which will
then think the DTS is going backward.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:20:16 -04:00
Nicolas Dufresne
b5e4f7bd9d collectpads: Add negative DTS support
Make gst_collect_pads_clip_running_time() function also store the
signed DTS in the CollectData. This signed DTS value can be used by
muxers to properly handle streams where DTS can be negative initially.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:20:16 -04:00
Tim-Philipp Müller
68012b4d23 collectpads: avoid multiple calls to gst_buffer_get_size() in macro 2015-03-14 16:02:03 +00:00
Sebastian Dröge
154eefecc9 Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.

Also normalize booleans in a few places.
2014-12-01 09:51:37 +01:00
Jan Schmidt
33e65d9358 collectpads: Use GST_PTR_FORMAT in debug to output buffer details
Use %GST_PTR_FORMAT instead of %p in debug output so all the buffer
details are output
2014-10-08 01:33:51 +11:00
Evan Nemerson
5abc82e9f3 introspection: Assorted minor introspection and documentation fixes
https://bugzilla.gnome.org/show_bug.cgi?id=732534
2014-07-01 09:03:41 +02:00
Evan Nemerson
eebff7b048 base: assorted introspection fixes and additions
https://bugzilla.gnome.org/show_bug.cgi?id=731542
2014-06-26 18:55:26 +02:00
Evan Nemerson
c38f3254f8 base: add (nullable) annotations to return values
https://bugzilla.gnome.org/show_bug.cgi?id=731542
2014-06-26 18:55:25 +02:00
Evan Nemerson
25af4ad652 base: use correct syntax in documentation more consistently
Previously, many constants were prefixed with # or unprefixed,
some functions and macros were prefixed with # instead of suffixed
with (), etc.

https://bugzilla.gnome.org/show_bug.cgi?id=731293
2014-06-06 15:09:21 -04:00
Tim-Philipp Müller
6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Mathieu Duponchelle
d784d59262 collectpads: When seek flushed, immediately set eospads to 0
This prevents situations where a first branch would get seeked and
receive a buffer before all branches got seeked, and thus collected
would get called based on EOS from the previous segment.

As a consequence, during the process of seeking, don't decrease
the eospads number when a FLUSH_STOP is received.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724571
2014-03-16 18:15:17 +01:00
Sebastian Dröge
595481c759 collectpads: Unref peer pad 2014-03-16 17:47:38 +01:00
Mathieu Duponchelle
c86e53ab77 collectpads: Forward seek events to the peer directly
Taken from the adder seek handling code.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726461
2014-03-16 17:47:38 +01:00
Brendan Long
f85c1c4648 gst: clear floating references for GstTask, GstTaskPool and GstCollectPads
https://bugzilla.gnome.org/show_bug.cgi?id=710342
2014-02-06 22:50:53 +01:00
Wim Taymans
888ab23968 collectpads: take offset into account for expected segment position
The firt valid segment position is start + offset.
Also add some more debug and a FIXME
2014-01-08 15:04:00 +01:00
Sebastian Rasmussen
b40fa2b8c3 docs: cosmetic changes in references/decriptions
* fix typo GstBufferFlag -> GstBufferFlags
 * fix typo GstFeatures -> GstCapsFeatures
 * fix typo GstAllocatorParams -> GstAllocationParams
 * fix typo GstContrlSources -> GstControlSource
 * do not refer to gstcheck as an object
 * make references gtk_init() and tcase_set_timeout() not be references
 * gst_element_get_pad() renamed gst_element_get_static_pad()
 * gst_clock_id_wait_async_full() renamed gst_clock_id_wait_async()
 * _drop_element() is really gst_queue_array_drop_element()
 * gst_pad_accept_caps() was removed, do not refer to it
 * separate GST_META_TAG_MEMORY_STR declaration from description
 * do not describe removed gst_collect_pads_collect()
 * correctly link to GstElementClass' virtual set_context()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-02 21:01:08 +00:00
Sebastian Dröge
959e87cf2a collectpads: Always send SEEK events to all pads, even if one fails 2013-11-11 16:50:42 +01:00
Sebastian Dröge
911af13b5c collectpads: Update documentation for flushing seek handling 2013-11-11 16:50:42 +01:00
Sebastian Dröge
6250120d76 collectpads: Don't leak seek events 2013-11-11 16:50:42 +01:00
Alessandro Decina
7aec5739eb collectpads: implement flushing seek support
Implement common flushing seek logic in GstCollectPads. Add new
API so that elements can opt-in to using the new logic
(gst_collect_pads_src_event_default) and can extend it
(gst_collect_pads_set_flush_function) to flush any internal
state.

See https://bugzilla.gnome.org/show_bug.cgi?id=706779 and
https://bugzilla.gnome.org/show_bug.cgi?id=706441 for the
background discussion.

API: gst_collect_pads_set_flush_function()
API: gst_collect_pads_src_event_default()

https://bugzilla.gnome.org/show_bug.cgi?id=708416
2013-11-11 16:50:42 +01:00
Thibault Saunier
0564c1c2b8 collectpads: Call the collected function while it returns FLOW_OK
This allows us to make sure the elements is EOS and does not have
remaining buffers to be drained.

https://bugzilla.gnome.org/show_bug.cgi?id=709637
2013-10-09 20:29:02 -03:00
Sebastian Dröge
20f1c96c89 collectpads: Make sure that the object lock is always taken when accessing the private pad list
https://bugzilla.gnome.org/show_bug.cgi?id=708636
2013-09-24 10:44:34 +02:00
Mathieu Duponchelle
c79e5bbcad collectpads: Use private pad list in set_flushing_unlocked
pads->data is the public list. It is dynamically rebuilt at each call to
check_collected, in check_pads to be specific. When you add a pad and
collectpads have been started, it is not added to the public list.

Thus there exists a possible race where :

1) You would add a pad to collectpads while running.
2) You set collectpads to flushing before check_collected has been called again
-> the pad is not set to flushing
3) the pad starts pushing data as downstream might not be prepared, in the case
of adder it then returns FLOW_FLUSHING.
4) elements like demuxers, when they get a FLOW_FLUSHING, stop their tasks,
never to be seen again.

https://bugzilla.gnome.org/show_bug.cgi?id=708636
2013-09-24 10:44:34 +02:00
Zaheer Abbas Merali
d1d99af229 collectpads: Don't unref NULL GstCollectData
If a pad is removed while a collectpads element (say adder) is in a chain
function waiting to be collected, there is a possibility that an unref happens
on a NULL pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=707536
2013-09-05 14:15:30 +02:00
Nicolas Dufresne
4656d18fd5 Add few missing allow-none annotation 2013-07-03 14:25:07 -04:00
Douglas Bagnall
39716e555b GstCollectPads documentation: gst_collect_pads_read is gone. 2013-04-11 10:39:25 +02:00
David Schleef
f671bd2754 collectpads: take DTS into account
Importantly, this patch converts DTS to running time.  Less importantly,
and possibly a problem for some muxers, is that it orders buffers by
DTS (if it is valid, otherwise PTS).  This is generally correct, but
might be somewhat surprising to muxers.

Also note that once converted to running time, DTS can end up negative.
2013-03-02 10:42:01 -08:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Jan Schmidt
b674a737b0 collectpads: Clarify docs about the buffer handler callback.
Clarify that the callback owns a ref on a passed buffer.
2012-10-30 10:04:44 +11:00
Tim-Philipp Müller
73b2a3dd66 collectpads: minor docs fixes 2012-10-15 19:56:36 +01:00
Tim-Philipp Müller
bb2fda64f7 collectpads: fix buffer leak in clip_time 2012-10-15 19:55:42 +01:00
Mark Nauwelaerts
81aef52ac4 collectpads: call clip function with user data 2012-10-15 18:44:56 +02:00
Mark Nauwelaerts
a6b75fb322 collectpads: ensure all timestamps are in same time domain
... by not only processing incoming buffers through a clip function,
but also other timestamps such as those coming from GAP event.
2012-10-10 11:43:25 +02:00
Tim-Philipp Müller
226d96f107 collectpads: don't forward random stream-start event
It's not right, and we don't know what extra properties
that event might have set in future (e.g. sparseness).
This change means collectpad users need to create their
own stream-start event now. We could add a utility
function that creates a stream-start event based on
the input stream-start events.
2012-09-23 12:42:01 +01:00
Tim-Philipp Müller
531cdb43f5 docs: collectpads doc fixes 2012-09-19 09:44:08 +01:00
Stefan Sauer
57ea490f5a collectpads: remove gst_collect_pads_add_pad_full
Rename gst_collect_pads_add_pad_full() to gst_collect_pads_add_pad() and fix all
invocations.
2012-09-12 21:04:47 +02:00
Wim Taymans
00c6fa74f5 events: remove STREAM_CONFIG
We won't be able to implement this so it's better to move it out of the way.
2012-09-11 16:29:12 +02:00
Mark Nauwelaerts
9439e73eec collectpads: handle GAP event 2012-09-05 15:37:13 +02:00
Stefan Sauer
e9b62b030c collectpads: remove unimplemented api
We can always add this back if we need it. Fixes parts of #670852.
2012-07-24 21:38:35 +02:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00