mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
playback: use the new gst_object api
Use gst_object_has_as_anchestor instead of the now deprecated _has_ancestor.
This commit is contained in:
parent
4343c3bff8
commit
015bd9285a
2 changed files with 15 additions and 15 deletions
|
@ -2859,7 +2859,7 @@ gst_play_bin_handle_message (GstBin * bin, GstMessage * msg)
|
||||||
* them into warnings and disable the subtitles */
|
* them into warnings and disable the subtitles */
|
||||||
group = playbin->curr_group;
|
group = playbin->curr_group;
|
||||||
if (group && group->suburidecodebin) {
|
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)))) {
|
(group->suburidecodebin)))) {
|
||||||
GError *err;
|
GError *err;
|
||||||
gchar *debug = NULL;
|
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
|
/* Only proxy errors from a fixed sink. If that fails we can just error out
|
||||||
* early as stuff will fail later anyway */
|
* early as stuff will fail later anyway */
|
||||||
if (playbin->audio_sink
|
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_OBJECT_CAST (playbin->audio_sink)))
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
||||||
else if (playbin->video_sink
|
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_OBJECT_CAST (playbin->video_sink)))
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
||||||
else if (playbin->text_sink
|
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_OBJECT_CAST (playbin->text_sink)))
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
gst_element_post_message (GST_ELEMENT_CAST (playbin), msg);
|
||||||
else
|
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
|
/* If this is from the subtitle uridecodebin we don't need to
|
||||||
* check the audio and video sink */
|
* check the audio and video sink */
|
||||||
if (group->suburidecodebin
|
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)))
|
GST_OBJECT_CAST (group->suburidecodebin)))
|
||||||
goto done;
|
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
|
/* If this is from the subtitle uridecodebin we don't need to
|
||||||
* check the audio and video sink */
|
* check the audio and video sink */
|
||||||
if (group->suburidecodebin
|
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))) {
|
GST_OBJECT_CAST (group->suburidecodebin))) {
|
||||||
goto done;
|
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
|
/* If this is from the subtitle uridecodebin we don't need to
|
||||||
* check the audio and video sink */
|
* check the audio and video sink */
|
||||||
if (group->suburidecodebin
|
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))) {
|
GST_OBJECT_CAST (group->suburidecodebin))) {
|
||||||
goto done;
|
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
|
/* If this is from the subtitle uridecodebin we don't need to
|
||||||
* check the audio and video sink */
|
* check the audio and video sink */
|
||||||
if (group->suburidecodebin
|
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))) {
|
GST_OBJECT_CAST (group->suburidecodebin))) {
|
||||||
goto done;
|
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
|
/* If this is from the subtitle uridecodebin we don't need to
|
||||||
* check the audio and video sink */
|
* check the audio and video sink */
|
||||||
if (group->suburidecodebin
|
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))) {
|
GST_OBJECT_CAST (group->suburidecodebin))) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -5409,7 +5409,7 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group)
|
||||||
/* delete any custom sinks we might have.
|
/* delete any custom sinks we might have.
|
||||||
* conditionally set them to null if they aren't inside playsink yet */
|
* conditionally set them to null if they aren't inside playsink yet */
|
||||||
if (group->audio_sink) {
|
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_OBJECT_CAST (playbin->playsink))) {
|
||||||
gst_element_set_state (group->audio_sink, GST_STATE_NULL);
|
gst_element_set_state (group->audio_sink, GST_STATE_NULL);
|
||||||
}
|
}
|
||||||
|
@ -5417,7 +5417,7 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group)
|
||||||
}
|
}
|
||||||
group->audio_sink = NULL;
|
group->audio_sink = NULL;
|
||||||
if (group->video_sink) {
|
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_OBJECT_CAST (playbin->playsink))) {
|
||||||
gst_element_set_state (group->video_sink, GST_STATE_NULL);
|
gst_element_set_state (group->video_sink, GST_STATE_NULL);
|
||||||
}
|
}
|
||||||
|
@ -5425,7 +5425,7 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group)
|
||||||
}
|
}
|
||||||
group->video_sink = NULL;
|
group->video_sink = NULL;
|
||||||
if (group->text_sink) {
|
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_OBJECT_CAST (playbin->playsink))) {
|
||||||
gst_element_set_state (group->text_sink, GST_STATE_NULL);
|
gst_element_set_state (group->text_sink, GST_STATE_NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1405,11 +1405,11 @@ gst_subtitle_overlay_handle_message (GstBin * bin, GstMessage * message)
|
||||||
* warnings and switch to passthrough mode */
|
* warnings and switch to passthrough mode */
|
||||||
if (src && (
|
if (src && (
|
||||||
(self->overlay
|
(self->overlay
|
||||||
&& gst_object_has_ancestor (src,
|
&& gst_object_has_as_ancestor (src,
|
||||||
GST_OBJECT_CAST (self->overlay))) || (self->parser
|
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_CAST (self->parser))) || (self->renderer
|
||||||
&& gst_object_has_ancestor (src,
|
&& gst_object_has_as_ancestor (src,
|
||||||
GST_OBJECT_CAST (self->renderer))))) {
|
GST_OBJECT_CAST (self->renderer))))) {
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
gchar *debug = NULL;
|
gchar *debug = NULL;
|
||||||
|
|
Loading…
Reference in a new issue