Commit graph

98 commits

Author SHA1 Message Date
Josep Torra Valles 25fc69e6aa playsink: avoid g_object_set() on NULL pointers
There may not be an overlay element if a text-sink is set.

Fixes #611702.
2010-03-03 20:15:44 +00: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 9fa9834535 playsink: Ghost the video sinkpad if a text sinkpad is available
Only don't ghost it if no visualizations are need and if
no text is needed and no textchain was created yet.

Fixes bug #610379.
2010-02-19 17:44:18 +01:00
Sebastian Dröge dbf632f3fb playsink: Post missing element messages if a core plugin is missing
And post a warning in cases where we can still continue to work
or an error when the missing element is fatal.
2010-02-15 08:46:26 +01:00
Josep Torra Valles d58f4fcf48 playsink: Reset the sink's state to NULL before unreffing it unless it's the same instance again
This makes sure that we don't destroy the last reference before the
element gets back to NULL state. Fixes assertion failures if a playbin2
instance is reused but different sinks are automatically chosen because
of different caps.
2010-02-12 19:43:13 +01:00
Tim-Philipp Müller b0fe1867d4 playsink: re-use iterator callback to avoid code duplication 2010-01-18 10:10:27 +00:00
Tim-Philipp Müller 7216605ffa playsink: when looking for sink properties, make sure they have the right type
We don't want to end up setting values on elements where the property is of
a different type than we expect. Can't transform the value either, since we
can't really make assumptions about the scale and transform function.

Fixes crashes when using playbin2 with apexsink (#606949).
2010-01-18 10:10:27 +00:00
Sebastian Dröge 3b842bc98b playsink: Fix disabling of subtitles if subtitles were used before
In this case the video still goes through the text chain and
subtitles are still going in there, in case subtitles are
enabled again. This makes sure that re-enabling subtitles
happens instantly.

Fixes hanging video when disabling subtitles, caused by an
unliked video pad.
2010-01-14 13:36:23 +01:00
Brijesh Singh 0fe6b6e8ab playsink: Fix handling of the native audio/video flags
Fixes bug #606687.
2010-01-13 09:39:54 +01:00
Wim Taymans 26071d748f playsink: fix video when subtitles disabled
When we have a source with subtitles but they were disabled with the flags,
still ghostpad the video pad instead of leaving it unlinked.
2009-12-09 12:11:55 +01:00
Sebastian Dröge 49fd39c3fd playsink: Some minor cleanup 2009-12-07 09:13:40 +01:00
Wim Taymans c4d7dbce1a playsink: make sure we always go to PAUSED async
Set the need_async_start flag before going to PAUSED so that we always post the
ASYNC_START message, even after reusing playsink.
2009-11-17 16:39:09 +01:00
Wim Taymans 65773b58dd playsink: make sure we remain a sink
When we remove our elements, we could lose our sink flag. Make sure we remain a
sink by setting the flag again after removing elements.
2009-11-17 16:37:57 +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 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 dcc109bd9a playsink: Add a queue before subtitleoverlay
This will improve playback, and the same thing is done
for subpicture streams too.
2009-11-12 13:20:40 +01:00
Sebastian Dröge c0828e55b6 playsink: Use subtitleoverlay for subtitles 2009-11-12 13:20:40 +01:00
Tim-Philipp Müller 23f92ed8cd playsink: assign chain->mute before using it
Fixes GObject warnings when starting totem.
2009-11-10 01:06:17 +00:00
Sebastian Dröge e72c3029c0 playsink: Reset {mute,volume}-changed flags after setting the volume
These flags are there to make sure that the volume is set, if there
is no volume element yet.
2009-10-30 09:24:30 +01:00
Sebastian Dröge 598c937634 playsink: If notify::{volume,mute} is triggered by the volume element, update our internal state 2009-10-30 09:24:03 +01:00
Sebastian Dröge d85dadc122 playsink: Proxy notify::volume and notify::mute from the volume/mute elements (or sinks)
Fixes bug #600027.
2009-10-29 14:30:31 +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
Sebastian Dröge a4f454dc24 playbin2/playsink: Use gst_object_ref_sink() instead of calling both separately 2009-10-07 07:21:37 +02:00
Wim Taymans a8d7e6a490 playsink: make the lock recursive for now
Fixes #583255
2009-10-01 09:35:54 +02:00
Wim Taymans f18ed7abf9 playsink: fix the vis property getter 2009-10-01 09:35:54 +02:00
Edward Hervey b565a3088c playsink: Expose mute,volume,vis-plugin and font-desc properties
https://bugzilla.gnome.org/show_bug.cgi?id=594623
2009-09-14 12:26:05 +02:00
Edward Hervey 377e781ad5 GstPlaySink: Expose 'reconfigure' as an action signal. 2009-09-14 10:40:00 +02:00
Edward Hervey bafe9082fd GstPlaySink: Expose flags as a gobject property. 2009-09-14 10:40:00 +02:00
Edward Hervey 02c50388c4 playback: Register playsink as an element.
This allows using playsink from outside the playback plugin.

Add code to be able to request the sink pads using standard GStreamer API.

TODO : expose GObject properties/signals.
2009-09-14 10:39:59 +02:00
Wim Taymans 2a5cd16eb1 fix whitespace 2009-09-08 13:02:46 +02:00
Sebastian Dröge b7fa34a279 playsink: Also send SEEK events directly to a subpicture sink 2009-08-18 11:15:41 +02:00
Sebastian Dröge b5f84c0637 playsink: If a custom text sink is used, send events to it too
Before, SEEK events would be sent to the video sink, which wouldn't
be linked in any way to the subtitle part of the pipeline and
subparse would never see the SEEK event. This would then seek
the audio/video but the subtitles would continue from the old
position instead.

Fixes bug #591664.
2009-08-18 08:39:02 +02:00
Tim-Philipp Müller 4871cd9254 playbin2: fix error message string
Fixes #591577.
2009-08-13 10:59:35 +01:00
Edward Hervey 8cd1b5209b gst: Remove dead assignments and resulting unused variables 2009-08-08 15:54:02 +02:00
Stefan Kost 007da06645 playbin2: smarter sink selection. Fixes #588523
Don't do fallbacks if application specified a sink element. When doing the
fallback use configured default elements instead of hardcoded linux only
elements. Improve error messages accordingly.
2009-08-06 15:07:02 +03:00
Stefan Kost aab2e110a1 playsink: remove unused property defs 2009-06-30 14:45:51 +03:00
Jan Schmidt ee7fd4c28d playsink: Avoid a segfault when the video sink fails to start
Don't attempt to display the subpictures and segfault when the
video sink failed to start (and hence the videochain is NULL).
2009-06-29 14:35:03 +01:00
René Stadler 61441ff183 playbin2: fix initial volume handling also when reusing the element
This is a follow-up to commit 452988, making it work correctly when the audio
chain is reused.
2009-06-27 16:36:11 +03:00
Wim Taymans a31c3bfc60 playsink: set the sink flag on the element 2009-06-16 18:20:05 +02:00
Wim Taymans 6a7d0ebf2a playsink: update for new step API 2009-06-12 13:52:02 +02:00
Wim Taymans ea97973efe add framestepping to playbin2 and seek 2009-06-01 11:31:49 +02:00
Tim-Philipp Müller effa5e69d9 playbin2: fix volume handling for audio sinks without "volume" property
When using an audio sink without a "volume" property, volume control
would only work for the first song. For the next song, we'd try to
re-use the existing audio chain, but inadvertently set chain->volume
to NULL instead of to the existing volume element.
2009-05-28 20:49:22 +01:00
Tim-Philipp Müller 18fc3e6e18 playbin2: cosmetic change to avoid unnecessary line breaks
Looks nicer and works around gst-indent silliness.
2009-05-28 17:05:55 +01:00
Wim Taymans 3f20b0522a playbin2: don't lose the ref to the volume element
Only release the ref to the volume element when it is controled by a sink. For
software volume we never have to fear that it will change.
2009-05-28 17:21:35 +02: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 de06a6adb5 playbin2; release refs to volume/mute properties
Release the refs to the volume and mute property elemens before setting the
child elements to READY or NULL.
Fixes #583318
2009-05-27 15:45:25 +02:00
Stefan Kost 45298860fc playbin2: fix initial volume and mute handling
Use two flags to remember volume/mute changes at times when we don't have the
audiochain yet (e.g. construction). Only set values when they were actualy
changed. This makes pulseaudio's stream restore functional.
2009-05-22 15:49:14 +03:00
Jan Schmidt 768cadf093 playbin2: Fix cdda:// playback
Don't send async-start when the playsink has already been configured
before changing state.
2009-05-14 22:50:53 +01:00
Wim Taymans e1aa348246 playbin2: make fallback identity silent
Set the signal-handoffs to FALSE and silent to TRUE for the fallback identity
element so that it consumes less CPU.
2009-05-12 10:38:15 +02: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