playsink: Port changes to 0.11
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 9 May 2012 08:30:55 +0000 (10:30 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 9 May 2012 08:30:55 +0000 (10:30 +0200)
gst/playback/gstplaysink.c

index e441465e9e676e16f7bea52ad21331c4664f56fd..3ad7836220e14dd664b182fa7657e6848098b624 100644 (file)
@@ -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);
   }