Commit graph

159 commits

Author SHA1 Message Date
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
Wim Taymans cb54ab7d90 typefind: fix for new getrange method signature
gst_type_find_helper_get_range_ext -> gst_type_find_helper_get_range
2011-11-17 16:15:23 +01:00
Wim Taymans 612b1fbb14 pad: add parent to other functions
Add parent to chain, chain_list, getrange and event functions.
2011-11-17 12:40:45 +01:00
Wim Taymans 09a8294d36 pad: add parent to the query function 2011-11-16 17:22:56 +01:00
Wim Taymans 4b216bf73a adapter: remove flush from _unmap 2011-11-10 18:18:24 +01:00
Wim Taymans 756f6eb3f2 pad: refuse events in flushing
when we are flushing, don't store the event on the pad but simply return FALSE.
Don't deactivate the srcpad, we need it to be active in order to push the
caps. Downstream can change the scheduling mode of an active pad.
2011-11-09 17:25:30 +01:00
Wim Taymans 5cf8e68944 Merge branch 'master' into 0.11
Conflicts:
	gst/gstmessage.c
	gst/gstquery.c
	gst/gstregistrychunks.c
	gst/gstsegment.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +02:00
Josep Torra d7d2be07af typefinder: use GST_TYPE_FIND_NONE instead of 0
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Josep Torra 178bdccb76 Fix and clarify debug statements
Fixes build on MacOSX

Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
2011-08-10 11:01:58 +02:00
Tim-Philipp Müller 99742dc57e plugins: update for query API changes 2011-07-28 11:24:19 +01:00
Wim Taymans a767bf2bf9 caps: use the caps event
Use the caps event instead of gst_pad_set_caps() and the setcaps function
2011-06-07 09:43:20 +02:00
Wim Taymans 7e6d579301 scheduling: port to new scheduling query 2011-05-24 17:39:56 +02:00
Sebastian Dröge 3d2127f865 Revert "query: allow _make_writable on query handlers"
This reverts commit cf4fbc005c.

This change did not improve the situation for bindings because
queries are usually created, then directly passed to a function
and not stored elsewhere, and the writability problem with
miniobjects usually happens with buffers or caps instead.
2011-05-17 11:21:41 +02:00
Wim Taymans cf4fbc005c query: allow _make_writable on query handlers
Pass a GstQuery ** to the query handlers so that they can make the query
writable before using a setter on it.
Port code to new API.
2011-05-10 18:36:33 +02:00
Wim Taymans ba6b915651 base: avoid using buffer caps
Comment all code using buffer caps.
Rework capsfilter code a little.
Fix some unit tests
2011-05-08 12:46:17 +02:00
Wim Taymans 8ca3f9e71a typefind: don't unset caps 2011-05-06 17:39:08 +02:00
Wim Taymans c4751ec8c1 Revert "context: use context on buffers instead of caps"
This reverts commit 9ef1346b1f.

Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Wim Taymans 9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Sebastian Dröge 5020738a6d elements: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:45:36 +02:00
Wim Taymans 38ffe30745 memory: more work on implementing buffer memory 2011-03-28 20:08:46 +02:00
Wim Taymans d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02:00
Wim Taymans 70be8d8d95 improve type registration 2011-02-23 10:35:36 +01:00
Wim Taymans 6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01:00
Stefan Kost c5a57190ee typefind: don't take object lock for reading the found caps
Once we switch to normal mode, we're not typefinding anymore and thus the caps
will not change. Therefore can avoid the object lock in the data-flow path.
The locking was added in order to fix bug #608877.
2011-01-28 11:17:48 +02:00