From 015bd9285a3e0e9431a6cacd8c58b396f7d5e0d7 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 15 May 2015 14:49:47 +0200 Subject: [PATCH] playback: use the new gst_object api Use gst_object_has_as_anchestor instead of the now deprecated _has_ancestor. --- gst/playback/gstplaybin2.c | 24 ++++++++++++------------ gst/playback/gstsubtitleoverlay.c | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index df75a8eb83..e8ae36a4f3 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -2859,7 +2859,7 @@ gst_play_bin_handle_message (GstBin * bin, GstMessage * msg) * them into warnings and disable the subtitles */ group = playbin->curr_group; if (group && group->suburidecodebin) { - if (G_UNLIKELY (gst_object_has_ancestor (msg->src, GST_OBJECT_CAST + if (G_UNLIKELY (gst_object_has_as_ancestor (msg->src, GST_OBJECT_CAST (group->suburidecodebin)))) { GError *err; gchar *debug = NULL; @@ -4259,15 +4259,15 @@ activate_sink_bus_handler (GstBus * bus, GstMessage * msg, GstPlayBin * playbin) /* Only proxy errors from a fixed sink. If that fails we can just error out * early as stuff will fail later anyway */ if (playbin->audio_sink - && gst_object_has_ancestor (GST_MESSAGE_SRC (msg), + && gst_object_has_as_ancestor (GST_MESSAGE_SRC (msg), GST_OBJECT_CAST (playbin->audio_sink))) gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); else if (playbin->video_sink - && gst_object_has_ancestor (GST_MESSAGE_SRC (msg), + && gst_object_has_as_ancestor (GST_MESSAGE_SRC (msg), GST_OBJECT_CAST (playbin->video_sink))) gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); else if (playbin->text_sink - && gst_object_has_ancestor (GST_MESSAGE_SRC (msg), + && gst_object_has_as_ancestor (GST_MESSAGE_SRC (msg), GST_OBJECT_CAST (playbin->text_sink))) gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); else @@ -4397,7 +4397,7 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps, /* If this is from the subtitle uridecodebin we don't need to * check the audio and video sink */ if (group->suburidecodebin - && gst_object_has_ancestor (GST_OBJECT_CAST (element), + && gst_object_has_as_ancestor (GST_OBJECT_CAST (element), GST_OBJECT_CAST (group->suburidecodebin))) goto done; @@ -4783,7 +4783,7 @@ autoplug_query_caps (GstElement * uridecodebin, GstPad * pad, /* If this is from the subtitle uridecodebin we don't need to * check the audio and video sink */ if (group->suburidecodebin - && gst_object_has_ancestor (GST_OBJECT_CAST (pad), + && gst_object_has_as_ancestor (GST_OBJECT_CAST (pad), GST_OBJECT_CAST (group->suburidecodebin))) { goto done; } @@ -4813,7 +4813,7 @@ autoplug_query_caps (GstElement * uridecodebin, GstPad * pad, /* If this is from the subtitle uridecodebin we don't need to * check the audio and video sink */ if (group->suburidecodebin - && gst_object_has_ancestor (GST_OBJECT_CAST (pad), + && gst_object_has_as_ancestor (GST_OBJECT_CAST (pad), GST_OBJECT_CAST (group->suburidecodebin))) { goto done; } @@ -4954,7 +4954,7 @@ autoplug_query_context (GstElement * uridecodebin, GstPad * pad, /* If this is from the subtitle uridecodebin we don't need to * check the audio and video sink */ if (group->suburidecodebin - && gst_object_has_ancestor (GST_OBJECT_CAST (pad), + && gst_object_has_as_ancestor (GST_OBJECT_CAST (pad), GST_OBJECT_CAST (group->suburidecodebin))) { goto done; } @@ -4971,7 +4971,7 @@ autoplug_query_context (GstElement * uridecodebin, GstPad * pad, /* If this is from the subtitle uridecodebin we don't need to * check the audio and video sink */ if (group->suburidecodebin - && gst_object_has_ancestor (GST_OBJECT_CAST (pad), + && gst_object_has_as_ancestor (GST_OBJECT_CAST (pad), GST_OBJECT_CAST (group->suburidecodebin))) { goto done; } @@ -5409,7 +5409,7 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group) /* delete any custom sinks we might have. * conditionally set them to null if they aren't inside playsink yet */ if (group->audio_sink) { - if (!gst_object_has_ancestor (GST_OBJECT_CAST (group->audio_sink), + if (!gst_object_has_as_ancestor (GST_OBJECT_CAST (group->audio_sink), GST_OBJECT_CAST (playbin->playsink))) { gst_element_set_state (group->audio_sink, GST_STATE_NULL); } @@ -5417,7 +5417,7 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group) } group->audio_sink = NULL; if (group->video_sink) { - if (!gst_object_has_ancestor (GST_OBJECT_CAST (group->video_sink), + if (!gst_object_has_as_ancestor (GST_OBJECT_CAST (group->video_sink), GST_OBJECT_CAST (playbin->playsink))) { gst_element_set_state (group->video_sink, GST_STATE_NULL); } @@ -5425,7 +5425,7 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group) } group->video_sink = NULL; if (group->text_sink) { - if (!gst_object_has_ancestor (GST_OBJECT_CAST (group->text_sink), + if (!gst_object_has_as_ancestor (GST_OBJECT_CAST (group->text_sink), GST_OBJECT_CAST (playbin->playsink))) { gst_element_set_state (group->text_sink, GST_STATE_NULL); } diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 6c56ed8377..3f24fd5df0 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -1405,11 +1405,11 @@ gst_subtitle_overlay_handle_message (GstBin * bin, GstMessage * message) * warnings and switch to passthrough mode */ if (src && ( (self->overlay - && gst_object_has_ancestor (src, + && gst_object_has_as_ancestor (src, GST_OBJECT_CAST (self->overlay))) || (self->parser - && gst_object_has_ancestor (src, + && gst_object_has_as_ancestor (src, GST_OBJECT_CAST (self->parser))) || (self->renderer - && gst_object_has_ancestor (src, + && gst_object_has_as_ancestor (src, GST_OBJECT_CAST (self->renderer))))) { GError *err = NULL; gchar *debug = NULL;