Commit graph

70 commits

Author SHA1 Message Date
Tim-Philipp Müller
a2c050a4be tagdemux: fix handling of very short files in push mode
By default we'll wait for a certain amount of data before
attempting typefinding. However, if the stream is fairly
short, we might get EOS before we ever attempted any
typefinding, so at this point we should force typefinding
and output any pending data if we manage to detect the
type.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:07 +01:00
Tim-Philipp Müller
130e78dbd8 tagdemux: fix erroring out if we reach EOS without detecting type
In 0.10 the source pad was a dynamic pad that was only added once
the type had been detected, but in 1.x it's an always source pad,
so checking whether it's still NULL won't work to detect if the
type has been detected.

Makes tagdemux error out when we get EOS but haven't managed to
identify the format of the data after the tag.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:02 +01:00
Michael Olbrich
72879c3639 tagdemux: preserve duration when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the duration if it doesn't start
with the first byte. We just skip the tag here, so the duration is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767791
2016-06-21 10:43:50 +03:00
Michael Olbrich
ac56c1c3a7 tagdemux: preserve timestamp when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the timestamp if it doesn't start
with the first byte. We just skip the tag here, so the timestamp is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767173
2016-06-04 12:40:24 +01:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Thiago Santos
cd07101420 tagdemux: ensure tags have been fetched before pulling data
Otherwise upstream can get confused about offsets as there will
be a jump once the tags have been parsed due to the stripped area.

If upstream pulls from 0 to 100, and then tagdemux does the
tag reading and finds out that the first 200 bytes are the tag, the
next pull from upstream will have an offset of 200 bytes. So
upstream will get the following data:

0 - 100, 300 - (EOS), as it will continue requesting from where
it has last stopped, but tagdemux will add an offset to skip the
tags.

This patch makes sure that the tags have been parsed and skipped
since the first pull range call.

https://bugzilla.gnome.org/show_bug.cgi?id=744580
2015-02-18 21:00:50 -03:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Eric Trousset
2ca256acdb tagdemux: Forward TIME seeks upstream too, maybe upstream can handle that
https://bugzilla.gnome.org/show_bug.cgi?id=723597
2014-02-04 13:56:29 +01:00
Wim Taymans
b55de48843 tagdemux: accumulate buffers in adapter
Accumulate buffers in an adapter instead of appending them because append causes
a lot of memcpys.
Keep track of the last tagsize and accumulate enough data before attempting to
parse more data.

This patch implements a minimal amount of changes in order to not change the
behaviour. We should really rewrite the tag handling and trimming using
the adapter API instead of merging and trimming into a buffer.
2013-11-06 16:27:21 +01:00
Sebastian Dröge
bb870b8b7b tagdemux: Properly implement seeking if tagdemux is driving the pipeline
https://bugzilla.gnome.org/show_bug.cgi?id=705062
2013-07-29 11:40:57 +02:00
Sebastian Dröge
b4365551d0 tagdemux: Add support for group-id in the stream-start event 2013-07-22 15:24:50 +02:00
Olivier Crête
b550764da8 tagdemux: Put the modified time back in the time part of the segment
https://bugzilla.gnome.org/show_bug.cgi?id=704301
2013-07-16 14:02:40 -04:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Mark Nauwelaerts
c629a44162 replace gst_tag_list_free with gst_tag_list_unref 2012-09-14 17:53:21 +02:00
Tim-Philipp Müller
ec27f4e13c tagdemux: also read tags if downstream activates us in pull mode right away
Fix reading of tags for the case filsrc ! footagdemux ! fooparse ! ..
where we would not read the tags because we never start our own
streaming thread.

https://bugzilla.gnome.org/show_bug.cgi?id=673185
2012-09-11 20:53:16 +01:00
Mark Nauwelaerts
899a809330 ext, gst-libs: only activate in pull mode if upstream is seekable 2012-09-11 17:37:27 +02:00
Tim-Philipp Müller
d2237b2276 tagdemux: operate in pull mode
When we are operating in pull mode, we need to pull from upstream and push
downstream. Also make sure to push tags first.
2012-09-10 17:16:26 +02:00
Sebastian Dröge
880b9a20a6 tagdemux: Add stream-id to stream-start event 2012-08-06 14:01:28 +02:00
Sebastian Dröge
99d73c94e9 tag: Update for taglist/tag event API changes 2012-07-28 00:35:02 +02:00
Wim Taymans
683a38ad65 update for new variable names 2012-07-27 15:24:43 +02:00
Edward Hervey
666716a0f0 tagdemux: Push a STREAM_START on new caps 2012-07-13 12:10:01 +02:00
Sebastian Dröge
74c7524b49 gst: Implement segment-done event 2012-07-05 13:06:04 +02:00
Wim Taymans
21e9f64ab2 update for task api change 2012-06-20 10:33:24 +02:00
Wim Taymans
a2172bdb4b update for tag event change 2012-06-06 13:05:47 +02:00
Wim Taymans
69298c5534 update for buffer changes 2012-03-28 12:53:01 +02:00
Wim Taymans
fbf0b4b6cc tagdemux: refactor the tag find function
Move the code to find the tags and to typefind the data into a separate
function. Call this function from the loop function.
2012-02-15 12:29:12 +01:00
Wim Taymans
8dd93b897f tagdemux: don't to data processing in state change
Start a task to perform the pulling and typefind of the tags.
2012-02-15 10:12:55 +01:00
Wim Taymans
ee2c699016 tagdemux: fix src query handler
We don't want to blindly forward all queries.
2012-02-14 13:25:25 +01:00
Wim Taymans
774f80d49c tagdemux: push event in the right direction
Push the stored events in the right direction
2012-02-06 15:54:34 +01:00
Wim Taymans
e2c50fbf0c tagdemux: use default event handler for delayed events 2012-01-26 19:48:59 +01:00
Wim Taymans
81d351b5f0 tagdemux: add FIXME
Add a FIXME because the EOS before-type case now has to be solved differently
because the srcpad is always available.
2011-12-19 11:03:55 +01:00
Wim Taymans
8fc2a21775 update for activation changes 2011-11-21 13:35:34 +01:00
Wim Taymans
d0bd5f04c0 update for new scheduling query 2011-11-18 17:58:58 +01:00
Wim Taymans
1ad4d20607 add parent to activate functions 2011-11-18 13:56:04 +01:00
Wim Taymans
3a53451501 tag: update for new typefind 2011-11-17 16:15:46 +01:00
Wim Taymans
e302833e65 add parent to pad functions 2011-11-17 12:48:25 +01:00
Wim Taymans
2202511e77 add parent to query function 2011-11-16 17:25:17 +01:00
Wim Taymans
28157e6f21 _query_peer_*() -> _peer_query_*() 2011-11-15 18:04:17 +01:00
Tim-Philipp Müller
046dc1097c tag: convert GstTagDemux's sometimes source pad to an always source pad
Originally decodebin couldn't deal with that in 0.10, but now simply
setting the caps when we know them should be enough. Pad activation
mode switching might need some more testing/tweaking with the new
arrangement.
2011-11-14 10:07:06 +00:00
Wim Taymans
372b9329b9 remove query types 2011-11-09 11:47:54 +01:00
Wim Taymans
7247eb5f2c fix compile for SEEK_TYPE_CUR removal 2011-10-28 16:11:36 +02:00
Wim Taymans
f1088ed647 update for UNEXPECTED -> EOS flowreturn 2011-10-10 11:39:52 +02:00
Josep Torra
5629ed74b3 Fix debug statements
Fixes build on MacOSX

Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
2011-08-10 11:15:41 +02:00
Tim-Philipp Müller
3d25fe33ea gst-libs: update for query API changes 2011-07-27 01:16:08 +01:00
Wim Taymans
c88ee10c9b Merge branch 'master' into 0.11
Conflicts:
	ext/theora/gsttheoraenc.c
2011-06-06 16:27:12 +02:00
Mark Nauwelaerts
5ed90ffc2c tagdemux: no input data implies no type can be found
... and posting a proper error message to this effect is appropriately
informative and prevents auto-plugging otherwise stalling.
2011-06-06 14:43:02 +02:00
Wim Taymans
010add200a scheduling: port to new scheduling query 2011-05-24 17:37:45 +02:00
Sebastian Dröge
884213b8b8 base: Update for SEGMENT event parse API changes 2011-05-18 17:23:18 +02:00
Sebastian Dröge
318ed07598 Revert "-base_port to new query API"
This reverts commit c9f4e0676b.
2011-05-17 11:25:31 +02:00
Wim Taymans
94dfe80f71 -base: port to new SEGMENT API 2011-05-16 13:48:11 +02:00