mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
playsink: Port changes to 0.11
This commit is contained in:
parent
e623bea6fa
commit
d7371bc87c
1 changed files with 7 additions and 1 deletions
|
@ -3511,6 +3511,7 @@ void
|
|||
gst_play_sink_refresh_pad (GstPlaySink * playsink, GstPad * pad,
|
||||
GstPlaySinkType type)
|
||||
{
|
||||
gulong *block_id;
|
||||
GST_DEBUG_OBJECT (playsink, "refresh pad %" GST_PTR_FORMAT, pad);
|
||||
|
||||
GST_PLAY_SINK_LOCK (playsink);
|
||||
|
@ -3518,20 +3519,25 @@ gst_play_sink_refresh_pad (GstPlaySink * playsink, GstPad * pad,
|
|||
if (type != GST_PLAY_SINK_TYPE_VIDEO_RAW &&
|
||||
type != GST_PLAY_SINK_TYPE_VIDEO)
|
||||
goto wrong_type;
|
||||
block_id = &playsink->video_block_id;
|
||||
} else if (pad == playsink->audio_pad) {
|
||||
if (type != GST_PLAY_SINK_TYPE_AUDIO_RAW &&
|
||||
type != GST_PLAY_SINK_TYPE_AUDIO)
|
||||
goto wrong_type;
|
||||
block_id = &playsink->audio_block_id;
|
||||
} else if (pad == playsink->text_pad) {
|
||||
if (type != GST_PLAY_SINK_TYPE_TEXT)
|
||||
goto wrong_type;
|
||||
block_id = &playsink->text_block_id;
|
||||
}
|
||||
|
||||
if (type != GST_PLAY_SINK_TYPE_FLUSHING) {
|
||||
GstPad *blockpad =
|
||||
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (pad)));
|
||||
|
||||
gst_pad_set_blocked_async (blockpad, TRUE, sinkpad_blocked_cb, playsink);
|
||||
*block_id =
|
||||
gst_pad_add_probe (blockpad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
||||
sinkpad_blocked_cb, playsink, NULL);
|
||||
PENDING_FLAG_SET (playsink, type);
|
||||
gst_object_unref (blockpad);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue