Commit graph

19 commits

Author SHA1 Message Date
Mark Nauwelaerts
b4f1778a7d baseparse: prevent arithmetic overflows in pull mode buffer cache handling 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts
1b8a96e999 baseparse: fix seek handling
Allow a few more seek event type combinations, and really use the result
of gst_segment_set_seek to perform the seek.  Also add some debug.
2011-04-08 15:44:49 +01:00
Arun Raghavan
eb73b3e933 baseparse: Don't emit bitrate tags too early
We wait to parse a minimum number of frames (10, arbitrarily) before
emiting bitrate tags so that our early estimates are not wildly
inaccurate for streams that start with a silence. If the stream ends
before that, we just emit the tags anyway.

While it _would_ be nicer to be specify the threshold to start pushing
the tags in terms of duration, this would introduce more complexity than
this merits.

https://bugzilla.gnome.org/show_bug.cgi?id=614991
2011-04-08 15:44:49 +01:00
Sebastian Dröge
a6b20b62bd baseparse: Set the last stop to the buffer starttime if the duration is invalid
...instead of not setting it at all.
2011-04-08 15:44:49 +01:00
Joshua M. Doe
e85f8c8ab6 baseparse: Send NEWSEGMENT event with correct start and position
Instead of taking the last stop (which could be buffer endtime instead
of starttime) always take the buffer starttime.

Fixes bug #614016.
2011-04-08 15:44:49 +01:00
Tim-Philipp Müller
b0b9163125 audioparsers: remove unused GstBaseParseClassPrivate structure 2011-04-08 15:44:49 +01:00
Arun Raghavan
102ee0cf41 audioparsers: Add bitrate calculation to baseparse
This makes baseparse keep a running average of the stream bitrate, as
well as the minimum and maximum bitrates. Subclasses can override a
vfunc to make sure that per-frame overhead from the container is not
accounted for in the bitrate calculation.

We take care not to override the bitrate, minimum-bitrate, and
maximum-bitrate tags if they have been posted upstream. We also
rate-limit the emission of bitrate so that it is only triggered by a
change of >10 kbps.
2011-04-08 15:44:49 +01:00
Mark Nauwelaerts
8a2141f001 audioparsers: rename baseparse GType name to avoid possible conflicts 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts
cbc6dcc04b audioparsers: documentation fixes 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts
d249e34fb4 baseparse: adjust seek handling and newsegment sending
Perform sanity check on type of seek, and only perform one that is
appropriately supported.  Adjust downstream newsegment event
to first buffer timestamp that is sent downstream.
2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
192aa0d41f baseparse: minor refactor cleanup
Also add some debug logging.
2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
abadf63413 baseparse: implement leftover draining in pull mode 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
b67b86fcdb baseparse: provide default conversion using bps if no fps available
Also store estimated duration as such, rather than pretending otherwise
(e.g. set by subclass).
2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
d0ea041a38 baseparse: check for remaining data when draining in push mode 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
497105ca1b baseparse: fix pull mode cache size comparison 2011-04-08 15:44:48 +01:00
Michael Smith
ab3bf9fd95 audioparse: fix a format string as reported on irc. 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
0f85a2b685 baseparse: custom bufferflag indicates not to count frame in stats 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
f3d49be227 audioparsers: reference GstBaseParse now lives here 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts
3a4e980038 audioparsers: rename 'aacparse' plugin to generic 'audioparsers' plugin 2011-04-08 15:44:48 +01:00
Renamed from gst/aacparse/gstbaseparse.c (Browse further)