Commit graph

229 commits

Author SHA1 Message Date
Edward Hervey
c1d2254b23 baseparse: Don't emit errors on EOS if we saw GAP events
If we saw GAP events (meaning the streams is advancing) before we get
EOS, we should not post an ERROR, since it is not fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=745143
2015-02-26 07:52:05 +01:00
Mark Nauwelaerts
aca7faf520 baseparse: drain segment upon SEGMENT_DONE to ensure proper event order 2015-02-23 20:08:20 +01:00
Mark Nauwelaerts
84f0410186 baseparse: clean up some bogus commented code 2015-02-23 20:08:20 +01:00
Sebastian Dröge
4a5ce862a2 Improve and fix LATENCY query handling
This now follows the design docs everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 17:53:04 +02:00
Vincent Penquerc'h
dd40d99710 baseparse: jump over large skips in pull mode
This bypasses the dumping of buffers we still have to do in push mode.

https://bugzilla.gnome.org/show_bug.cgi?id=730053
2014-12-18 13:11:46 +00:00
Thiago Santos
8f4ef80fc4 baseparse: update the duration variable before emitting the bus
Otherwise the application might still get the old value if it asks
between the message and the real update.
2014-11-28 17:00:17 -03:00
Vincent Penquerc'h
7c4fbc9fb1 baseparse: allow skipping more data than we currently have
This can be useful for skipping large unwanted data, such as
large album art, when we know the size of it from a metadata
header.
2014-11-12 13:43:33 +00:00
Matej Knopp
d8aac32c78 baseparse: don't leak caps in gst_base_parse_process_streamheader
https://bugzilla.gnome.org/show_bug.cgi?id=737762
2014-10-03 12:36:27 +01:00
Tim-Philipp Müller
c78a1b111c Revert "baseparse: don't leak caps in gst_base_parse_process_streamheader"
This reverts commit 5e8b4bf085.

This causes refcounting criticals in the baseparse unit test.
2014-10-03 09:01:39 +01:00
Matej Knopp
5e8b4bf085 baseparse: don't leak caps in gst_base_parse_process_streamheader
https://bugzilla.gnome.org/show_bug.cgi?id=737762
2014-10-02 10:39:54 +03:00
Thiago Santos
59c34a8ff7 baseparse: handle streamheaders by prepending them to the stream
Add a first_buffer boolean state flag to have baseparse do actions
before pushing data. This is used to check the caps for streamheader
buffers that are prepended to the stream, but only if the first buffer
isn't already marked with the _HEADER flag. In this case, it is assumed
that the _HEADER marked buffer is the same as the streamheader.

https://bugzilla.gnome.org/show_bug.cgi?id=735070
2014-08-27 10:30:09 -03:00
Thibault Saunier
4c38895f4b baseparse: Return FLOW_FLUSHING when pushing a frame on a pad that has been flushed
When going to READY, it is possible that we are still pusing a frame but that
our srcpad has already been set to flushing. In that case we should not
post any error on the bus but instead cleanly return FLOW_FLUSHING.

https://bugzilla.gnome.org/show_bug.cgi?id=733320
2014-07-17 17:46:16 +02:00
Thiago Santos
b7516dbf7c baseparse: avoid returning _OK for _NOT_LINKED
When the parser receives non-aligned packets it can push a buffer
and get a not-linked return while still leaving some data still to
be parsed. This remaining data will not form a complete frame and
the subclass likely returns _OK and baseparse would take that
as the return, while it the element is actually not-linked.

This patch fixes this by storing the last flow-return from a push
and using that if a parsing operation doesn't result in data being
flushed or skipped.

https://bugzilla.gnome.org/show_bug.cgi?id=731474
2014-06-25 12:13:07 -03:00
Evan Nemerson
25af4ad652 base: use correct syntax in documentation more consistently
Previously, many constants were prefixed with # or unprefixed,
some functions and macros were prefixed with # instead of suffixed
with (), etc.

https://bugzilla.gnome.org/show_bug.cgi?id=731293
2014-06-06 15:09:21 -04:00
zhouming
2793f808ee baseparse: Pass rate of input segment to output segment
https://bugzilla.gnome.org/show_bug.cgi?id=729701
2014-06-06 13:53:35 +03:00
Jose Antonio Santos Cadenas
f880742638 baseparse: Fix memory leak
Queued frames were not released after being pushed, this
caused a leak of the GstBaseParseFrame structure.

https://bugzilla.gnome.org/show_bug.cgi?id=727883
2014-04-09 10:47:39 +02:00
Edward Hervey
6c2c49a590 baseparse: Remove always-true-checks
a gsize is guaranteed to be positive on all systems since it's an
unsigned value.

CID #1037147
2014-04-05 11:52:03 +02:00
Sebastian Dröge
37670af79c baseparse: Make sure to set the DISCONT flag on the first buffer of each GOP in reverse playback mode 2014-04-03 20:32:02 +02:00
Sebastian Dröge
a76db74496 baseparse: Fix splitting and reversing of GOPs in reverse playback mode
We iterate the current discont group backwards and push each GOP forwards,
starting from the last one. However if the first buffer in the current
discont group is a keyframe, we will keep it around until next time,
which is far from ideal. Just push it.
2014-03-29 10:32:25 +01:00
Thiago Santos
a3ff2976cc baseparse: do not accumulate buffers on passthrough mode
If on passthrough during reverse playback, do not accumulate buffers as
baseparse will never check for DISCONT flag to push those buffers.
So just push buffers downstream as if it was forward playback.

https://bugzilla.gnome.org/show_bug.cgi?id=721941
2014-01-13 08:43:28 -03:00
Thiago Santos
51fa54a281 baseparse: do not ignore TIME segments
TIME segments are being ignored and a standard initialized
segment is used instead. This causes issues as not properly detecting
reverse playback or not cliping output based on the segment.

This seems to be a regression from one of the GstSegment/GstEvent
redesigns on the 0.10 -> 1.0 transition
2014-01-08 16:40:23 -03:00
Thiago Santos
e02c00a58a baseparse: remove pending_segment as it was being misused
It wasn't required, instead baseparse was using it to check the media
caps to identify if it was handling audio or video.

The pending_segment was removed and a checked_media boolean
replaced it for a more accurate naming.

https://bugzilla.gnome.org/show_bug.cgi?id=721350
2014-01-02 16:48:23 -03:00
Thiago Santos
accaadf52a baseparse: push pending events before GAP event
A GAP event is handled as an empty buffer by sinks and they expect
to receive start up events before GAP events (like a segment).

This is important specially if there is a GAP at the beginning of
a stream (before any buffers) so that the segment event can be
pushed downstream before the GAP

https://bugzilla.gnome.org/show_bug.cgi?id=721350
2014-01-02 16:38:40 -03:00
Thiago Santos
d917eb7160 baseparse: refactor pending events pushing
Refactor code repeated 3 times to a common function

https://bugzilla.gnome.org/show_bug.cgi?id=721350
2014-01-02 16:38:40 -03:00
Sebastian Rasmussen
53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Sebastian Rasmussen
e8ecf3c407 Fix some typos in code comments and debug messages
https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:09:39 +00:00
Mark Nauwelaerts
e24722c52c baseparse: ensure to preserve upstream timestamps
... rather than have subclass coming up with an internally parsed one.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707230
2013-11-16 15:17:57 +01:00
Mark Nauwelaerts
8da78d1595 baseparse: try first frame pts and dts for a valid start timestamp 2013-11-02 16:13:27 +01:00
Mark Nauwelaerts
3aaa3fcf92 baseparse: print proper variable in debug statement 2013-11-02 16:13:27 +01:00
Edward Hervey
3c49b5d23b baseparse: Add a property to disable passthrough
In some specific cases (like transmuxing) we want to force the element
to actually parse all incoming data even if the element deems it is not
necessary.

This property simply ignores requests from the element to enable passthrough
mode which results in processing always being enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=705621
2013-08-13 17:11:35 +02:00
Sebastian Dröge
ef8455d395 base: Fix handling of SEGMENT query
The values should be in stream-time, and start/stop should not
be swapped for negative rates.
2013-07-29 12:10:45 +02:00
Sebastian Dröge
eb67ca7625 baseparse: Implement SEGMENT query 2013-07-29 10:49:18 +02:00
Thiago Santos
aa5ea6d80e baseparse: fix seqnum handling for seeks
Use the same seqnum as the seek for flushes/segments that are
caused by the seek. Also do the same for segment events

Fixes #676242
2013-07-25 15:19:35 -03:00
Sebastian Dröge
6363216e43 base: Use new group-id field in stream-start event and message 2013-07-22 15:30:10 +02:00
Wim Taymans
97b1e17b09 baseparse: reset PTS after seek
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702778
2013-07-03 21:26:18 +02:00
Sebastian Dröge
f27a3e12f6 baseparse: Only infer TS if PTS interpolation is enabled
Otherwise this is breaking timestamps of formats that
need reordering.

https://bugzilla.gnome.org/show_bug.cgi?id=597662
2013-04-23 11:49:15 +02:00
Mark Nauwelaerts
6ddbaaa95c baseparse: reset next_pts upon SEGMENT event
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-03-27 18:26:30 +01:00
Mark Nauwelaerts
76acdee908 baseparse: more inter-timestamp tracking
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-03-27 18:26:30 +01:00
David Schleef
9ceb52d334 baseparse: Fix doc typo 2013-02-12 12:31:42 -08:00
David Schleef
2a8c95ff3b baseparse: add gst_base_parse_set_ts_at_offset()
Sets the buffer timestamps based on last seen timestamps at a
particular offset into the frame.

API: gst_base_parse_set_ts_at_offset()
2013-02-12 12:16:27 -08:00
Mark Nauwelaerts
314400d45a baseparse: improve PTS interpolating
... and tracking of DTS.  Fixes cases where PTS is locked on to the
DTS of an incoming buffer with no PTS with invalid data, leading to
no outgoing PTS (since it is not allowed smaller than DTS).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-02-09 12:32:02 +01:00
Tim-Philipp Müller
5ea8937f56 docs: minor GstBaseParse docs fixes
Expose docs for gst_base_parse_finish_frame().
2013-01-14 20:05:23 +00:00
Tim-Philipp Müller
1702623b20 baseparse: add vfuncs to intercept queries
Useful for video parses that want to attach matter or
find out if downstream supports certain metas.

API: GstBaseParseClass::src_query()
API: GstBaseParseClass::sink_query()

https://bugzilla.gnome.org/show_bug.cgi?id=691475
2013-01-13 14:45:31 +00:00
Tim-Philipp Müller
2b1facfe1d baseparse: fix up name of default event vfuncs 2013-01-12 20:54:26 +00:00
Arnaud Vrac
4a1ff7fa95 baseparse: fix invalid output timestamps in some cases 2012-12-17 12:26:14 +01:00
Wim Taymans
fac7eb0a50 NEWSEGMENT -> SEGMENT 2012-12-14 15:24:30 +01:00
Wim Taymans
7518960829 baseparse: pass DTS and PTS to handle_buffer
This makes it handle the timestamps correctly and avoids using a wrong timestamp
for the output.
2012-12-11 16:46:18 +01:00
Wim Taymans
6c99839d89 baseparse: improve debug
Add pts and dts in debug log
2012-12-11 16:46:01 +01:00
Arnaud Vrac
94185ec94a baseparse: forward stream-start event in push mode 2012-11-20 12:46:31 +01:00
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00