Commit graph

182 commits

Author SHA1 Message Date
Tim-Philipp Müller
691bd8bd87 typefind: use GST_BUFFER_OFFSET_NONE for buffer offset 2014-12-10 11:16:09 +00:00
Edward Hervey
f1c2cd60c3 typefind: Propagate input buffer offset
The initial buffers might have non-default offsets, make sure they get
propagated if present.
2014-12-01 10:47:01 +01:00
Ognyan Tonchev
cf04dc0486 typefindelement: do not leak sticky events in flush_stop
https://bugzilla.gnome.org/show_bug.cgi?id=736813
2014-09-17 17:39:10 +01:00
Tim-Philipp Müller
64cc548c16 typefindelement: remove prototype for function that no longer exists 2014-07-25 11:45:56 +01:00
Edward Hervey
f1abac1109 typefindelement: Propagate input buffer PTS and DTS
The initial buffers (that were used for timestamping) might have PTS
and DTS set. In order to forward those properly, get the initial
PTS/DTS from the adapter and set them on the reconstructed output
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=733291
2014-07-17 09:45:54 +02:00
Sebastian Dröge
a91b51c9b7 typefind: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-05-31 17:35:52 +02: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 Dröge
631421b8af typefind: Add missing break after handling the GAP event
Thanks to Edward Hervey for noticing.
2013-09-04 14:42:38 +02:00
Sebastian Dröge
4aef70fed1 typefind: Only advance offset by the number of bytes we actually read
There might be a short read at EOS.
2013-07-29 11:05:09 +02:00
Sebastian Dröge
d9f3d3560e typefind: Use new group-id in stream-start event 2013-07-22 15:30:10 +02:00
Sebastian Dröge
1d1946a321 typefind: Handle the force-caps property more similar to all typefinding code flow
This makes sure that events happen in order and simplifies the code a bit.
2013-05-15 13:22:04 +02:00
Nicolas Dufresne
ba354f6b03 typefind: Send stream-start before anything else
To do so, send stream-start when the streaming thread goes up for the first
time.

https://bugzilla.gnome.org/show_bug.cgi?id=699767
2013-05-07 09:17:13 +02:00
Sebastian Dröge
c24bcbf511 typefind: Always leave TYPEFIND mode when we're stopping typefinding 2013-04-29 13:24:56 +02:00
Sebastian Dröge
11f6e08aae typefind: Simplify code
This is only called when in TYPEFIND mode.
2013-04-29 13:24:56 +02:00
Sebastian Dröge
7982f682dd typefind: Push pending events independent of the existence of a downstream chain function and peer
Downstream might create a peer only as result of the events in theory.
2013-04-29 13:24:56 +02:00
Sebastian Dröge
32e05f8a1e typefind: Only push CAPS event once if we get one from upstream
https://bugzilla.gnome.org/show_bug.cgi?id=692784
2013-04-29 13:24:56 +02:00
Sebastian Dröge
2a34f767d4 typefind: Stop typefinding if we get a CAPS event from upstream 2013-04-29 13:24:56 +02:00
Sebastian Dröge
0fda329bbb typefind: Improve handling of GAP events
There's still room for improvement though.
2013-04-29 13:24:56 +02:00
Sebastian Dröge
fc4105c1f9 typefind: Forward events that should happen before the caps event directly
There's no point in storing them and sending them later, and doing so would
later require to distinguish between events that should come before caps and
after.

https://bugzilla.gnome.org/show_bug.cgi?id=692784
2013-04-29 13:24:56 +02:00
Sebastian Dröge
cf0566f9ca typefind: Only push pending buffers and events if we have caps 2013-04-29 13:24:56 +02:00
Sebastian Dröge
922815996f typefind: Remove code that would cause caps to be sent twice
Whenever we set typefind->caps we will also send a caps event downstream.
2013-04-29 13:24:56 +02:00
Tim-Philipp Müller
e1c6a56596 typefind: fix caps leak when used in connection with uridecodebin and playbin
Don't leak forced sink caps.
2013-04-27 00:05:45 +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
Wim Taymans
701424be9b typefind: send STREAM-START event
Send a STREAM_START event when we are operating in pull mode.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684424
2012-09-26 13:25:03 +02:00
Tim-Philipp Müller
a85991eeb8 baseparse, typefind: only activate in pull mode if upstream is seekable
Upstream might support pull mode, but only sequential pulls,
which isn't gonna do much for us.

https://bugzilla.gnome.org/show_bug.cgi?id=634927
2012-09-11 01:40:53 +01:00
Tim-Philipp Müller
ba39106758 typefind: send segment_done event in addition to segment_done message 2012-08-02 00:22:29 +01:00
Wim Taymans
f05b0e222f Update for new seeking variable name
When seeking, the start value and type are now called start and start_type.
2012-07-27 15:24:52 +02:00
Wim Taymans
a1f1bbd363 typefind: require bytes before typefinding
Require that we have some bytes in the adapter before we attempt to typefind.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680479
2012-07-24 12:38:15 +02:00
Tim-Philipp Müller
c51a2c1ddf basesrc, basesink, baseparse, typefind: use GST_SEGMENT_FLAG with segment flags 2012-07-09 21:51:07 +01:00
Tim-Philipp Müller
dcc35b9c67 typefindelement: remove unimplemented maximum property 2012-07-06 11:26:14 +01:00
Wim Taymans
76e8b2ecda task: add GDestroyNotify to _new
Add a GDestroyNotify to the user_data we pass to gst_task_new()
Change gst_pad_start_task() to also take the notify
2012-06-20 10:31:49 +02:00
Matej Knopp
b3cee7155a typefindelement: Only send caps when pad is being activated
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677819
2012-06-11 10:47:40 +02:00
Sebastian Dröge
8d6ead8038 elements: Use gst_pad_set_caps() and don't ignore its return value 2012-06-08 15:45:38 +02:00
Alban Browaeys
10396f12d4 typefindelement: if sink pad is activated do not change mode
In commit bf0964b6 a check for pad is activated was not carried.
This leads to attempt to pull while in push mode when force_caps
is set. In this case without the attached check even when activated
in pull mode we activate back to push mode.

This is from comment in previous code , case number eight:
 8. if the sink pad is activated, we are in pull mode. succeed.
-     otherwise activate both pads in push mode and succeed.

Putting it back fixes playback of webm in webkit+gstreamer 1.0 .

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676003
2012-05-14 12:56:05 +02:00
Tim-Philipp Müller
a63829b4ff plugins: use new gst_element_class_set_static_metadata() 2012-04-09 13:05:07 +01:00
Mark Nauwelaerts
bcb98f409b typefindelement: plug caps leaks 2012-03-30 16:53:09 +02:00
Wim Taymans
db1318ab4a pad: change the semantics of get/pull_range a little
Make it so that one can specify a buffer for get/pull_range where the downstream
element should write into. When passing NULL, upstream should allocate a buffer,
like in 0.10.
We also need to change the probes a little because before the pull probe, there
could already be a buffer passed. This then allows us to use the same PROBE
macro for before and after pulling.
While we're at the probes, make the query probe more powerful by handling the
GST_PAD_PROBE_DROP return value. Returning _DROP from a query probe will now
return TRUE upstream and will not forward the probe to the peer or handler.
Also handle _DROP for get/pull_range properly by not dispatching to the
peer/handler or by generating EOS when the probe returns DROP and no buffer.
Make filesrc handle the non-NULL buffer passed in the get_range function and
skip the allocation in that case, writing directly into the downstream provided
buffer.
Update tests because now we need to make sure to not pass a random value in the
buffer pointer to get/pull_range
2012-03-16 21:37:10 +01:00
Wim Taymans
b54b886fc5 typefind: proxy allocation query 2012-03-16 21:36:33 +01:00
Wim Taymans
fe5fe438d3 typefind: remove const from refcounted GstCaps
Having const on refcounted objects require us to make copies instead of simply
taking a ref, don't do that.
2012-03-10 09:25:43 +01:00
Sebastian Dröge
cfe71423f0 gst: Remove gstmarshal.[ch] completely and use the generic marshaller
Fixes bug #671130.
2012-03-02 11:05:48 +01:00
Wim Taymans
58ecde9db9 typefind: don't ignore return value when starting a task 2012-02-15 10:13:37 +01:00
Wim Taymans
fed0284d3c typefind: clean up src query handler 2012-02-14 13:24:49 +01:00
Wim Taymans
374d5c36f9 typefind: pass results from activation 2012-02-14 12:57:14 +01:00
Wim Taymans
27d639ec09 typefind: fix race in pad mode change
Fixes #668909 and presumably also #669483
2012-02-08 14:32:01 +01:00
Vincent Penquerc'h
27ac781ba6 typefind: answer caps queries with our typefound caps
This avoids merely forwarding the event to the sink, and getting
something useless such as ANY.

https://bugzilla.gnome.org/show_bug.cgi?id=667571
2012-01-27 16:44:35 +01:00
Sebastian Dröge
bf0964b63a typefind: Do typefinding from a separate thread and not from the state change function 2012-01-27 16:19:33 +01:00
Edward Hervey
7cef56076e typefind: Send caps again after activation
Avoids ending up in cases where typefind gets activated in pull-mode
and caps never get sent.

https://bugzilla.gnome.org/show_bug.cgi?id=667337
2012-01-10 12:58:59 +01:00
Wim Taymans
2f1ed65339 pad: Merge pad mode activation functions
Add the pad mode to the activate function so that we can reuse the same function
for all activation modes. This makes the core logic smaller and allows for some
elements to make their activation code easier. It would allow us to add more
scheduling modes later without having to add more activate functions.
2011-11-21 13:29:05 +01:00
Wim Taymans
770159fb1c query: improve scheduling query
Turns some boolean arguments in the scheduling query to flags, which are easier
to extend and makes the code easier to read.
Make extra methods for configuring and querying the supported scheduling modes.
This should make it easier to add new modes later.
2011-11-18 17:27:16 +01:00
Wim Taymans
39a5e26ea9 pad: add parent to activate functions 2011-11-18 13:54:29 +01:00