Commit graph

96 commits

Author SHA1 Message Date
Sebastian Dröge
18f5fad785 playbin2: Improve subtitle passthrough in uridecodebin
Now the caps property isn't set anymore for the subtitle caps
but instead in the autoplug-continue signal it is detected
if the caps belong to a supported subtitle stream.

This makes automatic use of newly installed plugins.
2009-11-12 13:20:42 +01:00
Sebastian Dröge
b02d9837f7 playbin2/playsink: Use new "silent" property instead of unlinking
This makes sure that subtitleoverlay still gets segment updates and
everything to pass on downstream. Without this segment problems happen.
2009-11-12 13:20:41 +01:00
Sebastian Dröge
c5d26b23c7 playbin2: Handle external subtitles better
First of all, make sure that suburidecodebin never
errors out because of not-linked in case external subtitles
are used but then subtitles are disabled.

And then make sure that external subtitles always start from
the correct position and are not racing until EOS if they
get unselected and selected again.
2009-11-12 13:20:41 +01:00
Sebastian Dröge
16073d1eb7 playbin2: Flush the subtitles before switching to a new subtitle stream
This makes sure that all currently shown subtitles disappear
and new ones can be shown as soon as possible.
2009-11-12 13:20:40 +01:00
Sebastian Dröge
e91458f13c playbin2: Set subtitle caps as raw caps for the uridecodebins
This will make sure that no subparse is ever plugged and subtitleoverlay,
that subpicture streams are handled the same was as subtitles and that
subtitle renderers are used if available.

Fixes bugs #595123, #570753, #591662, #591706.
2009-11-12 13:20:40 +01:00
Sebastian Dröge
ced1b8f897 playbin2/playsink: Remove everything related to subpicture streams
These will soon be handled the same way as subtitle streams.
2009-11-12 13:20:40 +01: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
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
fcb283b78b playbin2: avoid copying caps
Use get_caps_refed() when we can.
2009-11-04 18:57:07 +01:00
Sebastian Dröge
0672457604 playbin2: Return NOT_LINKED for unselected text pads from a demuxer
We want to return NOT_LINKED for unselected pads but only for pads
from the normal uridecodebin. This makes sure that subtitle streams
are not raced past audio/video from decodebin2's multiqueue.

For pads from suburidecodebin OK should always be returned, otherwise
it will most likely stop with an error.
2009-11-04 10:53:27 +01:00
Sebastian Dröge
de1db5ccbd playbin2: Proxy notify::volume and notify::mute from the playsink to playbin2 2009-10-29 14:19:09 +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
660fc111d1 playbin2: add flag to enable decodebin buffering
Add a flag that enables buffering in decodebin.
2009-10-24 16:10:00 -04:00
Sebastian Dröge
4de2ab48ea playbin2: Don't destroy the suburidecodebin on errors
It can still be reused
2009-10-24 13:08:07 +02:00
Sebastian Dröge
497d0a4793 playbin2: If setting the state of the suburidecodebin fails just warn, don't error out 2009-10-24 13:07:45 +02:00
Sebastian Dröge
cd5475aa6f playbin2: Don't set uridecodebin states to NULL before reusing them
This makes sure that the internal decodebin2 and everything else can
be reused without reinstantiation.
2009-10-24 12:54:11 +02:00
Sebastian Dröge
2b3741403e playbin2: Use gst_object_has_ancestor() instead of our own implementation of it 2009-10-14 08:36:54 +02:00
Sebastian Dröge
a4bc39ef48 playbin2: Don't stop completely on initialization errors from subtitle elements
Instead disable the subtitles and play the other parts of the stream.

Fixes bug #587704.
2009-10-13 16:53:50 +02:00
Sebastian Dröge
9be848d04f playbin2: Improve debugging of pad blocks 2009-10-07 07:21:38 +02:00
Sebastian Dröge
a4f454dc24 playbin2/playsink: Use gst_object_ref_sink() instead of calling both separately 2009-10-07 07:21:37 +02:00
Sebastian Dröge
91c3a23963 playbin2: Implement GstStreamVolume interface 2009-09-11 16:37:35 +02:00
Sebastian Dröge
662a31983f playbin(2): Document that the volume property uses a linear scale
Fixes bug #571610.
2009-09-10 16:56:14 +02:00
Wim Taymans
2a5cd16eb1 fix whitespace 2009-09-08 13:02:46 +02:00
Wim Taymans
c3ebeec5a5 playbin2: fix refcounting of _get_sink()
g_value_set_object() increases the refcount of the sink, which is not needed
because the object should already be refcounted. Make sure this is always the
case and use g_value_take_object().

Fixes: #592884
2009-08-24 15:08:36 +02:00
Tim-Philipp Müller
5366b61bfc playbin2: use private copy of input-selector
We shouldn't really depend on elements from -bad for stream
selection in playbin2, so use a private copy of input-selector
until the selector plugin is ready to be moved to -base or -good.
Fixes #586356.
2009-07-15 17:42:46 +01:00
Wim Taymans
4403cf4efb playbin2: add support for progressive download
Add a new playbin2 flag (initially disabled) to enable progressive download
buffering in uridecodebin.
2009-07-10 20:26:22 +01:00
Sebastian Dröge
3d751d190d playbin2: Make it possible for READY->PAUSED to succeed after it failed the first time
If READY->PAUSED failed in the source element we would've swapped
the current and next group already. To allow READY->PAUSED to succeed
after the first failure we have to swap the current and next group
back again. This also ensure that we're again in the same state
as before the failed state change and not at the next group.

This was especially a problem for playbin2 pipelines that use the
new mounting support in giosrc as the source would fail for READY->PAUSED
the first time, the application mounts the location and then tries
to go READY->PAUSED again (and this time it would succeed).

Fixes bug #588078.
2009-07-10 17:08:40 +02:00
Stefan Kost
c1f46ea29e volume: include "1.0=100%" in property description 2009-06-30 14:46:38 +03:00
Wim Taymans
c4d729a4da playbin2: set smarter target state on uridecodebin
Set the target state of the newly added uridecodebins to somthing else that
PAUSED so that we keep their state in sync with the playsink state.

Fixes #585268
2009-06-16 18:20:06 +02:00
Jan Schmidt
79e97ec5ec playbin2/uridecodebin: Fix connection-speed propagation
uridecodebin expects the passed connection-speed value in kbps, so we
need to divide the value stored in bps by 1000. Also, lower the upper
limit on the properties to the value that we can actually store in our
internal guint (which is plenty high enough)
2009-06-10 17:05:18 +01:00
Sebastian Dröge
28b366db00 playbin2: API: Add {audio,video,text}-tags-changed signals
Fixes bug #584686.
2009-06-04 08:59:28 +02:00
Wim Taymans
49ee8a2d05 playbin2: also set custom text and subp sinks
Set the custom subpicture and text sinks along with the custom audio and video
sinks when needed.
Fix a little docs blurb too.
2009-06-03 12:45:08 +02:00
Jan Schmidt
8900ada0eb playbin2: Have playbin recognise PGS subpicture streams
Recognise PGS subpicture streams and connect them to the SPU pad
in playsink. Unfortunately this fails badly with negotiation errors
if the SPU is not recent enough to support the stream. I'm not sure
how to add format negotiation in yet.
2009-05-29 00:09:15 +01:00
Tim-Philipp Müller
7620d8800d playbin2: actually use configured audio/video sinks
playbin2 inadvertently used autoaudiosink and autovideosink up to now,
since it would overwrite the sinks configured via the "audio-sink"
and "video-sink" properties with the stream-specific group sinks when
configuring the outputs. Those are usually NULL however, so that would
overwrite the configured sinks with NULL which makes playbin2 then
default to the auto sinks. Fix this by keeping a reference to each
configured sink in playbin2 and setting up the right sinks depending
on whether there is a stream-specific sink or not.

Fixes #584020.
2009-05-28 15:30:27 +01:00
Wim Taymans
c6f6282fde playbin2: handle custom audiosinks differently
Keep track of the autoplugged custom sinks and configure them in the playsink
element when we have collected all streams.
Also make sure that we only select one custom sink.
When unreffing the internal sink, we don't need to change the state to NULL.
2009-05-12 10:37:45 +02:00
Wim Taymans
0b372dd371 playbin2: unify custom sink get/set functions
Use one function to set/get all of the different sink types.
cleanup up the subpicture chain too.
Allow setting a custom subpicture sink.
2009-05-12 10:36:25 +02:00
Wim Taymans
f25e4e4743 playbin2: handle missing input-selector
Gracefully degrade and disable stream selection when input-selector is
missing.
2009-04-10 12:26:16 +02:00
Michael Smith
a0959afb01 playbin2: don't leak selector when getting current stream numbers. 2009-04-03 10:51:42 -07:00
Tim-Philipp Müller
ce51cad163 docs: add a blurb about redirect messages to playbin2 docs 2009-04-01 15:36:37 +01:00
Wim Taymans
e7b382c6a9 playbin2: first support for subpictures
Add beginnings of subpicture support.
2009-03-24 17:12:53 +01:00
Wim Taymans
786b0c248c playbin2: blacklist subpictures for now
Blacklist the subpictures until we add support for them.
Add some small debug info.
See #576408.
2009-03-24 12:23:24 +01:00
Wim Taymans
2f39597919 playbin2: remove the group cond + cleanups
Remove the group GCond that we used for waiting for groups to finish because we
use pad blocking on the selectors and counters instead for waiting for the
groups to complete.

remove the obsolete about_to_finish variable set while emiting the
about-to-finish signal and fix some old comments.

We don't need to take the playbin lock when querying the uridecodebin.
2009-03-19 19:03:25 +01:00
Wim Taymans
a8579ffea0 playbin2: return NOT_LINKED for unselected streams
When streams are not selected in the selector, return NOT_LINKED so that
upstream elements can skip decoding. Only do this for audio and video pads
because for text streams the overhead is smaller and they could come from
external files.
2009-03-17 11:54:40 +01:00
Wim Taymans
48f7f6b7c2 playbin2: don't try to set invalid stream numbers
Fix a problem with setting the stream numbers because we check for the wrong
range.
See #575239.
2009-03-16 16:42:18 +01:00
Wim Taymans
ba6d3b5aca playbin2: release the shutdown lock
Release the shutdown lock when we wait for other groups to complete or else we
have a deadlock when the other group completes and tries to grab the shutdown
lock.
Fixes #575550.
2009-03-16 16:16:30 +01:00
Wim Taymans
7849db42b8 playbin2: improve subtitle handling
Add property to playbin2 to configure a custom sink that receives the raw
subtitle buffers instead of using a textoverlay.
Improve the property finding code to make it more usable.
Use property find code to find async properties in custom sinks that are bins.
Improve text overlay code to gracefully handle missing elements.
2009-03-12 17:51:39 +01:00
Stefan Kost
a6ea8280a2 docs: playbin2 has no stream-info 2009-02-26 10:09:59 +02:00
Wim Taymans
f5a3387bdb playbin: use flushing pads instead of fakesink
Use the flushing pads on playsink to terminate on shutdown instead of plugging
fakesinks. this should be a little cheaper.
2009-02-25 12:48:53 +01:00
Wim Taymans
dbfc80cd6c Release the group lock when setting states
Release the group lock while we perform the state changes on the uridecodebins
because that might trigger callbacks that we need to handle with the group lock
taken. Avoids a possible deadly embrace in some id3/flac files.
Fixes #567396.
2009-02-25 10:08:29 +01:00