Mark Nauwelaerts [Fri, 7 Jan 2011 15:39:51 +0000 (16:39 +0100)]
baseparse: restrict duration scanning to pull mode and avoid extra set_caps call
Mark Nauwelaerts [Fri, 7 Jan 2011 14:58:49 +0000 (15:58 +0100)]
baseparse: update some documentation
Also add some more debug.
Mark Nauwelaerts [Thu, 6 Jan 2011 10:41:44 +0000 (11:41 +0100)]
baseparse: allow increasing min_size for current frame parsing only
Also check that subclass actually either directs to skip bytes or
increases expected frame size to avoid going nowhere in bogus
indefinite looping.
Mark Nauwelaerts [Fri, 14 Jan 2011 14:26:37 +0000 (15:26 +0100)]
baesparse: fix refactor regression in loop based parsing
Mark Nauwelaerts [Thu, 6 Jan 2011 10:16:56 +0000 (11:16 +0100)]
baseparse: pass all available data to subclass rather than minimum
Also reduce some adapter calls and add a few debug statements.
Mark Nauwelaerts [Fri, 10 Dec 2010 14:59:49 +0000 (15:59 +0100)]
baseparse: fix reverse playback handling
Mark Nauwelaerts [Fri, 10 Dec 2010 13:56:13 +0000 (14:56 +0100)]
baseparse: minor typo and debug statement cleanup
Mark Nauwelaerts [Fri, 10 Dec 2010 13:40:05 +0000 (14:40 +0100)]
baseparse: reduce locking
... which is either already mute and/or implicitly handled by STREAM_LOCK.
Mark Nauwelaerts [Fri, 14 Jan 2011 13:08:38 +0000 (14:08 +0100)]
baseparse: avoid loop in frame locating interpolation
Thiago Santos [Fri, 14 Jan 2011 19:30:11 +0000 (16:30 -0300)]
audioparsers: baseparse: Be careful to not lose the event ref
Don't unref the event if it hasn't been handled, because the caller
assumes it is still valid and might reuse it.
I ran into this problem when transcoding an AVI (with mp3 inside)
to gpp.
https://bugzilla.gnome.org/show_bug.cgi?id=639555
Tim-Philipp Müller [Thu, 13 Jan 2011 16:27:04 +0000 (16:27 +0000)]
docs: minor baseparse docs/comment fixes
Remove copy'n'paste leftovers.
Mark Nauwelaerts [Mon, 8 Nov 2010 18:58:31 +0000 (19:58 +0100)]
baseparse: increase keyframe awareness
... which is not particular relevant for audio parsing, but more so
in video cases. In particular, auto-determine if dealing with video (caps).
Mark Nauwelaerts [Tue, 30 Nov 2010 14:41:02 +0000 (15:41 +0100)]
baseparse: avoid unexpected stray metadata
Mark Nauwelaerts [Tue, 30 Nov 2010 14:40:28 +0000 (15:40 +0100)]
baseparse: use proper _NONE output value when applicable
Edward Hervey [Thu, 25 Nov 2010 17:56:42 +0000 (18:56 +0100)]
audioparsers: Remove dead assignments
Andoni Morales Alastruey [Thu, 25 Nov 2010 16:14:23 +0000 (17:14 +0100)]
audioparse: fix possible division-by-zero
https://bugzilla.gnome.org/show_bug.cgi?id=635786
Mark Nauwelaerts [Wed, 17 Nov 2010 15:23:42 +0000 (16:23 +0100)]
baseparse: use correct offset when adding index entry
... bearing in mind that BUFFER_OFFSET is media specific and may not
reflect the basic offset after having been parsed.
Mark Nauwelaerts [Wed, 17 Nov 2010 13:30:09 +0000 (14:30 +0100)]
baseparse: enhancements for timestamp marked framed formats
That is, as such formats allow subclass to extract position from frame,
it is possible to extract duration (if not otherwise provided)
from (near) last frame, and a seek can fairly accurately target the required
position.
Fixes #631389.
Mark Nauwelaerts [Tue, 16 Nov 2010 16:06:14 +0000 (17:06 +0100)]
baseparse: refactor frame scanning peformed by _loop
Mark Nauwelaerts [Tue, 16 Nov 2010 17:04:00 +0000 (18:04 +0100)]
baseparse: slightly optimize sending of pending newsegment events
Mark Nauwelaerts [Tue, 16 Nov 2010 16:04:35 +0000 (17:04 +0100)]
baseparse: minor fixes and enhancements
Arrange for upstream as well as downstream flushing when seeking.
Also determine upstream size as well as seekability. Adjust some comments
to reality and employ debug statement in proper order.
Mark Nauwelaerts [Fri, 29 Oct 2010 12:08:58 +0000 (14:08 +0200)]
baseparse: use only upstream duration if it provides one
Mark Nauwelaerts [Mon, 25 Oct 2010 12:15:50 +0000 (14:15 +0200)]
baseparse: reflow update_bitrate code
... which makes local variables represent real state better, and avoids
triggering unneeded updates/actions.
Mark Nauwelaerts [Mon, 25 Oct 2010 12:13:51 +0000 (14:13 +0200)]
baseparse: add some debug statements
Mark Nauwelaerts [Mon, 11 Oct 2010 15:49:46 +0000 (17:49 +0200)]
baseparse: perform bitrate handling and posting after newsegment sending
Mark Nauwelaerts [Mon, 11 Oct 2010 15:36:19 +0000 (17:36 +0200)]
baseparse: immediately post subclass provided bitrate
Tim-Philipp Müller [Tue, 5 Oct 2010 10:17:52 +0000 (11:17 +0100)]
Revert "baseparse: add skip property"
This reverts commit
b5a3d60363d837a10f0533c141ec93d10b742312.
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.
Sebastian Dröge [Sun, 3 Oct 2010 21:50:29 +0000 (23:50 +0200)]
audioparser: Let the format string agree with the parameters to fix compiler warning
Arun Raghavan [Wed, 22 Sep 2010 10:14:43 +0000 (15:44 +0530)]
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
Mark Nauwelaerts [Wed, 29 Sep 2010 14:12:42 +0000 (16:12 +0200)]
baseparse: support reverse playback
... in pull mode or upstream driven.
Mark Nauwelaerts [Mon, 27 Sep 2010 10:16:43 +0000 (12:16 +0200)]
baseparse: remove done TODOs and update documentation
Mark Nauwelaerts [Sat, 25 Sep 2010 12:40:54 +0000 (14:40 +0200)]
baseparse: use determined seekability in answering SEEKING query
Mark Nauwelaerts [Sat, 25 Sep 2010 12:32:06 +0000 (14:32 +0200)]
baseparse: add skip property
Mark Nauwelaerts [Wed, 22 Sep 2010 13:07:09 +0000 (15:07 +0200)]
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.
Mark Nauwelaerts [Wed, 22 Sep 2010 12:13:17 +0000 (14:13 +0200)]
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).
Mark Nauwelaerts [Wed, 22 Sep 2010 11:55:20 +0000 (13:55 +0200)]
baseparse: localize use of provided fps information
Mark Nauwelaerts [Wed, 22 Sep 2010 10:13:12 +0000 (12:13 +0200)]
baseparse: seek table and accurate seek support
Mark Nauwelaerts [Tue, 21 Sep 2010 11:57:10 +0000 (13:57 +0200)]
baseparse: proper and more extended segment and seek handling
That is, loop pause handling, segment seek support, newsegment for gaps, etc
Mark Nauwelaerts [Tue, 21 Sep 2010 08:57:04 +0000 (10:57 +0200)]
baseparse: add index support
Mark Nauwelaerts [Tue, 21 Sep 2010 07:59:56 +0000 (09:59 +0200)]
baseparse: refactor state reset
Mark Nauwelaerts [Mon, 20 Sep 2010 14:39:37 +0000 (16:39 +0200)]
baseparse: prevent indefinite resyncing
Mark Nauwelaerts [Mon, 20 Sep 2010 11:57:55 +0000 (13:57 +0200)]
baseparse: specific EOS handling if no output so far
Mark Nauwelaerts [Mon, 20 Sep 2010 11:31:57 +0000 (13:31 +0200)]
baseparse: adjust _set_frame_prop documentation and set default as claimed
Mark Nauwelaerts [Mon, 20 Sep 2010 11:30:54 +0000 (13:30 +0200)]
baseparse: fix bitrate copy-and-paste and update heuristic
Mark Nauwelaerts [Fri, 17 Sep 2010 16:33:29 +0000 (18:33 +0200)]
baseparse: post duration message if average bitrates is updated
Mark Nauwelaerts [Fri, 17 Sep 2010 16:24:22 +0000 (18:24 +0200)]
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.
Mark Nauwelaerts [Fri, 17 Sep 2010 15:21:46 +0000 (17:21 +0200)]
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.
Mark Nauwelaerts [Fri, 17 Sep 2010 15:19:37 +0000 (17:19 +0200)]
baseparse: 0 converts to 0 by default
Mark Nauwelaerts [Thu, 16 Sep 2010 16:56:46 +0000 (18:56 +0200)]
baseparse: refactor conversion using helper function and export default convert
Mark Nauwelaerts [Thu, 16 Sep 2010 16:35:47 +0000 (18:35 +0200)]
baseparse: streamline query handling
Mark Nauwelaerts [Thu, 16 Sep 2010 09:51:20 +0000 (11:51 +0200)]
baseparse: cleanup struct and remove unused member
Arun Raghavan [Wed, 22 Sep 2010 10:37:24 +0000 (16:07 +0530)]
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
Sebastian Dröge [Fri, 27 Aug 2010 16:35:10 +0000 (18:35 +0200)]
baseparse: Don't use GST_FLOW_IS_FATAL()
Also don't post an error message for UNEXPECTED and do it
for NOT_LINKED.
Mark Nauwelaerts [Mon, 6 Sep 2010 12:12:00 +0000 (14:12 +0200)]
baseparse: non-TIME seek event is simply not handled
Mark Nauwelaerts [Tue, 15 Jun 2010 13:34:05 +0000 (15:34 +0200)]
baseparse: fix seek event ref handling
Mark Nauwelaerts [Tue, 15 Jun 2010 13:33:37 +0000 (15:33 +0200)]
baseparse: prevent arithmetic overflows in pull mode buffer cache handling
Mark Nauwelaerts [Tue, 15 Jun 2010 13:32:34 +0000 (15:32 +0200)]
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.
Arun Raghavan [Fri, 26 Mar 2010 18:56:49 +0000 (18:56 +0000)]
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
Sebastian Dröge [Fri, 26 Mar 2010 17:20:24 +0000 (18:20 +0100)]
baseparse: Set the last stop to the buffer starttime if the duration is invalid
...instead of not setting it at all.
Joshua M. Doe [Fri, 26 Mar 2010 17:19:00 +0000 (18:19 +0100)]
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.
Tim-Philipp Müller [Thu, 25 Mar 2010 17:09:17 +0000 (17:09 +0000)]
audioparsers: remove unused GstBaseParseClassPrivate structure
Arun Raghavan [Thu, 25 Mar 2010 11:22:58 +0000 (11:22 +0000)]
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.
Mark Nauwelaerts [Thu, 14 Jan 2010 10:50:33 +0000 (11:50 +0100)]
audioparsers: rename baseparse GType name to avoid possible conflicts
Mark Nauwelaerts [Tue, 5 Jan 2010 14:05:05 +0000 (15:05 +0100)]
audioparsers: documentation fixes
Mark Nauwelaerts [Mon, 21 Dec 2009 17:18:39 +0000 (18:18 +0100)]
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.
Mark Nauwelaerts [Mon, 21 Dec 2009 10:59:45 +0000 (11:59 +0100)]
baseparse: minor refactor cleanup
Also add some debug logging.
Mark Nauwelaerts [Fri, 18 Dec 2009 20:02:40 +0000 (21:02 +0100)]
baseparse: implement leftover draining in pull mode
Mark Nauwelaerts [Wed, 16 Dec 2009 17:38:33 +0000 (18:38 +0100)]
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).
Mark Nauwelaerts [Fri, 18 Dec 2009 12:30:29 +0000 (13:30 +0100)]
baseparse: check for remaining data when draining in push mode
Mark Nauwelaerts [Fri, 18 Dec 2009 12:30:07 +0000 (13:30 +0100)]
baseparse: fix pull mode cache size comparison
Michael Smith [Fri, 11 Dec 2009 18:25:16 +0000 (10:25 -0800)]
audioparse: fix a format string as reported on irc.
Mark Nauwelaerts [Thu, 29 Oct 2009 14:18:37 +0000 (15:18 +0100)]
baseparse: custom bufferflag indicates not to count frame in stats
Mark Nauwelaerts [Fri, 27 Nov 2009 16:27:32 +0000 (17:27 +0100)]
audioparsers: reference GstBaseParse now lives here
Mark Nauwelaerts [Sat, 28 Nov 2009 17:13:31 +0000 (18:13 +0100)]
audioparsers: rename 'aacparse' plugin to generic 'audioparsers' plugin
Mark Nauwelaerts [Thu, 29 Oct 2009 15:05:00 +0000 (16:05 +0100)]
baseparse: reset passthrough mode to default (disabled) on activation
Mark Nauwelaerts [Thu, 29 Oct 2009 14:16:59 +0000 (15:16 +0100)]
baseparse: ensure buffer metadata is writable
Mark Nauwelaerts [Wed, 28 Oct 2009 13:06:13 +0000 (14:06 +0100)]
baseparse: fix/enhance DISCONT marking
In particular, consider DISCONT == !sync, and allow subclass to query
sync state, as it may want to perform additional checks depending
on whether sync was achieved earlier on.
Also arrange for subclass to query whether leftover data is being drained.
Mark Nauwelaerts [Mon, 23 Nov 2009 14:48:25 +0000 (15:48 +0100)]
baseparse: add timestamp handling, and default conversion
In particular, (optionally) provide baseparse with a notion of frames per second
(and therefore also frame duration) and have it track frame and byte counts.
This way, subclass can provide baseparse with fps and have it provide default
buffer time metadata and conversions, though subclass can still install
callbacks to handle such itself.
Mark Nauwelaerts [Wed, 28 Oct 2009 11:02:03 +0000 (12:02 +0100)]
baseparse: documentation fixes
Mark Nauwelaerts [Wed, 28 Oct 2009 11:00:08 +0000 (12:00 +0100)]
baseparse: use_fixed_caps for src pad
After all, stream is as-is, and there is little molding to downstream's
taste that can be done. If subclass can and wants to do so, it can
still override as such.
Julien Moutte [Fri, 20 Nov 2009 16:32:13 +0000 (17:32 +0100)]
aacparse: Fix compilation warnings
Josep Torra [Sun, 11 Oct 2009 09:22:11 +0000 (11:22 +0200)]
aacparse: fix warnings in macosx snow leopard
Mark Nauwelaerts [Fri, 25 Sep 2009 15:02:53 +0000 (17:02 +0200)]
aacparse: forego (bogus) parsing of already parsed (raw) input
Mark Nauwelaerts [Fri, 7 Aug 2009 11:07:17 +0000 (13:07 +0200)]
baseparse: prevent infinite loop when draining
Mark Nauwelaerts [Fri, 7 Aug 2009 11:06:28 +0000 (13:06 +0200)]
baseparse: fix minor memory leak
Sebastian Dröge [Tue, 14 Jul 2009 12:08:04 +0000 (14:08 +0200)]
aacparse: Add function for the baseparse subclass to push buffers downstream
Also handle the case gracefully where the subclass decides to drop
the first buffers and has no caps set yet. It's still required to
have valid caps set when the first buffer should be passed downstream.
Sebastian Dröge [Tue, 14 Jul 2009 12:07:44 +0000 (14:07 +0200)]
baseparse: Fix seek event leaking
Tim-Philipp Müller [Mon, 1 Jun 2009 12:56:18 +0000 (13:56 +0100)]
baseparse: propagate return value of GstBaseParse::set_sink_caps()
gst_base_parse_sink_setcaps() presumably should fail if the subclass
returns FALSE from its ::set_sink_caps() function.
Tim-Philipp Müller [Mon, 1 Jun 2009 12:47:01 +0000 (13:47 +0100)]
baseparse: don't try to GST_LOG an already-freed caps string
The proper way to log caps is via GST_PTR_FORMAT anyway.
Mark Nauwelaerts [Tue, 26 May 2009 17:43:53 +0000 (19:43 +0200)]
baseparse: fix debug category
Mark Nauwelaerts [Mon, 27 Apr 2009 20:39:15 +0000 (22:39 +0200)]
baseparse: fix (regression in) newsegment handling
(aacparse, amrparse, flacparse). Fixes #580133.
René Stadler [Tue, 7 Apr 2009 01:53:02 +0000 (04:53 +0300)]
baseparse: Fix slightly broken buffer-in-segment check (aacparse, amrparse, flacparse)
René Stadler [Sun, 5 Apr 2009 00:50:19 +0000 (03:50 +0300)]
baseparse: Fix push mode seeking (aacparse, amrparse)
Sending the flush-start event forward before taking the stream lock actually
works, in contrast to deadlocking in downstream preroll_wait (hunk 1).
After that we get the chain function being stuck in a busy loop. This is fixed
by updating the minimum frame size inside the synchronization loop because the
subclass asks for more data in this way (hunk 2).
Finally, this leads to a very probable crash because the subclass can find a
valid frame with a size greater than the currently available data in the
adapter. This makes the subsequent gst_adapter_take_buffer call return NULL,
which is not expected (hunk 3).
Mark Nauwelaerts [Tue, 31 Mar 2009 14:07:46 +0000 (16:07 +0200)]
baseparse: Delay newsegment as long as possible.
If newsegment is sent (too) early, caps may not yet be fixed/set,
and downstream may not have been linked.
Stefan Kost [Fri, 27 Feb 2009 09:24:37 +0000 (11:24 +0200)]
baseparse: revert last change and properly fix
Baseparse internaly breaks the semantics of a _chain function by calling it with
buffer==NULL. The reson I belived it was okay to remove it was that there is
also an unchecked access to buffer later in _chain. Actually that code is wrong,
as it most probably wants to set discont on the outgoing buffer.
Stefan Kost [Thu, 26 Feb 2009 09:02:06 +0000 (11:02 +0200)]
baseparse: remove checks for buffer==NULL
Accordifn to docs for GstPadChainFunction buffer cannot be NULL. If we would
leave the check, we would also need more such check below.
Jan Schmidt [Fri, 30 Jan 2009 18:18:10 +0000 (18:18 +0000)]
Fix the return value of the default parse_frame function.
Fix the return value of the default parse_frame function in both
copies of GstBaseParse
Stefan Kost [Thu, 13 Nov 2008 14:21:39 +0000 (14:21 +0000)]
gst/: Fix baseparse type name.
Original commit message from CVS:
* gst/aacparse/gstbaseparse.c:
* gst/amrparse/gstbaseparse.c:
Fix baseparse type name.
Stefan Kost [Thu, 13 Nov 2008 12:59:34 +0000 (12:59 +0000)]
Add two new baseparse based parsers (aac and amr) from Bug #518857.
Original commit message from CVS:
* configure.ac:
* gst/aacparse/Makefile.am:
* gst/aacparse/gstaacparse.c:
* gst/aacparse/gstaacparse.h:
* gst/aacparse/gstbaseparse.c:
* gst/aacparse/gstbaseparse.h:
* gst/amrparse/Makefile.am:
* gst/amrparse/gstamrparse.c:
* gst/amrparse/gstamrparse.h:
* gst/amrparse/gstbaseparse.c:
* gst/amrparse/gstbaseparse.h:
Add two new baseparse based parsers (aac and amr) from Bug #518857.
Havard Graff [Sat, 19 Mar 2011 23:56:08 +0000 (00:56 +0100)]
queue[2]: Make src query MT-safe
It is possible that the element might be going down while the event arrives