Commit graph

354 commits

Author SHA1 Message Date
Wim Taymans
7e6d579301 scheduling: port to new scheduling query 2011-05-24 17:39:56 +02:00
Sebastian Dröge
ce216c1406 Merge branch 'master' into 0.11 2011-05-20 13:06:57 +02:00
Sebastian Dröge
1d57e46dbd basesink: Only reinit the cached GstClockID if it is for the same clock
The clock might have changed since the clock ID was created and in
that case we have to request a new one.
2011-05-20 13:05:04 +02:00
Sebastian Dröge
a46c9c2a62 event: Make SEGMENT event parsing API more consistent with the others 2011-05-18 16:56:43 +02:00
Sebastian Dröge
5f2cd2b0a3 base: Update for caps/pad template related API changes 2011-05-17 13:14:12 +02:00
Sebastian Dröge
3d2127f865 Revert "query: allow _make_writable on query handlers"
This reverts commit cf4fbc005c.

This change did not improve the situation for bindings because
queries are usually created, then directly passed to a function
and not stored elsewhere, and the writability problem with
miniobjects usually happens with buffers or caps instead.
2011-05-17 11:21:41 +02:00
Wim Taymans
115c34badd basesink: handle more formats
Don't hardcode GST_FORMAT_TIME in places, we can work with many formats.
2011-05-16 17:09:06 +02:00
Sebastian Dröge
bdf9022861 base: Improve negotiation with new getcaps() filter 2011-05-16 15:33:10 +02:00
Wim Taymans
bdbc069348 Rework GstSegment handling
Improve GstSegment, rename some fields. The idea is to have the GstSegment
structure represent the timing structure of the buffers as they are generated by
the source or demuxer element.
gst_segment_set_seek() -> gst_segment_do_seek()
Rename the NEWSEGMENT event to SEGMENT.
Make parsing of the SEGMENT event into a GstSegment structure.
Pass a GstSegment structure when making a new SEGMENT event. This allows us to
pass the timing info directly to the next element. No accumulation is needed in
the receiving element, all the info is inside the element.
Remove gst_segment_set_newsegment(): This function as used to accumulate
segments received from upstream, which is now not needed anymore because the
segment event contains the complete timing information.
2011-05-16 11:37:52 +02:00
Wim Taymans
cf4fbc005c query: allow _make_writable on query handlers
Pass a GstQuery ** to the query handlers so that they can make the query
writable before using a setter on it.
Port code to new API.
2011-05-10 18:36:33 +02:00
Wim Taymans
7f24a48387 event: _qos_full -> _qos 2011-05-09 18:48:55 +02:00
Wim Taymans
c07b57fc05 segment: remove _full version
Rename the _full versions of the functions to the normal function names.
2011-05-09 17:51:07 +02:00
Wim Taymans
d63829fc9a segment: remove abs_rate from segment structure
Remove the abs_rate field from the segment structure, we can trivially compute
it when needed.
2011-05-09 16:39:13 +02:00
Wim Taymans
f127a416fa basesink: add some more debug 2011-05-09 15:08:51 +02:00
Wim Taymans
d34ca6140b basesink: use CAPS event instead of setcaps function 2011-05-08 13:07:13 +02:00
Wim Taymans
02e5feb2bf pad: avoid using the old GST_PAD_CAPS
Don't use GST_PAD_CAPS but instead use the new gst_pad_get_current_caps()
method.
Avoid setting caps on buffers.
2011-05-06 19:04:54 +02:00
Wim Taymans
fb3da828e5 element: rename gst_element_lost_state_full()
Rename gst_element_lost_state_full() to gst_element_lost_state() and
remove the old method name.
2011-05-06 12:19:16 +02:00
Wim Taymans
6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Sebastian Dröge
1cff66d587 base{sink,src}: Don't try to fixate ANY caps 2011-04-19 11:45:36 +02:00
Sebastian Dröge
9b90d3d9c0 base: Update docs to say class_init instead of base_init
And remove a useless base_init in basesrc
2011-04-16 15:59:40 +02:00
Sebastian Dröge
f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Ole André Vadla Ravnås
e7bf5484c7 base: Fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:39:05 +02:00
Wim Taymans
468ec5bc40 bufferlist: simplify bufferlists
We now have multiple memory blocks as part of the buffers and we can therefore
reduce the bufferlist to a simple array of buffers.
2011-03-31 17:51:02 +02:00
Wim Taymans
a12ede3fb1 Merge branch 'master' into 0.11-fdo
Conflicts:
	gst/gst.c
	libs/gst/base/gstcollectpads.c
2011-03-28 20:11:20 +02:00
Wim Taymans
d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02:00
Stefan Kost
71dcd52cc0 basesink: print flow return as a name in debug log 2011-03-24 18:32:20 +02:00
Wim Taymans
f505f778cc pad: more preroll lock to basesink
Move the preroll lock to basesink where it belongs.
2011-03-04 17:25:02 +01:00
Wim Taymans
6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01:00
Wim Taymans
1218511185 libs: cleanups for 0.11
Remove deprecated stuff, fix padding, rearrange methods.
2011-02-22 19:09:48 +01:00
Wim Taymans
f8828eace6 basesink: improve duration calculation
Keep track of the average distance between incomming timestamps and
use that to estimate the frame duration when buffers have no duration set on
them.
2011-02-14 15:17:45 +01:00
Wim Taymans
79665e8247 basesink: improve rate calculation
When there is no duration on input buffers, assume the rate is 1.0
instead of (the undefined) 0.0.
2011-02-14 15:17:44 +01:00
Wim Taymans
9661a713ba basesink: improve average duration calculation
Improve the calculation of the duration. When we have no input duration set on
the input buffers stop is set to start and then we end up using a 0 duration in
the average calculation.
2011-02-14 15:17:44 +01:00
Wim Taymans
dc0120fe28 basesink: rename variable
Rename an internal variable to better reflact what its value means.
2011-02-14 15:17:44 +01:00
Wim Taymans
c8d1abdd00 basesink: fix some comments 2011-02-10 15:21:46 +01:00
Wim Taymans
d19f40c716 basesink: keep track of earliest QoS timestamp
Keep track of the earliest allowed timestamp according to the latest
QoS report and drop buffers before that time. Activate this filter
when throttling is enabled. We could later also activate this in the
other QoS cases.

See #638891
2011-02-10 15:21:46 +01:00
Wim Taymans
dad43fa004 basesink: use new QoS type
Use the new QoS type and send throttling QoS messages.
2011-02-10 15:21:46 +01:00
Wim Taymans
4ee5c61a2d basesink: add property to configure a throttle-time
Add a property to configure the throttle time on a sink. The
property is not yet used.

See #638891
2011-02-10 15:21:45 +01:00
Tim-Philipp Müller
655451db54 basesrc, basesink: add some FIXMEs for the type of the blocksize property 2011-01-02 16:59:18 +00:00
Wim Taymans
ef44d4b539 basesink: also preroll async=false sinks
Also preroll async=false sinks after a flush.
2010-12-28 16:23:32 +01:00
Wim Taymans
041d33e5f5 basesink: fix typo 2010-12-21 10:35:40 +01:00
Wim Taymans
6da39bf508 basesink: improve last_stop calculation
Only update the last_stop value when we had a valid stop position for the
clipping or else the clipping code assumes the stop position extends to the end
of the segment, which makes the position reporting return weird values.
2010-12-14 19:00:14 +01:00
Wim Taymans
4fd63f0ce2 basesink: fix object type handling in queued preroll
Factor out the method to get the object type.
When preroll-queue-len > 0, use the right object type instead of ignoring
buffer-lists.
2010-12-14 15:54:41 +01:00
Stefan Kost
1de8b60034 docs: fix wrong use of Since: keyword 2010-12-08 12:17:35 +02:00
Tim-Philipp Müller
686b16756d docs: libgstbase: more gobject introspection annotations
Many of these are superfluous and were added for clarity.
2010-12-07 18:37:04 +00:00
Edward Hervey
27c0bc93b7 basesink: Don't forget to unref the cached ClockId 2010-12-05 15:58:48 +01:00
Wim Taymans
a813aad0ac basesink: rework position reporting code
Unify the different position reporting code paths to make it more
understandable.
Use start_time to get more accurate position reporting in paused.
Fix unit tests for more accurate reporting.
2010-12-02 19:10:46 +01:00
Wim Taymans
79570f49dc basesink: perform wait_preroll in a while loop
We need to continue calling wait_preroll() as long as the need_preroll variable
is true.
2010-12-02 19:10:45 +01:00
Wim Taymans
9076d5688f basesink: also preroll after a flush with async=false
Make sure to preroll after a flush even when we are async=false.
Add unit test.

Fixes #634965
2010-12-02 19:10:45 +01:00
Edward Hervey
ece40dacbc basesink: Re-using GstClockID instead of constantly recreating one
Makes _sink_wait_clock at least 2 times faster.

https://bugzilla.gnome.org/show_bug.cgi?id=632778
2010-12-02 19:04:56 +01:00
Edward Hervey
7115b77aab basesink: Pass along miniobject type through various functions
Avoids doing useless GST_IS_*

https://bugzilla.gnome.org/show_bug.cgi?id=632778
2010-12-02 19:04:56 +01:00