From: Eunhye Choi Date: Fri, 14 Feb 2020 05:57:16 +0000 (+0900) Subject: 0.6.217: get current caps X-Git-Tag: accepted/tizen/unified/20200217.213909^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F224918%2F2;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git 0.6.217: get current caps - get current caps directly instead of using query to get caps info of omx src pad Change-Id: Ifa1be4f681667421321796ec748a863ff9ef3936 --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 38da862..ae93736 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -1,6 +1,6 @@ Name: libmm-player Summary: Multimedia Framework Player Library -Version: 0.6.216 +Version: 0.6.217 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index 1978703..550d3b5 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -1177,7 +1177,6 @@ _mmplayer_gst_decode_pad_added(GstElement *elem, GstPad *pad, gpointer data) const gchar *name = NULL; GstPad *sinkpad = NULL; gboolean first_track = FALSE; - gboolean caps_ret = TRUE; main_element_id_e elem_idx = MMPLAYER_M_NUM; mmplayer_track_type_e stream_type = MM_PLAYER_TRACK_TYPE_AUDIO; @@ -1189,8 +1188,13 @@ _mmplayer_gst_decode_pad_added(GstElement *elem, GstPad *pad, gpointer data) LOGD("pad-added signal handling"); /* get mimetype from caps */ - MMPLAYER_GST_GET_CAPS_INFO(pad, caps, str, name, caps_ret); - if (!caps_ret) + caps = gst_pad_get_current_caps(pad); + if (caps) { + str = gst_caps_get_structure(caps, 0); + if (str) + name = gst_structure_get_name(str); + } + if (!name) goto ERROR; MMPLAYER_LOG_GST_CAPS_TYPE(caps);