Commit graph

135 commits

Author SHA1 Message Date
Sebastian Dröge
42dee942d4 decodebin2: Emit "remove-decoded-pad" signal when pads are removed from decodebin2
Fixes bug #636198.
2010-12-11 17:15:28 +01:00
Tim-Philipp Müller
1bfefc50af docs: improve decodebin2 docs a little
Mention that new pads may be created even after no-more-pads.

https://bugzilla.gnome.org/show_bug.cgi?id=634584
2010-11-22 00:54:35 +00:00
Harri Mähönen
7c5e39664e *decodebin*: don't leak pad templates set on ghostpads
https://bugzilla.gnome.org/show_bug.cgi?id=635067
2010-11-18 00:11:41 +00:00
Edward Hervey
a5752d8ea7 decodebin2: Don't add non prerolled stream to topology
If a final stream didn't preroll, don't add it to the topology since
it doesn't give any information at all.

https://bugzilla.gnome.org/show_bug.cgi?id=632988
2010-10-24 16:18:17 +02:00
Stefan Kost
2a00fefd2a *decodebin*: set pad-templates on ghostpads
This makes calling gst_pad_get_pad_template() work.
2010-10-13 23:30:55 +03:00
Tim-Philipp Müller
8d29594491 decodebin2: declare decodebin2 stable, deprecate the old decodebin
https://bugzilla.gnome.org/show_bug.cgi?id=624949
2010-10-13 13:05:12 +01:00
Edward Hervey
b8dea19bbd decodebin2: Don't post async-done when not needed
Where it was previously located, we would get async-done for the first
unknown-type, even if other valid streams would appear afterwards.
decode_bin_expose() will take care of posting async-done when the group
is exposed.

But we still want to post it in case the typefinding returned an unknown
type, in which case we will post it after posting an error.

These two changes ensure we do as much as possible before posting async-done.
2010-09-29 18:59:16 +02:00
Edward Hervey
75b522dacf decodebin2: Actually dispose the unused ghostpads 2010-09-15 14:17:58 +02:00
Mark Nauwelaerts
60cad9f007 decodebin2: prevent another race with shutdown state change 2010-09-13 10:06:13 +02:00
Edward Hervey
9e0358930d playback: Switch to gstfactorylist from core
https://bugzilla.gnome.org/show_bug.cgi?id=626181
2010-09-03 19:31:52 +02:00
Edward Hervey
8b4bea5f6a playback: Delay usage of GstFactoryList
By delaying it to when it's actually needed, we speed things up a bit
since some elements might have been added/removed in between.

https://bugzilla.gnome.org/show_bug.cgi?id=626718
2010-08-13 17:00:05 +02:00
Wim Taymans
908afd4b15 decodebin2: use more efficient way of getting caps
When inspecting the caps of a pad, try to get the pad _CAPS first before calling
the getcaps function.
2010-08-04 10:33:31 +02:00
Edward Hervey
ec637580a8 decodebin2: Properly clean DecodeChain after errors.
If an error happens, the PAUSED state will never be reached. If an
application re-uses decodebin2 (like totem) where one would normally
set to READY between each file, the cleanup that normally happens in
the PAUSED=>READY codepath will never be called, resulting in the
following file to re-use the previous demuxer/decoder/...

https://bugzilla.gnome.org/show_bug.cgi?id=622807
2010-06-26 17:57:24 +02:00
Wim Taymans
6d2621d02c decodebin2: improve autoplugging
Use the pad caps when they are available to continue the autoplugging. If the
pad caps are set, they are fixed and then we can directly continue autoplugging.
2010-06-16 19:17:05 +02:00
Prahal
2cb7cfab19 decodebin2: use accumulator for autoplug-sort
Use an accumulator for the autoplug-sort signal so that we can stop the emission
when a signal handler produced a valid result. This avoids the object handler
to overwrite the results from user signals.

Fixes #621161
2010-06-14 11:19:10 +02:00
Edward Hervey
cbff745b49 decodebin2: Handle raw streams we don't want.
If a file contains raw streams (not requiring a decoder) that we do
not want (expose-all-streams == FALSE), we would previously consider
those of unknown-type (missing a decoder) ... whereas in fact it was just
because they don't need decoders.

This only applies if expose-all-streams is FALSE.
2010-06-04 19:30:14 +02:00
Edward Hervey
ac4188bd54 decodebin2: Add a property to not expose/decode all streams
API : expose-all-streams

If disabled:
* only the streams that CAN be decoded and match the final caps will have a
  decoder plugged in and be exposed.
* the streams that COULD HAVE BEEN decoded but do not match the finals caps
  will not have a decoder plugged in and will not be exposed.

If no decoder is available to decode a certain stream, then the missing element
message will still be emitted regardless of the value of the property.

https://bugzilla.gnome.org/show_bug.cgi?id=617868
2010-05-07 17:38:38 +02:00
Edward Hervey
e84b203de2 decodebin2: rename are_raw_caps to are_final_caps, correct comment
https://bugzilla.gnome.org/show_bug.cgi?id=617868
2010-05-07 17:18:37 +02:00
Edward Hervey
a58183459f decodebin2: Removing dead assignment.
The value of group is overwritten a few lines below before being used.
2010-04-01 13:53:37 +02:00
Benjamin Otte
5e21fa5e0e gst_element_class_set_details => gst_element_class_set_details_simple
Also change my email from the old university one to the current one.
2010-03-16 17:41:50 +01:00
Benjamin Otte
43b1683421 Add -Wmissing-declarations -Wmissing-prototypes to warning flags
Includes all the fixes necessary to make stuff compile again.
2010-03-11 13:50:31 +01:00
Sebastian Dröge
cdf53e5e86 decodebin2: First post a missing-plugin message, then emit the unkown-type signal
This makes sure that there *always* is a missing plugin message in the bus
before any errors or warning messages.
2010-02-15 08:26:05 +01:00
Sebastian Dröge
b37de8a63b decodebin2: Set ghostpad targets to NULL when freeing a decode chain
Otherwise the ghostpad will still be linked to the peer and there
will still be a reference kept, leading to nothing being unlinked
and destroyed until decodebin2 is finalized.

This fixes reuse of decodebin2 if a raw stream is connected to
its sinkpad.
2010-02-15 01:21:14 +01:00
Edward Hervey
c60f94da58 decodebin2: Don't skip an element when getting the topology
Fixes #608167
2010-01-26 17:29:21 +01:00
Mark Nauwelaerts
2482a536ac decodebin2: sprinkle some more locking
... to avoid races and ensure some data structure consistency.

See also #574289.
2010-01-16 18:48:00 +01:00
Mark Nauwelaerts
45447337ad decodebin2: mind blocked pads when shutting down
Fix regression in shutdown deadlock handling now that the
target of a ghostpad is blocked instead of ghostpad itself.

See also #574293.
2010-01-14 18:26:03 +01:00
Wim Taymans
22939b074c Merge branch 'master' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-base 2010-01-05 10:38:41 +01:00
Wim Taymans
15216d23ac decodebin2: fix typo in debug message 2009-12-23 21:24:48 +01:00
Wim Taymans
99e836a340 decodebin2: avoid some type checks 2009-12-23 18:18:03 +01:00
Wim Taymans
8266d201a0 decodebin2: add some debugging 2009-12-16 11:44:11 +01:00
Thiago Santos
0d6195686b decodebin2: error when all streams have no buffers
In some cases (all buffers dropped by a parser) a decodebin2
chain might receive an EOS before it gets enough data to
expose a decoded pad. In the case that no streams can expose
a pad we should error out instead of hang.

Fixes #542758
2009-11-19 14:51:33 -03:00
Thiago Santos
e3e7ba0d1a decodebin2: set to buffer less on no-more-pads
When a decodebin2 receives no-more-pads of a group it
can set that group's multiqueue buffering thresholds to
'playing' buffering method, avoiding that it buffers
too long and cause problems when using with queue2.
See the associated bug for details.

Fixes #600787
2009-11-18 15:16:18 -03:00
Sebastian Dröge
1da5a3f7d3 playback: Update factories list on every access if the registry has changed
This makes application's simpler because the element doesn't need to
go to NULL first to make use of newly installed plugins.

Fixes bug #601480.
2009-11-11 14:00:26 +01:00
Sebastian Dröge
ab96265c57 playback: When going from NULL->READY check if the registry has new features
This makes it possible to use newly installed plugins after going back
to NULL instead of requiring a new instance.

Fixes bug #599266.
2009-11-10 18:30:46 +01:00
Sebastian Dröge
6c15d9e8d4 decodebin2: Add property to disable/enable posting of stream-topology messages
Most people don't need this messages and generating them is quite
expensive.
2009-11-06 17:01:04 +01:00
Sebastian Dröge
5798b543df decodebin2: Protect subtitle elements and subtitle encoding by a new mutex
Using the object lock here can and will lead to deadlocks because
of deep-notifies of property changes: the deep-notify handler will
get the parent of objects, which will take the object lock again.

Fixes bug #600479.
2009-11-06 15:15:06 +01:00
Stefan Kost
a78c8bf3ed pad: rename new api from _refed to _reffed.
Due to popular demand rename the new api as we still can.
2009-11-05 13:00:27 +02:00
Wim Taymans
89f02fb269 decodebin2: use new getcaps function to avoid copies
Use the gst_pad_get_caps_refed() to avoid some caps copy functions.
2009-11-04 18:31:09 +01:00
Sebastian Dröge
0285d77d96 decodebin2: Use static caps for the default raw caps and put them into a separate header
This way we can use the same default raw caps everywhere.
2009-11-03 13:03:23 +01:00
Tim-Philipp Müller
6f4c1ac583 Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a sixteenth of a polar bear.
2009-10-28 00:59:35 +00:00
Wim Taymans
0b00e25b54 decodebin2: implement low/high watermark property 2009-10-27 15:22:22 +01:00
Wim Taymans
f998858192 decodebin2: buffering is implemented now 2009-10-24 16:09:59 -04:00
Wim Taymans
3d2b3dd268 decodebin2: configure use-buffering on multiqueue 2009-10-24 16:09:59 -04:00
Wim Taymans
baecd335b2 decodebin2: refactor queue size configuration.
Refactor the queue size configuration into a new method.
Use the same queue values for buffering as for preroll.
2009-10-24 16:07:36 -04:00
Wim Taymans
cffe4d7bd3 decodebin2: move error path down 2009-10-24 16:07:36 -04:00
Wim Taymans
1c982d0dbe decodebin2: implement max queue size properties 2009-10-24 16:07:36 -04:00
Wim Taymans
3fffb0e2dd decodebin2: add properties for buffering
Add properties that can be used to configure the multiqueue buffers and
buffering methods
2009-10-24 16:07:36 -04:00
Edward Hervey
891c54f6f8 gst/decodebin2: Ensure we get fixed caps for topology message
There are some corner cases (like with dvdemux amongst others) where
the caps won't be negotiated, but the pad has fixed caps.
2009-10-20 10:15:57 +02:00
Edward Hervey
64c8b1d5d9 gst/decodebin2: Don't expose chains if we're shutting down.
This avoids adding flushing pads to ourself
2009-10-20 10:15:48 +02:00
Sebastian Dröge
efcca84bac decodebin2: Post a element message on the bus with the stream topology
Fixes bug #598533.
2009-10-15 13:35:29 +02:00