diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 6997a957cf..f75dc9e7b6 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -3110,7 +3110,6 @@ combiner_active_pad_changed (GObject * combiner, GParamSpec * pspec, switch (combine->type) { case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: property = "current-video"; playbin->current_video = get_current_stream_number (playbin, combine, group->video_channels); @@ -3124,7 +3123,6 @@ combiner_active_pad_changed (GObject * combiner, GParamSpec * pspec, } break; case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: property = "current-audio"; playbin->current_audio = get_current_stream_number (playbin, combine, group->audio_channels); @@ -3330,11 +3328,9 @@ notify_tags_cb (GObject * object, GParamSpec * pspec, gpointer user_data) switch (ntdata->type) { case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: signal = SIGNAL_VIDEO_TAGS_CHANGED; break; case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: signal = SIGNAL_AUDIO_TAGS_CHANGED; break; case GST_PLAY_SINK_TYPE_TEXT: @@ -3560,11 +3556,9 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group) switch (combine->type) { case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: signal = SIGNAL_VIDEO_CHANGED; break; case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: signal = SIGNAL_AUDIO_CHANGED; break; case GST_PLAY_SINK_TYPE_TEXT: @@ -3684,11 +3678,9 @@ pad_removed_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group) /* get the correct type-changed signal */ switch (combine->type) { case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: signal = SIGNAL_VIDEO_CHANGED; break; case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: signal = SIGNAL_AUDIO_CHANGED; break; case GST_PLAY_SINK_TYPE_TEXT: diff --git a/gst/playback/gstplaybin3.c b/gst/playback/gstplaybin3.c index f743ff7b40..12eaf72e6e 100644 --- a/gst/playback/gstplaybin3.c +++ b/gst/playback/gstplaybin3.c @@ -2628,7 +2628,6 @@ combiner_active_pad_changed (GObject * combiner, GParamSpec * pspec, switch (combine->type) { case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: playbin->current_video = get_current_stream_number (playbin, combine, channels); @@ -2640,7 +2639,6 @@ combiner_active_pad_changed (GObject * combiner, GParamSpec * pspec, } break; case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: playbin->current_audio = get_current_stream_number (playbin, combine, channels); diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index a6c97f354b..ad2e27d12a 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -179,9 +179,9 @@ typedef struct #define PENDING_FLAG_IS_SET(playsink, flagtype) \ ((playsink->pending_blocked_pads) & (1 << flagtype)) #define PENDING_VIDEO_BLOCK(playsink) \ - ((playsink->pending_blocked_pads) & (1 << GST_PLAY_SINK_TYPE_VIDEO_RAW | 1 << GST_PLAY_SINK_TYPE_VIDEO)) + ((playsink->pending_blocked_pads) & (1 << GST_PLAY_SINK_TYPE_VIDEO)) #define PENDING_AUDIO_BLOCK(playsink) \ - ((playsink->pending_blocked_pads) & (1 << GST_PLAY_SINK_TYPE_AUDIO_RAW | 1 << GST_PLAY_SINK_TYPE_AUDIO)) + ((playsink->pending_blocked_pads) & (1 << GST_PLAY_SINK_TYPE_AUDIO)) #define PENDING_TEXT_BLOCK(playsink) \ PENDING_FLAG_IS_SET(playsink, GST_PLAY_SINK_TYPE_TEXT) @@ -881,14 +881,12 @@ gst_play_sink_set_sink (GstPlaySink * playsink, GstPlaySinkType type, GST_PLAY_SINK_LOCK (playsink); switch (type) { case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: elem = &playsink->audio_sink; #ifndef GST_DISABLE_GST_DEBUG sink_type = "audio"; #endif break; case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: elem = &playsink->video_sink; #ifndef GST_DISABLE_GST_DEBUG sink_type = "video"; @@ -941,7 +939,6 @@ gst_play_sink_get_sink (GstPlaySink * playsink, GstPlaySinkType type) GST_PLAY_SINK_LOCK (playsink); switch (type) { case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: { GstPlayAudioChain *chain; if ((chain = (GstPlayAudioChain *) playsink->audiochain)) @@ -950,7 +947,6 @@ gst_play_sink_get_sink (GstPlaySink * playsink, GstPlaySinkType type) break; } case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: { GstPlayVideoChain *chain; if ((chain = (GstPlayVideoChain *) playsink->videochain)) @@ -993,11 +989,9 @@ gst_play_sink_set_filter (GstPlaySink * playsink, GstPlaySinkType type, GST_PLAY_SINK_LOCK (playsink); switch (type) { case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: elem = &playsink->audio_filter; break; case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: elem = &playsink->video_filter; break; default: @@ -1028,7 +1022,6 @@ gst_play_sink_get_filter (GstPlaySink * playsink, GstPlaySinkType type) GST_PLAY_SINK_LOCK (playsink); switch (type) { case GST_PLAY_SINK_TYPE_AUDIO: - case GST_PLAY_SINK_TYPE_AUDIO_RAW: { GstPlayAudioChain *chain; if ((chain = (GstPlayAudioChain *) playsink->audiochain)) @@ -1037,7 +1030,6 @@ gst_play_sink_get_filter (GstPlaySink * playsink, GstPlaySinkType type) break; } case GST_PLAY_SINK_TYPE_VIDEO: - case GST_PLAY_SINK_TYPE_VIDEO_RAW: { GstPlayVideoChain *chain; if ((chain = (GstPlayVideoChain *) playsink->videochain)) @@ -1848,8 +1840,7 @@ gen_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async) /* add the video filter first, so everything is working with post-filter * samples */ - chain->filter = gst_play_sink_get_filter (playsink, - GST_PLAY_SINK_TYPE_VIDEO_RAW); + chain->filter = gst_play_sink_get_filter (playsink, GST_PLAY_SINK_TYPE_VIDEO); if (chain->filter) { if (!raw) { gst_object_unref (chain->filter); @@ -2733,8 +2724,7 @@ gen_audio_chain (GstPlaySink * playsink, gboolean raw) /* add the audio filter first, so everything is working with post-filter * samples */ - chain->filter = gst_play_sink_get_filter (playsink, - GST_PLAY_SINK_TYPE_AUDIO_RAW); + chain->filter = gst_play_sink_get_filter (playsink, GST_PLAY_SINK_TYPE_AUDIO); if (chain->filter) { if (!raw) { gst_object_unref (chain->filter); @@ -4260,7 +4250,6 @@ video_set_blocked (GstPlaySink * playsink, gboolean blocked) sinkpad_blocked_cb, playsink, NULL); } else if (!blocked && playsink->video_block_id) { gst_pad_remove_probe (opad, playsink->video_block_id); - PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_VIDEO_RAW); PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_VIDEO); playsink->video_block_id = 0; playsink->video_pad_blocked = FALSE; @@ -4292,7 +4281,6 @@ audio_set_blocked (GstPlaySink * playsink, gboolean blocked) playsink->vis_pad_block_id = 0; gst_pad_remove_probe (opad, playsink->audio_block_id); - PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_AUDIO_RAW); PENDING_FLAG_UNSET (playsink, GST_PLAY_SINK_TYPE_AUDIO); playsink->audio_block_id = 0; playsink->audio_pad_blocked = FALSE; @@ -4450,13 +4438,11 @@ gst_play_sink_refresh_pad (GstPlaySink * playsink, GstPad * pad, GST_PLAY_SINK_LOCK (playsink); if (pad == playsink->video_pad) { - if (type != GST_PLAY_SINK_TYPE_VIDEO_RAW && - type != GST_PLAY_SINK_TYPE_VIDEO) + if (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) + if (type != GST_PLAY_SINK_TYPE_AUDIO) goto wrong_type; block_id = &playsink->audio_block_id; } else if (pad == playsink->text_pad) { @@ -4516,7 +4502,6 @@ gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type) GST_PLAY_SINK_LOCK (playsink); switch (type) { - case GST_PLAY_SINK_TYPE_AUDIO_RAW: case GST_PLAY_SINK_TYPE_AUDIO: pad_name = "audio_sink"; if (!playsink->audio_tee) { @@ -4550,7 +4535,6 @@ gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type) res = playsink->audio_pad; block_id = &playsink->audio_block_id; break; - case GST_PLAY_SINK_TYPE_VIDEO_RAW: case GST_PLAY_SINK_TYPE_VIDEO: pad_name = "video_sink"; if (!playsink->video_pad) { @@ -4643,14 +4627,11 @@ gst_play_sink_request_new_pad (GstElement * element, GstPadTemplate * templ, tplname = GST_PAD_TEMPLATE_NAME_TEMPLATE (templ); /* Figure out the GstPlaySinkType based on the template */ - if (!strcmp (tplname, "audio_sink")) + if (!strcmp (tplname, "audio_sink") || !strcmp (tplname, "audio_raw_sink")) type = GST_PLAY_SINK_TYPE_AUDIO; - else if (!strcmp (tplname, "audio_raw_sink")) - type = GST_PLAY_SINK_TYPE_AUDIO_RAW; - else if (!strcmp (tplname, "video_sink")) + else if (!strcmp (tplname, "video_sink") || + !strcmp (tplname, "video_raw_sink")) type = GST_PLAY_SINK_TYPE_VIDEO; - else if (!strcmp (tplname, "video_raw_sink")) - type = GST_PLAY_SINK_TYPE_VIDEO_RAW; else if (!strcmp (tplname, "text_sink")) type = GST_PLAY_SINK_TYPE_TEXT; else diff --git a/gst/playback/gstplaysink.h b/gst/playback/gstplaysink.h index 8db4565afb..fa19d9df72 100644 --- a/gst/playback/gstplaysink.h +++ b/gst/playback/gstplaysink.h @@ -42,25 +42,20 @@ G_BEGIN_DECLS /** * GstPlaySinkType: * @GST_PLAY_SINK_TYPE_AUDIO: an audio pad - * @GST_PLAY_SINK_TYPE_AUDIO_RAW: a raw audio pad. Deprecated. * @GST_PLAY_SINK_TYPE_VIDEO: a video pad - * @GST_PLAY_SINK_TYPE_VIDEO_RAW: a raw video pad. Deprecated. * @GST_PLAY_SINK_TYPE_TEXT: a text pad - * @GST_PLAY_SINK_TYPE_LAST: the last type * @GST_PLAY_SINK_TYPE_FLUSHING: a flushing pad, used when shutting down + * @GST_PLAY_SINK_TYPE_LAST: the last type * * Types of pads that can be requested from the sinks. */ typedef enum { GST_PLAY_SINK_TYPE_AUDIO = 0, - GST_PLAY_SINK_TYPE_AUDIO_RAW = 1, - GST_PLAY_SINK_TYPE_VIDEO = 2, - GST_PLAY_SINK_TYPE_VIDEO_RAW = 3, - GST_PLAY_SINK_TYPE_TEXT = 4, - GST_PLAY_SINK_TYPE_LAST = 5, - + GST_PLAY_SINK_TYPE_VIDEO = 1, + GST_PLAY_SINK_TYPE_TEXT = 2, /* this is a dummy pad */ - GST_PLAY_SINK_TYPE_FLUSHING = 6 + GST_PLAY_SINK_TYPE_FLUSHING = 3, + GST_PLAY_SINK_TYPE_LAST = 4 } GstPlaySinkType; typedef struct _GstPlaySink GstPlaySink;