Commit graph

50 commits

Author SHA1 Message Date
Mark Nauwelaerts
6e1d65d788 baseparse: perform bitrate handling and posting after newsegment sending 2010-10-11 17:50:21 +02:00
Mark Nauwelaerts
30feca6966 baseparse: immediately post subclass provided bitrate 2010-10-11 17:42:09 +02:00
Tim-Philipp Müller
716e430fd5 Revert "baseparse: add skip property"
This reverts commit b5a3d60363.

Reverting this for now, since no one really seems to remember why this
property exists or what it could possibly be good for. It seems to have
been in the original mp3parse since the beginning of time and was back-
ported from there.
2010-10-05 11:17:52 +01:00
Sebastian Dröge
26b2c4a1b3 audioparser: Let the format string agree with the parameters to fix compiler warning 2010-10-03 23:50:29 +02:00
Arun Raghavan
2d699010e9 baseparse: Fix debug output
We lose the reference to the buffer after gst_pad_push(), so the debug
print should happen before.

https://bugzilla.gnome.org/show_bug.cgi?id=622276
2010-10-01 13:31:36 +02:00
Mark Nauwelaerts
ad1304dcf1 baseparse: support reverse playback
... in pull mode or upstream driven.
2010-10-01 12:15:52 +02:00
Mark Nauwelaerts
603d6ba183 baseparse: remove done TODOs and update documentation 2010-10-01 12:15:52 +02:00
Mark Nauwelaerts
fdff382686 baseparse: use determined seekability in answering SEEKING query 2010-10-01 12:15:52 +02:00
Mark Nauwelaerts
b5a3d60363 baseparse: add skip property 2010-10-01 12:15:52 +02:00
Mark Nauwelaerts
36165d8d44 baseparse: use _set_frame_props to configure frame lead_in and lead_out
... provided a corresponding decoder with sufficient leading and following
frames to carry out full decoding for a particular segment.
2010-10-01 12:15:51 +02:00
Mark Nauwelaerts
13f85c8f11 baseparse: use _set_duration to configure duration update interval
... as it logically belongs there as one or the other; either subclass
can provide a duration, or an estimate must be made (reguarly updated).
2010-10-01 12:15:51 +02:00
Mark Nauwelaerts
eb9ba9e115 baseparse: localize use of provided fps information 2010-10-01 12:15:50 +02:00
Mark Nauwelaerts
def0aadb81 baseparse: seek table and accurate seek support 2010-10-01 12:15:50 +02:00
Mark Nauwelaerts
174d2d46fc baseparse: proper and more extended segment and seek handling
That is, loop pause handling, segment seek support, newsegment for gaps, etc
2010-10-01 12:15:50 +02:00
Mark Nauwelaerts
ec195ab2e5 baseparse: add index support 2010-10-01 12:15:50 +02:00
Mark Nauwelaerts
80646f5555 baseparse: refactor state reset 2010-10-01 12:15:49 +02:00
Mark Nauwelaerts
ad95a79de3 baseparse: prevent indefinite resyncing 2010-10-01 12:15:49 +02:00
Mark Nauwelaerts
1c14fd0a31 baseparse: specific EOS handling if no output so far 2010-10-01 12:15:49 +02:00
Mark Nauwelaerts
a1c072e0aa baseparse: adjust _set_frame_prop documentation and set default as claimed 2010-10-01 12:15:49 +02:00
Mark Nauwelaerts
cf159041a7 baseparse: fix bitrate copy-and-paste and update heuristic 2010-10-01 12:15:49 +02:00
Mark Nauwelaerts
80ba9a1a3e baseparse: post duration message if average bitrates is updated 2010-10-01 12:15:48 +02:00
Mark Nauwelaerts
4dff7c81d6 baseparse: remove is_seekable vmethod and use a set_seek instead
Seekability, like duration, etc is unlikely to change (frequently), and
the default assumption covers most cases, so let subclass set when needed.
At the same time, allow subclass to indicate if it has seek-metadata (table)
available, and possibly have it provide an average bitrate.
2010-10-01 12:15:48 +02:00
Mark Nauwelaerts
582b756bc1 baseparse: add another hook for subclass prior to pushing buffer
... and allow subclass to perform custom segment clipping, or to
emit tags or messages at this time.
2010-10-01 12:15:48 +02:00
Mark Nauwelaerts
ea7e051827 baseparse: 0 converts to 0 by default 2010-10-01 12:15:47 +02:00
Mark Nauwelaerts
2e7de32849 basepase: refactor conversion using helper function and export default convert 2010-10-01 12:15:47 +02:00
Mark Nauwelaerts
420121705d baseparse: streamline query handling 2010-10-01 12:15:47 +02:00
Mark Nauwelaerts
a1f51f3d17 baseparse: cleanup struct and remove unused member 2010-10-01 12:15:47 +02:00
Arun Raghavan
2978216db1 baseparse: Allow chaining of subclass event handlers
This allows the child class to chain its event handler with
GstBaseParse, so that subclasses don't have to duplicate all the default
event handling logic.

https://bugzilla.gnome.org/show_bug.cgi?id=622276
2010-10-01 12:15:46 +02:00
Sebastian Dröge
2c6372f41a baseparse: Don't use GST_FLOW_IS_FATAL()
Also don't post an error message for UNEXPECTED and do it
for NOT_LINKED.
2010-09-21 12:26:34 +02:00
Mark Nauwelaerts
a5eaa99297 baseparse: non-TIME seek event is simply not handled 2010-09-06 15:20:10 +02:00
Mark Nauwelaerts
112df6cc0e baseparse: fix seek event ref handling 2010-06-15 15:42:26 +02:00
Mark Nauwelaerts
484af544bf baseparse: prevent arithmetic overflows in pull mode buffer cache handling 2010-06-15 15:42:26 +02:00
Mark Nauwelaerts
07561dbfd1 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.
2010-06-15 15:42:26 +02:00
Arun Raghavan
90753ceb5e 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
2010-04-07 11:51:46 +02:00
Sebastian Dröge
6663e7c1ca baseparse: Set the last stop to the buffer starttime if the duration is invalid
...instead of not setting it at all.
2010-03-26 18:20:24 +01:00
Joshua M. Doe
af00e59528 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.
2010-03-26 18:19:00 +01:00
Tim-Philipp Müller
d6f3ee4b90 audioparsers: remove unused GstBaseParseClassPrivate structure 2010-03-25 17:13:51 +00:00
Arun Raghavan
88c1e42567 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.
2010-03-25 16:57:36 +01:00
Mark Nauwelaerts
87eb6333da audioparsers: rename baseparse GType name to avoid possible conflicts 2010-01-27 12:45:57 +01:00
Mark Nauwelaerts
e63fc68628 audioparsers: documentation fixes 2010-01-05 17:50:40 +01:00
Mark Nauwelaerts
3f5b4ee67f 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.
2010-01-05 17:45:48 +01:00
Mark Nauwelaerts
a885f80fd3 baseparse: minor refactor cleanup
Also add some debug logging.
2010-01-05 17:45:45 +01:00
Mark Nauwelaerts
90c86c600b baseparse: implement leftover draining in pull mode 2010-01-05 17:45:29 +01:00
Mark Nauwelaerts
a3f7b8527e 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).
2010-01-05 17:39:59 +01:00
Mark Nauwelaerts
a61183fe29 baseparse: check for remaining data when draining in push mode 2009-12-18 13:32:07 +01:00
Mark Nauwelaerts
d51d8ca35c baseparse: fix pull mode cache size comparison 2009-12-18 13:32:00 +01:00
Michael Smith
2dec1de420 audioparse: fix a format string as reported on irc. 2009-12-11 10:25:16 -08:00
Mark Nauwelaerts
8f8f97dd2d baseparse: custom bufferflag indicates not to count frame in stats 2009-12-08 16:06:31 +01:00
Mark Nauwelaerts
186344c397 audioparsers: reference GstBaseParse now lives here 2009-12-08 16:05:26 +01:00
Mark Nauwelaerts
3441a41f83 audioparsers: rename 'aacparse' plugin to generic 'audioparsers' plugin 2009-12-08 16:05:26 +01:00
Renamed from gst/aacparse/gstbaseparse.c (Browse further)