Commit graph

155 commits

Author SHA1 Message Date
Mark Nauwelaerts
b0d62f4182 audioparsers: increase ranks to enable auto-plugging
Because we can, and should, have some shakedown testing before having
these make it into -good later on ...
2010-10-01 12:15:46 +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
09223cc719 flacparse: Optionally check the overall frame checksums too before accepting a frame as valid
This is optional because it's a quite expensive operation and it's very
unlikely that a non-frame is detected as frame after the header CRC check
and checking all bits for valid values. The overall frame checksums are
mainly useful to detect inconsistencies in the encoded payload.
2010-03-26 18:58:35 +01:00
Sebastian Dröge
9fa738d36b flacparse: Check the CRC-8 of the headers before accepting a frame as valid
This makes false-positives during seeking much less likely and detection of
them much faster.
2010-03-26 18:42:28 +01: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
Arun Raghavan
cc6c4ef00b flacparse: Fix buffer refcount issue
When called from the GST_FLAC_PARSE_STATE_HEADERS case,
gst_flac_parse_hand_headers() does a gst_buffer_set_caps() on a buffer
with refcount > 1. This change handles this case by making the buffer
metadata_Writable.

https://bugzilla.gnome.org/show_bug.cgi?id=614037
2010-03-26 18:14:22 +01:00
Tim-Philipp Müller
d6f3ee4b90 audioparsers: remove unused GstBaseParseClassPrivate structure 2010-03-25 17:13:51 +00:00
Arun Raghavan
76f5d96e06 flacparse: Make bitrate estimation more accurate
This implements the get_frame_overhead() vfunc so that baseparse can
make more accurate bitrate estimates.
2010-03-25 16:57:55 +01:00
Arun Raghavan
599401a7f9 aacparse: Fix bitrate calculation
This patch adds the get_frame_overhead() vfunc so that baseparse can
accurately calculate the min/avg/max bitrates for aacparse.

Note: The bitrate was being incorrectly calculated for ADTS streams
(it's not in the header as the code suggests).
2010-03-25 16:57:48 +01: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
Benjamin Otte
775c7584fd gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 22:46:41 +01:00
Mark Nauwelaerts
87eb6333da audioparsers: rename baseparse GType name to avoid possible conflicts 2010-01-27 12:45:57 +01:00
Edward Hervey
58b9479423 flacparse: Initialize variables.
Fixes build on $#@*( macosx
2010-01-12 18:55:53 +01:00
b3f0b029f3 win32: Include config.h before anything else. Fix mpegdemux LIBADD
Because config.h defines __MSVCRT_VERSION__, which should be defined
before inclusion of any system header.

Also fixes mpegdemux Makefile.am LIBADD typo.

Fixes #606665
2010-01-12 12:31:56 +01:00
Thiago Santos
08d13fd191 aacparse: Also add stream-format to template caps
Do not forget to add stream-format to template caps
off aacparse
2010-01-11 13:42:49 -03:00
Thiago Santos
a428ad82c7 Rename aac's stream-format 'none' to 'raw'
Renames aac's stream-format from previous commits from none to
raw
2010-01-11 13:42:48 -03:00
Thiago Santos
7cfe3643db aacparse: Add stream-format to output caps
Adds stream-format field to output caps
2010-01-11 11:01:10 -03:00
Mark Nauwelaerts
e63fc68628 audioparsers: documentation fixes 2010-01-05 17:50:40 +01:00
Mark Nauwelaerts
51a28ed325 ac3parse: add documentation 2010-01-05 17:50:36 +01:00
Mark Nauwelaerts
d517e1c034 flacparse: add documentation 2010-01-05 17:46:31 +01:00
Mark Nauwelaerts
59855f35a7 flacparse: perform additional frame checks when resyncing 2010-01-05 17:46:15 +01:00
Mark Nauwelaerts
9009899176 flacparse: fix (multiple channel) frame parsing 2010-01-05 17:46:01 +01:00
Mark Nauwelaerts
79acb0b4cc flacparse: declare unparsed input and parsed output 2010-01-05 17:45:56 +01:00
Mark Nauwelaerts
660cdc4679 ac3parse: fix scanning for next syncword 2010-01-05 17:45:54 +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
ebe8c69cc2 flacparse: locate next sync code more efficiently 2010-01-05 17:45:42 +01:00
Mark Nauwelaerts
e6f840690d flacparse: baseparse takes care of handling leftover pieces 2010-01-05 17:45:32 +01:00
Mark Nauwelaerts
90c86c600b baseparse: implement leftover draining in pull mode 2010-01-05 17:45:29 +01:00
Mark Nauwelaerts
c4db8697d7 flacparse: set _OFFSET and _OFFSET_END on outgoing buffers 2010-01-05 17:40:07 +01:00
Mark Nauwelaerts
8c67702b84 audioparsers: move 'flacparse' into it 2010-01-05 17:40:02 +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
Edward Hervey
83c7b38a10 ac3parse: Fix unitialized variable. 2009-12-18 13:01:17 +01:00
Christian Schaller
86c2660d8d Update spec file and fix ac3parser header listing in Makefile.am 2009-12-17 14:46:01 +00:00
Michael Smith
2dec1de420 audioparse: fix a format string as reported on irc. 2009-12-11 10:25:16 -08:00
Mark Nauwelaerts
c5847abf30 ac3parse: ensure sufficient data available for parsing 2009-12-08 16:06:31 +01:00
Mark Nauwelaerts
f3dbcb668a ac3parse: extract and use some more details for Enhanced Ac-3 streams 2009-12-08 16:06:31 +01:00
Mark Nauwelaerts
8f8f97dd2d baseparse: custom bufferflag indicates not to count frame in stats 2009-12-08 16:06:31 +01:00
Mark Nauwelaerts
9eae24835e ac3parse: perform additional frame checks when resyncing 2009-12-08 16:06:31 +01:00
Mark Nauwelaerts
bb8085a348 ac3parse: inform base parser of frame duration 2009-12-08 16:06:30 +01:00
Mark Nauwelaerts
8e91b3b3c5 ac3parse: improve src caps settings 2009-12-08 16:06:30 +01:00
Mark Nauwelaerts
eccffea369 ac3parse: initial version
MARGINAL rank for now; might take some time for some (useful)
framed=true/false to appear here and there.
2009-12-08 16:06:30 +01:00
Mark Nauwelaerts
15f1b7e97f amrparse: use (default) time handling of baseparser class 2009-12-08 16:06:30 +01:00
Mark Nauwelaerts
502011501b audioparsers: move 'amrparse' into it 2009-12-08 16:06:27 +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