GstElement *new_element = NULL;
GstStructure *str = NULL;
const gchar *name = NULL;
- gboolean caps_ret = TRUE;
mm_player_t *player = (mm_player_t*) data;
player->pipeline &&
player->pipeline->mainbin);
- MMPLAYER_GST_GET_CAPS_INFO(pad, caps, str, name, caps_ret);
- if (!caps_ret)
- goto ERROR;
-
/* payload type is recognizable. increase num_dynamic and wait for sinkbin creation.
* num_dynamic_pad will decreased after creating a sinkbin.
*/
player->num_dynamic_pad++;
LOGD("stream count inc : %d", player->num_dynamic_pad);
- /* clear previous result*/
- player->have_dynamic_pad = FALSE;
+ caps = gst_pad_query_caps(pad, NULL);
+ MMPLAYER_CHECK_NULL(caps);
+
+ str = gst_caps_get_structure (caps, 0);
+ name = gst_structure_get_string(str, "media");
+ if (!name) {
+ LOGE("cannot get mimetype from structure.\n");
+ goto ERROR;
+ }
if (strstr(name, "video")) {
gint stype = 0;
mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &stype);
- if (stype == MM_DISPLAY_SURFACE_NULL || stype == MM_DISPLAY_SURFACE_REMOTE) {
+ if ((stype == MM_DISPLAY_SURFACE_NULL) && (player->set_mode.media_packet_video_stream == FALSE)) {
if (player->v_stream_caps) {
gst_caps_unref(player->v_stream_caps);
player->v_stream_caps = NULL;
}
}
- /* clear previous result*/
- player->have_dynamic_pad = FALSE;
-
if (!__mmplayer_gst_create_decoder(player, pad, caps)) {
LOGE("failed to autoplug for caps");
goto ERROR;
}
- /* check if there's dynamic pad*/
- if (player->have_dynamic_pad) {
- LOGE("using pad caps assums there's no dynamic pad !\n");
- goto ERROR;
- }
-
gst_caps_unref(caps);
caps = NULL;