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;
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);