Commit graph

159 commits

Author SHA1 Message Date
Sebastian Dröge
216258fbc2 playbin2: Let the input-selectors sync all streams to the running time
This is especially needed when switching between a non-sparse and sparse
video stream, see bug #537382. It also lowers the time needed for switching
between streams a bit.
2011-05-26 11:41:50 +02:00
Sebastian Dröge
105da803ad playbin2/playsink: Decide if A/V caps are raw only inside playsink
Before playbin2 would use different selectors for raw audio and
compressed audio (and the same for video) and used different
pads from playsink. This made the involved logic much more
complex and was not implemented completely in playsink, which
made it impossible to support files with a compressed and
uncompressed stream that is support by the sink.

playbin2 handles raw/non-raw streams the same now and the
decision is left to playsink, which now can also handle
caps changes from raw to non-raw and the other way around.

Fixes bug #632788.
2011-05-14 11:42:32 +02:00
Mark Nauwelaerts
961226e0cd playbin2: avoid foregoing READY_TO_NULL when appropriate 2011-04-15 11:13:31 +02:00
Mark Nauwelaerts
2bb91c4880 playbin2: ensure proper PAUSED_TO_READY cleanup
... since going async to PAUSED might fail, and never making it to PAUSED
subsequently skips going down to READY.

Fixes #647781.
2011-04-14 22:14:50 +02:00
Sebastian Dröge
9c13edef4e playbin2: Check if an already existing sink supports the non-raw format too
Before we were assuming that a sink will always support all non-raw formats
in a single stream.
2011-03-23 14:43:36 +01:00
Arun Raghavan
b0ef98001f playbin2: Check if an element accepts requisite caps before selecting
In addition to ensuring that an element we want to select in
autoplug-select can enter the READY state, we also now check if it can
accept the caps we wish to plug it for. This is handy for sinks that
need to perform a probe to figure out whether they can actually handle a
given format.
2011-03-23 14:42:05 +01:00
Sebastian Dröge
b76efc7f5d playbin2: Set sinks to READY before checking if it accept caps
Fixes bug #642732.
2011-03-23 14:33:17 +01:00
Sebastian Dröge
a0ff13217a playbin2: Always prefer the custom set sink and also set it back to NULL in all cases. 2011-03-23 14:31:40 +01:00
Sebastian Dröge
4e49d58917 playbin2: Only consider the audio/video sinks in autoplug_continue for the normal uridecodebin
Considering them for the subtitle uridecodebin will add audio/video
streams that might be in a file used as subtitle file.
2011-03-23 14:28:36 +01:00
Stefan Kost
63be375c21 plaback: trim trailing whitespace 2011-03-14 10:43:42 +02:00
Stefan Kost
cf9aaffcb9 playbin2: set several properties in one go
g_object_set is a varargs function. Save 7 g_obvject_calls (and the overhead of
them) by using it accordingly.
2011-03-04 14:43:20 +02:00
Tim-Philipp Müller
c48c193b56 playbin2, uridecodebin: add "source-setup" signal
Add "source-setup" signal for convenience and discoverability. No need
to figure out "notify::source", look up the notify callback signature,
then do an g_object_get() to get the source element..

https://bugzilla.gnome.org/show_bug.cgi?id=626152
2011-02-24 16:53:01 +00:00
Sebastian Dröge
0e3c32ac72 playbin2: If a sink claims to support ANY caps assume that it only supports the usual raw formats
This should be changed again in 0.11, if a sink really claims to support ANY
caps it should support everything or provide correct caps.
2011-02-18 17:29:07 +01:00
Sebastian Dröge
2fc70442a7 playbin2: Use gst_pad_accept_caps() instead of intersecting with the getcaps caps
This might be faster and more accurate in some cases to detect if a
sink supports a format and autoplugging can be stopped.
2011-02-18 14:04:38 +01:00
Sebastian Dröge
1351597381 playbin2: Use a recursive mutex for the playbin lock
This lock is taken when activating a group, which could result in
calling the autoplug-continue callback, which also needs this lock
to access the sinks.

See bug #642174.
2011-02-18 10:57:40 +01:00
Sebastian Dröge
140dca43f3 playbin2: Optimize autoplug-continue handler a bit
Don't build merge the caps of all sinks but check them one-by-one
until one supports the caps. Also get reffed caps from the sinkpads
instead of a writable copy and add debug output if a sink claims to
support ANY caps.
2011-02-15 17:46:22 +01:00
Akihiro Tsukada
555e338008 playbin2: Fix handling of non-raw custom sinks
When autoplugging elements in decodebin2, check if
the caps are supported by one of the sink before
continuing autoplugging.

Fixes bug #642174.
2011-02-15 17:24:28 +01:00
Tim-Philipp Müller
dcd4222716 playbin2: use input-selector from core instead of internal copy 2010-12-31 12:14:22 +00:00
Vincent Penquerc'h
f221466099 playbin2: delay stream-changed messages
https://bugzilla.gnome.org/show_bug.cgi?id=637586
2010-12-21 17:42:58 +01:00
Stefan Kost
95b259f9c9 playbin2: add some logging for failure case 2010-12-02 23:04:51 +02:00
Tim-Philipp Müller
8effe1e5ba playbin2: declare stable, deprecate the old playbin
https://bugzilla.gnome.org/show_bug.cgi?id=624949
2010-10-13 12:55:31 +01:00
Edward Hervey
168aceb3da playback: Switch to using gst_video_convert_frame
https://bugzilla.gnome.org/show_bug.cgi?id=629157
2010-09-14 08:42:43 +02:00
Stefan Kost
c45b9d4aef playback: ref the selector pad class inside input-selector
Minimizes the delta to original element in -bad and allows us to keep the
type static.
2010-09-06 11:44:17 +03: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
Robert Swain
268270d35e playbin2: uridecodebin: add property to configure ring buffer size 2010-08-13 16:48:22 +02:00
Mark Nauwelaerts
6c5b437118 playbin2/playsink: update subtitle handling for streamsynchronizer
Streamsynchronizer excepts to see stream-changed msg for all streams, but to
arrange for this, video and subtitle streams need to be decoupled by means
of queues (due to pad blocks that may occur).

Fixes #626463.
2010-08-12 10:52:59 +02:00
Sebastian Dröge
f835533cb4 playbin2: Remove QOS event adjustments for gapless playback mode 2010-07-16 17:40:46 +02:00
Sebastian Dröge
8bd37ab995 playbin2: Disconnect and destroy uridecodebins when going from READY to NULL
Fixes spurious errors that happen after an error and playing a working
stream afterwards or signals that are emitted for non-active groups.

Fixes bug #624266.
2010-07-14 15:11:17 +02:00
Sebastian Dröge
115e503bdf Revert "playbin2: Don't put "raw" subtitle types in the raw caps for decodebin2"
This reverts commit 9d7538247f.

If the DVD subpicture caps are not part of the raw caps, uridecodebin
doesn't qualify resindvdbin as raw source and plugs decodebins, which
causes broken DVD playback because of bugs elsewhere.

This change was originally added to only expose supported, raw subtitles,
e.g. if the subtitle sink did not support DVD subpictures but a converter
to some supported format exists. It's not very important right now because
we have nothing (that is autoplugged) to convert from plaintext/pango-markup
or DVD subpictures to something else.

Fixes bug #623583.
2010-07-06 09:47:45 +02:00
Sebastian Dröge
bc0eefaead playbin2: If setup of the source element fails in READY->PAUSED deactive the current group
Otherwise the uridecodebin will be still a child of playbin2 and
its signals will still be connected. In future state changes this
will then emit unrelated signals that will confuse playbin2 or,
even worse, cause crashes and assertions.

Fixes bug #623318.
2010-07-01 21:29:14 +02:00
Sebastian Dröge
2b9670958d playbin2: If the text-sink claims to support ANY caps assume it only support raw plaintext subtitles
Fixes bug #621071.
2010-06-10 13:06:54 +02:00
Wim Taymans
ecc9a28152 playbin2: add av-offset property
Add av-offset property to control the audio and video sync offset. This can be
used to to manually correct badly synced streams.

See #620529
2010-06-07 14:38:42 +02:00
Wim Taymans
3cf75c34d3 playbin2: move marshaller to screenshot
Move the marshaller for the convert_frame signal to the screenshot file in
preparation for moving it to playsink.

See #620279
2010-06-05 11:09:41 +02:00
Wim Taymans
afcf3a3517 playbin2: move convert_frame to playsink
Move the convert_frame function to playsink and make it part of the API. This is
in preparation to add the convert_frame signal to playsink.

See #620279
2010-06-05 11:09:40 +02:00
Alessandro Decina
a9c6c978b6 playbin2: fix a typo introduced by 9d753824.
video/x-raw-float => audio/x-raw-float. Fixes #619090.
2010-05-19 16:17:19 +02:00
Sebastian Dröge
9d7538247f playbin2: Don't put "raw" subtitle types in the raw caps for decodebin2
We handle them from the autoplug-continue signal, where the caps supported
by the subtitle sink or overlay are known already.
2010-05-18 08:45:52 +02:00
Mark Nauwelaerts
db4ccd8610 playbin2: forward duration query duration during group switch if no cached duration
... such as during first group setup.

Fixes #616396.
2010-04-30 13:36:59 +02:00
Sebastian Dröge
cc8a5bdcd3 playbin2: If a text sink is provided, let subtitle parsing be done by decodebin2 if required
This way subtitle sinks only get buffers in the format that they
understand, i.e. raw parsed text in most cases.

Fixes bug #614942.
2010-04-29 18:21:21 +02:00
Sebastian Dröge
5cfd799076 playbin2: Set subtitle encoding on the decodebins again 2010-04-29 18:21:21 +02:00
Benjamin Otte
3bd4aa26ff Add -Wwrite-strings to configure
Fixes for the code included
2010-03-16 17:41:51 +01: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
ff21fe1d25 playbin2, playsink, subtitleoverlay: Set subtitle encoding properly
For this add subtitle encoding properties to playsink and subtitleoverlay
and update the values in the containing elements.

Also update the font description in textoverlay or the used renderer
element if it is changed during playback.

Fixes bug #610310.
2010-02-22 20:47:34 +01:00
Sebastian Dröge
09f972bdba playbin2: Post a missing element message and an error message if no uridecodebin can be found 2010-02-15 08:48:58 +01:00
Sebastian Dröge
ecffd51751 playbin2: Free the subtitle URI 2010-02-15 08:18:06 +01:00
Tim-Philipp Müller
729b6da76a Revert "playbin2: Only allow to set the URIs in states <= READY or from an about-to-finish signal handler"
This reverts commit 7335ce5d3e.

Support abusing the uri property to configure the next uri to play
outside of the about-to-finish handler for the time being after all.
We also shouldn't use thread private structures for this, since it
should be possible to block the thread that emitted about-to-finish
while the main thread sets the uri property. See #607226.
2010-02-04 18:32:48 +00:00
Tim-Philipp Müller
16601b09fe playbin2: when no uri is set, post an error message
When no uri is set, don't just return STATE_CHANGE_FAILURE from the
state change function, but actually post an error message.
2010-01-30 15:41:32 +00:00
Sebastian Dröge
7335ce5d3e playbin2: Only allow to set the URIs in states <= READY or from an about-to-finish signal handler
Changing the URIs in a state > READY results in unexpected behaviour,
i.e. the new URIs are only used after the current track has finished.

Fixes bug #607226.
2010-01-18 09:32:42 +01:00
Mark Nauwelaerts
36fee21834 playbin2: fix pad ref leak 2010-01-14 10:46:28 +01:00