| diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c |
| index 03ac00f4..7003f162 100644 |
| --- a/ext/ogg/gstoggdemux.c |
| +++ b/ext/ogg/gstoggdemux.c |
| @@ -50,6 +50,9 @@ |
| /* we hope we get a granpos within this many bytes off the end */ |
| #define DURATION_CHUNK_OFFSET (128*1024) |
| |
| +/*search max page count*/ |
| +#define SEARCH_MAX_PAGE 75 |
| + |
| /* An Ogg page can not be larger than 255 segments of 255 bytes, plus |
| 26 bytes of header */ |
| #define MAX_OGG_PAGE_SIZE (255 * 255 + 26) |
| @@ -191,7 +194,9 @@ gst_ogg_pad_init (GstOggPad * pad) |
| |
| pad->map.granulerate_n = 0; |
| pad->map.granulerate_d = 0; |
| - pad->map.granuleshift = -1; |
| + pad->map.granuleshift = 0; |
| + pad->map.channel = 0; |
| + pad->map.bitspersample = 0; |
| } |
| |
| static void |
| @@ -811,7 +816,8 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, |
| if (!packet->b_o_s || push_headers) { |
| if (pad->last_ret == GST_FLOW_OK) { |
| GST_LOG_OBJECT (ogg, "Pushing buf %" GST_PTR_FORMAT, buf); |
| - ret = gst_pad_push (GST_PAD_CAST (pad), buf); |
| + if (gst_buffer_get_size (buf) > 0) |
| + ret = gst_pad_push (GST_PAD_CAST (pad), buf); |
| } else { |
| GST_DEBUG_OBJECT (ogg, "not pushing buffer on error pad"); |
| ret = pad->last_ret; |
| @@ -2687,6 +2693,7 @@ gst_ogg_demux_get_prev_page (GstOggDemux * ogg, ogg_page * og, gint64 * offset) |
| gint64 begin = ogg->offset; |
| gint64 end = begin; |
| gint64 cur_offset = -1; |
| + gint hit_limit_cnt = 0; |
| |
| GST_LOG_OBJECT (ogg, "getting page before %" G_GINT64_FORMAT, begin); |
| |
| @@ -2717,7 +2724,12 @@ gst_ogg_demux_get_prev_page (GstOggDemux * ogg, ogg_page * og, gint64 * offset) |
| ret = gst_ogg_demux_get_next_page (ogg, og, boundary, &new_offset); |
| /* we hit the upper limit, offset contains the last page start */ |
| if (ret == GST_FLOW_LIMIT) { |
| - GST_LOG_OBJECT (ogg, "hit limit"); |
| + hit_limit_cnt++; |
| + GST_INFO_OBJECT (ogg, "hit limit, cnt=%d", hit_limit_cnt); |
| + if (hit_limit_cnt >= 3){ |
| + ret = GST_FLOW_OK; |
| + goto beach; |
| + } |
| break; |
| } |
| /* something went wrong */ |
| @@ -2904,8 +2916,12 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain, |
| gst_ogg_pad_mark_discont (pad); |
| pad->last_ret = GST_FLOW_OK; |
| |
| + GST_DEBUG_OBJECT (ogg, |
| + "serialno %08x time %" GST_TIME_FORMAT, |
| + pad->map.serialno, GST_TIME_ARGS (pad->start_time)); |
| + |
| if (pad->map.is_skeleton || pad->map.is_cmml || pad->added |
| - || !pad->map.caps) |
| + || !pad->map.caps || (pad->start_time == GST_CLOCK_TIME_NONE)) |
| continue; |
| |
| GST_DEBUG_OBJECT (ogg, "adding pad %" GST_PTR_FORMAT, pad); |
| @@ -4008,6 +4024,7 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain) |
| gint64 offset = ogg->offset; |
| ogg_page og; |
| gboolean done; |
| + gint loop_page_cnt = 0; |
| gint i; |
| |
| GST_LOG_OBJECT (ogg, "reading chain at %" G_GINT64_FORMAT, offset); |
| @@ -4131,8 +4148,14 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain) |
| break; |
| } |
| |
| + if ((loop_page_cnt >= SEARCH_MAX_PAGE) && (done == FALSE)) { |
| + done = TRUE; |
| + GST_ERROR_OBJECT (ogg, "(loop_page_cnt >= SEARCH_MAX_PAGE) && (done == FALSE)"); |
| + break; |
| + } |
| if (!done) { |
| ret = gst_ogg_demux_get_next_page (ogg, &og, -1, NULL); |
| + loop_page_cnt++; |
| if (ret != GST_FLOW_OK) |
| break; |
| } |
| @@ -4159,6 +4182,7 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain) |
| gboolean done = FALSE; |
| ogg_page og; |
| gint i; |
| + gint hit_limit_count = 0; |
| |
| while (!done) { |
| begin -= ogg->chunk_size; |
| @@ -4173,8 +4197,14 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain) |
| while (ogg->offset < end) { |
| ret = gst_ogg_demux_get_next_page (ogg, &og, end - ogg->offset, NULL); |
| |
| - if (ret == GST_FLOW_LIMIT) |
| + if (ret == GST_FLOW_LIMIT) { |
| + hit_limit_count++; |
| + GST_INFO_OBJECT (ogg, "hit_limit_count=%d", hit_limit_count); |
| + if (hit_limit_count >= 3) { |
| + done = TRUE; |
| + } |
| break; |
| + } |
| if (ret != GST_FLOW_OK) |
| return ret; |
| |
| @@ -4318,6 +4348,12 @@ gst_ogg_demux_find_chains (GstOggDemux * ogg) |
| GstOggChain *chain; |
| GstFlowReturn ret; |
| |
| + /*init og header and body*/ |
| + og.header_len = 0; |
| + og.body_len = 0; |
| + og.header = NULL; |
| + og.body = NULL; |
| + |
| /* get peer to figure out length */ |
| if ((peer = gst_pad_get_peer (ogg->sinkpad)) == NULL) |
| goto no_peer; |
| @@ -4349,7 +4385,20 @@ gst_ogg_demux_find_chains (GstOggDemux * ogg) |
| if (ret != GST_FLOW_OK) |
| goto no_last_page; |
| |
| - serialno = ogg_page_serialno (&og); |
| + GST_DEBUG_OBJECT (ogg, "ogg_page_serialno,og.header_len=%d,og.body_len=%d",og.header_len,og.body_len); |
| + if ((og.header_len > 27) && (og.header_len <= (27 + 255))) { |
| + serialno = ogg_page_serialno (&og); |
| + } |
| + else { |
| + gint i; |
| + for (i = 0; i < chain->streams->len; i++) { |
| + GstOggPad *pad = g_array_index (chain->streams, GstOggPad *, i); |
| + if (pad != NULL) { |
| + serialno = pad->map.serialno; |
| + break; |
| + } |
| + } |
| + } |
| |
| if (!gst_ogg_chain_has_stream (chain, serialno)) { |
| /* the last page is not in the first stream, this means we should |
| diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c |
| index 8426e46f..2f81bd5b 100644 |
| --- a/ext/ogg/gstoggstream.c |
| +++ b/ext/ogg/gstoggstream.c |
| @@ -28,6 +28,7 @@ |
| |
| #include <gst/riff/riff-media.h> |
| #include <gst/pbutils/pbutils.h> |
| +#include <gst/audio/audio.h> |
| |
| #include <stdlib.h> |
| #include <string.h> |
| @@ -1599,8 +1600,13 @@ setup_ogmaudio_mapper (GstOggStream * pad, ogg_packet * packet) |
| GST_DEBUG ("fourcc: %s", fstr); |
| |
| /* FIXME: Need to do something with the reorder map */ |
| + gchar *pchar=NULL; |
| + guint16 n_fourcc=strtol((const char *)fstr,&pchar,16); |
| + |
| + pad->channel = GST_READ_UINT16_LE (data + 45); |
| + pad->bitspersample = GST_READ_UINT32_LE (data + 41); |
| pad->caps = |
| - gst_riff_create_audio_caps (fourcc, NULL, NULL, NULL, NULL, NULL, NULL); |
| + gst_riff_create_audio_caps (n_fourcc, NULL, NULL, NULL, NULL, NULL, NULL); |
| |
| GST_LOG ("sample rate: %d", pad->granulerate_n); |
| if (pad->granulerate_n == 0) |
| @@ -1609,6 +1615,15 @@ setup_ogmaudio_mapper (GstOggStream * pad, ogg_packet * packet) |
| if (pad->caps) { |
| gst_caps_set_simple (pad->caps, |
| "rate", G_TYPE_INT, pad->granulerate_n, NULL); |
| + gst_caps_set_simple (pad->caps, |
| + "channels", G_TYPE_INT, pad->channel, NULL); |
| + if (GST_RIFF_WAVE_FORMAT_PCM == n_fourcc) { |
| + GstAudioFormat format; |
| + gint wd = GST_ROUND_UP_8 (pad->bitspersample); |
| + format = gst_audio_format_build_integer (wd != 8, G_LITTLE_ENDIAN, wd, wd); |
| + gst_caps_set_simple (pad->caps, |
| + "format", G_TYPE_STRING, gst_audio_format_to_string (format), NULL); |
| + } |
| } else { |
| pad->caps = gst_caps_new_simple ("audio/x-ogm-unknown", |
| "fourcc", G_TYPE_STRING, fstr, |
| diff --git a/ext/ogg/gstoggstream.h b/ext/ogg/gstoggstream.h |
| index d49527ff..2822a934 100644 |
| --- a/ext/ogg/gstoggstream.h |
| +++ b/ext/ogg/gstoggstream.h |
| @@ -111,6 +111,8 @@ struct _GstOggStream |
| GstOggIndex *index; |
| guint64 kp_denom; |
| guint64 idx_bitrate; |
| + guint16 channel; |
| + guint32 bitspersample; |
| }; |
| |
| |
| diff --git a/gst-libs/gst/audio/gstaudiobasesink.c b/gst-libs/gst/audio/gstaudiobasesink.c |
| index 62fab35e..57c97d3f 100644 |
| --- a/gst-libs/gst/audio/gstaudiobasesink.c |
| +++ b/gst-libs/gst/audio/gstaudiobasesink.c |
| @@ -1777,8 +1777,8 @@ gst_audio_base_sink_get_alignment (GstAudioBaseSink * sink, |
| /* discont candidate */ |
| sink->priv->discont_time = time; |
| } else if (time - sink->priv->discont_time >= sink->priv->discont_wait) { |
| - /* discont_wait expired, discontinuity detected */ |
| - discont = TRUE; |
| + /* discont_wait expired, discontinuity detected, not set discont avoid drop samples*/ |
| + /* discont = TRUE; */ |
| sink->priv->discont_time = -1; |
| } |
| } else { |
| diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c |
| index e583e2f3..a5a4abdf 100644 |
| --- a/gst-libs/gst/audio/gstaudiodecoder.c |
| +++ b/gst-libs/gst/audio/gstaudiodecoder.c |
| @@ -486,6 +486,10 @@ gst_audio_decoder_init (GstAudioDecoder * dec, GstAudioDecoderClass * klass) |
| /* init state */ |
| dec->priv->ctx.min_latency = 0; |
| dec->priv->ctx.max_latency = 0; |
| + |
| + dec->ts_none = FALSE; |
| + dec->sub_ts_none = FALSE; |
| + |
| gst_audio_decoder_reset (dec, TRUE); |
| GST_DEBUG_OBJECT (dec, "init ok"); |
| } |
| @@ -1298,6 +1302,10 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf, |
| else |
| ts = GST_CLOCK_TIME_NONE; |
| |
| + if (dec->ts_none && !dec->sub_ts_none) { |
| + ts = GST_CLOCK_TIME_NONE; |
| + } |
| + |
| GST_DEBUG_OBJECT (dec, "leading frame ts %" GST_TIME_FORMAT, |
| GST_TIME_ARGS (ts)); |
| |
| @@ -1540,6 +1548,12 @@ gst_audio_decoder_push_buffers (GstAudioDecoder * dec, gboolean force) |
| } |
| /* track upstream ts, but do not get stuck if nothing new upstream */ |
| ts = gst_adapter_prev_pts (priv->adapter, &distance); |
| + |
| + if (ts <= priv->prev_ts) { |
| + dec->ts_none = TRUE; |
| + dec->sub_ts_none = TRUE; |
| + } |
| + |
| if (ts != priv->prev_ts || distance <= priv->prev_distance) { |
| priv->prev_ts = ts; |
| priv->prev_distance = distance; |
| diff --git a/gst-libs/gst/audio/gstaudiodecoder.h b/gst-libs/gst/audio/gstaudiodecoder.h |
| index 71e0ce79..b93cb345 100644 |
| --- a/gst-libs/gst/audio/gstaudiodecoder.h |
| +++ b/gst-libs/gst/audio/gstaudiodecoder.h |
| @@ -170,6 +170,10 @@ struct _GstAudioDecoder |
| GstSegment input_segment; |
| GstSegment output_segment; |
| |
| + /*set ts to GST_CLOCK_TIME_NONE flag*/ |
| + gboolean ts_none; |
| + gboolean sub_ts_none; |
| + |
| /*< private >*/ |
| GstAudioDecoderPrivate *priv; |
| |
| diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c |
| index a6c2bad2..18dad74b 100644 |
| --- a/gst-libs/gst/riff/riff-media.c |
| +++ b/gst-libs/gst/riff/riff-media.c |
| @@ -261,6 +261,7 @@ gst_riff_create_video_caps (guint32 codec_fcc, |
| case GST_MAKE_FOURCC ('m', 'p', 'g', '2'): |
| case GST_MAKE_FOURCC ('P', 'I', 'M', '2'): |
| case GST_MAKE_FOURCC ('D', 'V', 'R', ' '): |
| + case GST_MAKE_FOURCC ('E', 'M', '2', 'V'): |
| case GST_MAKE_FOURCC (0x02, 0x00, 0x00, 0x10): |
| caps = gst_caps_new_simple ("video/mpeg", |
| "systemstream", G_TYPE_BOOLEAN, FALSE, |
| diff --git a/gst-libs/gst/video/gstvideoutilsprivate.c b/gst-libs/gst/video/gstvideoutilsprivate.c |
| index e5e7c2dd..cbddaf14 100644 |
| --- a/gst-libs/gst/video/gstvideoutilsprivate.c |
| +++ b/gst-libs/gst/video/gstvideoutilsprivate.c |
| @@ -131,10 +131,23 @@ __gst_video_element_proxy_getcaps (GstElement * element, GstPad * sinkpad, |
| gst_caps_unref (templ_caps); |
| |
| if (filter) { |
| + GstStructure *filter_st = NULL; |
| + |
| GST_LOG_OBJECT (element, "intersecting with %" GST_PTR_FORMAT, filter); |
| filter_caps = gst_caps_intersect (fcaps, filter); |
| gst_caps_unref (fcaps); |
| fcaps = filter_caps; |
| + |
| + filter_st = gst_caps_get_structure (filter, 0); |
| + if (!gst_structure_has_field (filter_st, "framerate")) { |
| + GstStructure *fcaps_st = NULL; |
| + |
| + fcaps_st = gst_caps_get_structure (fcaps, 0); |
| + gst_structure_remove_field (fcaps_st, "framerate"); |
| + fcaps_st = NULL; |
| + } |
| + |
| + filter_st = NULL; |
| } |
| |
| done: |
| diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c |
| index 97fbc8a9..f5ef9382 100644 |
| --- a/gst-libs/gst/video/video-format.c |
| +++ b/gst-libs/gst/video/video-format.c |
| @@ -3864,6 +3864,10 @@ static const VideoFormat formats[] = { |
| PSTR244, PLANE011, OFFS001, SUB420, PACK_P010_10LE), |
| MAKE_YUV_FORMAT (IYU2, "raw video", GST_MAKE_FOURCC ('I', 'Y', 'U', '2'), |
| DPTH888, PSTR333, PLANE0, OFFS102, SUB444, PACK_IYU2), |
| + MAKE_YUV_FORMAT (MT21, "raw video", GST_MAKE_FOURCC ('M', 'M', '2', '1'), |
| + DPTH888, PSTR122, PLANE011, OFFS001, SUB420, PACK_NV12), |
| + MAKE_YUV_FORMAT (I422, "raw video", GST_MAKE_FOURCC ('Y', 'M', '1', '6'), |
| + DPTH888, PSTR111, PLANE012, OFFS0, SUB422, PACK_420), |
| }; |
| |
| static GstVideoFormat |
| @@ -4094,6 +4098,10 @@ gst_video_format_from_fourcc (guint32 fourcc) |
| return GST_VIDEO_FORMAT_IYU1; |
| case GST_MAKE_FOURCC ('A', 'Y', '6', '4'): |
| return GST_VIDEO_FORMAT_AYUV64; |
| + case GST_MAKE_FOURCC ('M', 'M', '2', '1'): |
| + return GST_VIDEO_FORMAT_MT21; |
| + case GST_MAKE_FOURCC ('Y', 'M', '1', '6'): |
| + return GST_VIDEO_FORMAT_I422; |
| default: |
| return GST_VIDEO_FORMAT_UNKNOWN; |
| } |
| @@ -4115,6 +4123,9 @@ gst_video_format_from_string (const gchar * format) |
| |
| g_return_val_if_fail (format != NULL, GST_VIDEO_FORMAT_UNKNOWN); |
| |
| + if (strcmp ("MT21", format) == 0) |
| + return GST_VIDEO_FORMAT_MT21; |
| + |
| for (i = 0; i < G_N_ELEMENTS (formats); i++) { |
| if (strcmp (GST_VIDEO_FORMAT_INFO_NAME (&formats[i].info), format) == 0) |
| return GST_VIDEO_FORMAT_INFO_FORMAT (&formats[i].info); |
| diff --git a/gst-libs/gst/video/video-format.h b/gst-libs/gst/video/video-format.h |
| index e7f83d83..f3e69fac 100644 |
| --- a/gst-libs/gst/video/video-format.h |
| +++ b/gst-libs/gst/video/video-format.h |
| @@ -164,6 +164,8 @@ typedef enum { |
| GST_VIDEO_FORMAT_P010_10BE, |
| GST_VIDEO_FORMAT_P010_10LE, |
| GST_VIDEO_FORMAT_IYU2, |
| + GST_VIDEO_FORMAT_MT21, |
| + GST_VIDEO_FORMAT_I422, |
| } GstVideoFormat; |
| |
| #define GST_VIDEO_MAX_PLANES 4 |
| diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c |
| index 57b9db7e..af101abe 100644 |
| --- a/gst-libs/gst/video/video-info.c |
| +++ b/gst-libs/gst/video/video-info.c |
| @@ -700,13 +700,26 @@ fill_planes (GstVideoInfo * info) |
| info->stride[1] = GST_ROUND_UP_4 (GST_ROUND_UP_2 (width) / 2); |
| info->stride[2] = info->stride[1]; |
| info->offset[0] = 0; |
| - info->offset[1] = info->stride[0] * GST_ROUND_UP_2 (height); |
| + info->offset[1] = GST_ROUND_UP_128 (info->stride[0] * GST_ROUND_UP_2 (height)); |
| cr_h = GST_ROUND_UP_2 (height) / 2; |
| if (GST_VIDEO_INFO_IS_INTERLACED (info)) |
| cr_h = GST_ROUND_UP_2 (cr_h); |
| - info->offset[2] = info->offset[1] + info->stride[1] * cr_h; |
| - info->size = info->offset[2] + info->stride[2] * cr_h; |
| + info->offset[2] = info->offset[1] + GST_ROUND_UP_128 (info->stride[1] * cr_h); |
| + info->size = info->offset[2] + GST_ROUND_UP_128 (info->stride[2] * cr_h); |
| + break; |
| + |
| + case GST_VIDEO_FORMAT_I422: |
| + info->stride[0] = GST_ROUND_UP_4 (width); |
| + info->stride[1] = GST_ROUND_UP_4 (GST_ROUND_UP_2 (width) / 2); |
| + info->stride[2] = info->stride[1]; |
| + |
| + info->offset[0] = 0; |
| + info->offset[1] = GST_ROUND_UP_128 (info->stride[0] * GST_ROUND_UP_2 (height)); |
| + info->offset[2] = info->offset[1] + GST_ROUND_UP_128 (info->stride[1] * GST_ROUND_UP_2 (height)); |
| + |
| + info->size = info->stride[0] * GST_ROUND_UP_2 (height) * 2; |
| break; |
| + |
| case GST_VIDEO_FORMAT_Y41B: |
| info->stride[0] = GST_ROUND_UP_4 (width); |
| info->stride[1] = GST_ROUND_UP_16 (width) / 4; |
| @@ -739,6 +752,7 @@ fill_planes (GstVideoInfo * info) |
| break; |
| case GST_VIDEO_FORMAT_NV12: |
| case GST_VIDEO_FORMAT_NV21: |
| + case GST_VIDEO_FORMAT_MT21: |
| info->stride[0] = GST_ROUND_UP_4 (width); |
| info->stride[1] = info->stride[0]; |
| info->offset[0] = 0; |
| diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c |
| index fa5d159e..4f009bec 100644 |
| --- a/gst/playback/gstdecodebin2.c |
| +++ b/gst/playback/gstdecodebin2.c |
| @@ -238,7 +238,7 @@ enum |
| |
| /* when playing, keep a max of 2MB of data but try to keep the number of buffers |
| * as low as possible (try to aim for 5 buffers) */ |
| -#define AUTO_PLAY_SIZE_BYTES 2 * 1024 * 1024 |
| +#define AUTO_PLAY_SIZE_BYTES 10 * 1024 * 1024 |
| #define AUTO_PLAY_SIZE_BUFFERS 5 |
| #define AUTO_PLAY_SIZE_TIME 0 |
| |
| diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c |
| index 15fea65e..a0a9d063 100644 |
| --- a/gst/playback/gstplaybin2.c |
| +++ b/gst/playback/gstplaybin2.c |
| @@ -4729,7 +4729,10 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad, |
| gst_element_factory_can_src_any_caps (factory, raw_caps) |
| || gst_element_factory_can_src_any_caps (factory, caps); |
| } else { |
| - compatible = gst_element_factory_can_src_any_caps (factory, caps); |
| + if (flags & GST_PLAY_FLAG_NATIVE_VIDEO) |
| + compatible = gst_element_factory_can_src_any_caps (factory, raw_caps); |
| + else |
| + compatible = gst_element_factory_can_src_any_caps (factory, caps); |
| } |
| |
| gst_object_unref (sinkpad); |
| diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c |
| index a857d955..e5227593 100644 |
| --- a/gst/playback/gstplaysink.c |
| +++ b/gst/playback/gstplaysink.c |
| @@ -1923,7 +1923,54 @@ gen_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async) |
| } |
| prev = chain->conv; |
| } |
| + else if (playsink->flags & GST_PLAY_FLAG_NATIVE_VIDEO) { |
| + GstElement *elem = NULL; |
| + GstIterator *iter = NULL; |
| + GValue value = { 0 }; |
| + gboolean done = FALSE; |
| + gboolean found_mdp = FALSE; |
| + |
| + iter = gst_bin_iterate_elements (playsink->video_sink); |
| + if (iter != NULL) { |
| + while (!done) { |
| + switch (gst_iterator_next (iter, &value)) { |
| + case GST_ITERATOR_OK: |
| + elem = (GstElement *) g_value_get_object (&value); |
| + GST_DEBUG_OBJECT (playsink, "element->name=%s", GST_ELEMENT_NAME (elem)); |
| + if (strstr (GST_ELEMENT_NAME (elem), "mtkmdp")) { |
| + done = TRUE; |
| + found_mdp = TRUE; |
| + } |
| + /* Iterator increased the element refcount, so unref */ |
| + g_value_unset (&value); |
| + break; |
| + default: |
| + done = TRUE; |
| + break; |
| + } |
| + } |
| + gst_iterator_free (iter); |
| + } |
| |
| + if (found_mdp == FALSE) { |
| + GST_DEBUG_OBJECT (playsink, "mdp_plugin == NULL"); |
| + chain->conv = gst_element_factory_make ("mtkmdp", "mtkmdp"); |
| + if (chain->conv == NULL) { |
| + GST_WARNING_OBJECT (playsink, "no mtkmdp plugin"); |
| + } |
| + else { |
| + gst_bin_add (bin, chain->conv); |
| + if (prev) { |
| + if (!gst_element_link_pads_full (prev, "src", chain->conv, "sink", |
| + GST_PAD_LINK_CHECK_TEMPLATE_CAPS)) |
| + goto link_failed; |
| + } else { |
| + head = chain->conv; |
| + } |
| + prev = chain->conv; |
| + } |
| + } |
| + } |
| update_colorbalance (playsink); |
| |
| if (prev) { |