static void
gst_play_bin_set_flags (GstPlayBin * playbin, GstPlayFlags flags)
{
- GstPlayFlags oldflags = gst_play_sink_get_flags (playbin->playsink);
- GstSourceGroup *group = playbin->curr_group;
- gboolean unblock = FALSE;
-
- if (group && group->suburidecodebin) {
- if ((oldflags & GST_PLAY_FLAG_TEXT) && !(flags & GST_PLAY_FLAG_TEXT)) {
- gst_play_bin_suburidecodebin_block (group->suburidecodebin, TRUE);
- } else if (!(oldflags & GST_PLAY_FLAG_TEXT) && (flags & GST_PLAY_FLAG_TEXT)) {
- gst_play_bin_suburidecodebin_seek_to_start (group->suburidecodebin);
- unblock = TRUE;
- }
- }
-
gst_play_sink_set_flags (playbin->playsink, flags);
gst_play_sink_reconfigure (playbin->playsink);
-
- if (unblock)
- gst_play_bin_suburidecodebin_block (group->suburidecodebin, FALSE);
}
static GstPlayFlags
GstElement *overlay;
GstPad *videosinkpad;
GstPad *textsinkpad;
- GstPad *textsinkpad_target;
GstPad *srcpad; /* outgoing srcpad, used to connect to the next
* chain */
GstElement *sink; /* custom sink to receive subtitle buffers */
} else {
gst_bin_add (bin, chain->overlay);
+ g_object_set (G_OBJECT (chain->overlay), "silent", FALSE, NULL);
if (playsink->font_desc) {
g_object_set (G_OBJECT (chain->overlay), "font-desc",
playsink->font_desc, NULL);
}
if (textsinkpad) {
chain->textsinkpad = gst_ghost_pad_new ("text_sink", textsinkpad);
- chain->textsinkpad_target = textsinkpad;
gst_object_unref (textsinkpad);
gst_element_add_pad (chain->chain.bin, chain->textsinkpad);
}
playsink->textchain = gen_text_chain (playsink);
}
if (playsink->textchain) {
- GstPad *target;
-
GST_DEBUG_OBJECT (playsink, "adding text chain");
+ g_object_set (G_OBJECT (playsink->textchain->overlay), "silent", FALSE,
+ NULL);
add_chain (GST_PLAY_CHAIN (playsink->textchain), TRUE);
- if (!(target =
- gst_ghost_pad_get_target (GST_GHOST_PAD_CAST
- (playsink->textchain->textsinkpad)))) {
- target = gst_object_ref (playsink->textchain->textsinkpad_target);
- gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->
- textchain->textsinkpad), target);
- }
- gst_object_unref (target);
-
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad),
playsink->textchain->textsinkpad);
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad),
} else {
/* we have a chain and a textpad, turn the subtitles off */
GST_DEBUG_OBJECT (playsink, "turning off the text");
- gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->
- textchain->textsinkpad), NULL);
+ g_object_set (G_OBJECT (playsink->textchain->overlay), "silent", TRUE,
+ NULL);
}
}
if (!need_video && playsink->video_pad)