Commit graph

79 commits

Author SHA1 Message Date
Edward Hervey 8707914d23 tagdemux: Use upstream GST_EVENT_STREAM_START if present
If we have an upstream GST_EVENT_STREAM_START, use that one instead
of creating a new one which could be completely different from the
upstream one and drop information (like the stream flags and stream
object).

Only create a new event if we don't already have one from upstream

https://bugzilla.gnome.org/show_bug.cgi?id=797215
2018-09-27 15:09:06 +02:00
Sebastian Dröge 0340c7e1f8 tagdemux: Propagate flow returns from gst_type_find_helper_get_range() properly
Instead of considering every failed typefinding as an error, even in
case of e.g. GST_FLOW_FLUSHING.
2018-08-08 12:46:43 +02:00
Sebastian Dröge 2f497ed217 tagdemux: Properly propagate gst_pad_pull_range() errors
And don't consider FLUSHING an actual error, just stop in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796883
2018-07-27 16:23:09 +03:00
Tim-Philipp Müller 92579cb845 tag: Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-06-23 22:03:27 +02:00
Kyrylo Polezhaiev b4df0bf07a tagdemux: avoid timestamp field initialisation for tag event
This field is not used and will be removed in 2.0 API.

https://bugzilla.gnome.org/show_bug.cgi?id=761462
2018-05-07 01:16:27 +10:00
Sebastian Dröge e74e1e80fa tag: Generate GLib enums/flags with glib-mkenums 2017-04-09 12:51:52 +03:00
Thibault Saunier 099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Sebastian Dröge 7c1a32e28b tagdemux: Fix crash when shutting down element during getrange()
Ensure that nothing is in any of the streaming thread functions
anymore when going from PAUSED to READY. While the parent's state change
function has deactivated all pads, there is nothing preventing
downstream from activating our srcpad again and calling the getrange()
function. Although we're in READY!

https://bugzilla.gnome.org/show_bug.cgi?id=775687
2016-12-06 16:29:23 +02:00
Thibault Saunier bc6aae6ca7 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:24 -03:00
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