#define MMPLAYER_LOG_GST_CAPS_TYPE(x_caps) \
do { \
gchar *caps_type = NULL; \
- caps_type = gst_caps_to_string(x_caps); \
- LOGD("caps: %s", caps_type); \
- MMPLAYER_FREEIF(caps_type); \
+ if (x_caps) { \
+ caps_type = gst_caps_to_string(x_caps); \
+ LOGD("caps: %s", caps_type); \
+ MMPLAYER_FREEIF(caps_type); \
+ } else {\
+ LOGW("caps is null"); \
+ } \
} while (0)
/* message posting */
g_object_set(G_OBJECT(audiobin[MMPLAYER_A_VOL].gst), "mute", player->sound.mute, NULL);
}
- /* check if multi-channels */
- if (player->pipeline->mainbin && player->pipeline->mainbin[MMPLAYER_M_DEMUX].gst) {
- GstPad *srcpad = NULL;
- GstCaps *caps = NULL;
-
- if ((srcpad = gst_element_get_static_pad(player->pipeline->mainbin[MMPLAYER_M_DEMUX].gst, "src"))) {
- if ((caps = gst_pad_query_caps(srcpad, NULL))) {
- /* MMPLAYER_LOG_GST_CAPS_TYPE(caps); */
- GstStructure *str = gst_caps_get_structure(caps, 0);
- if (str)
- gst_structure_get_int(str, "channels", &channels);
- gst_caps_unref(caps);
- }
- gst_object_unref(srcpad);
- }
- }
+ mm_attrs_get_int_by_name(player->attrs, "content_audio_channels", &channels);
/* audio effect element. if audio effect is enabled */
if ((strcmp(player->ini.audioeffect_element, ""))
"max-video-width", player->adaptive_info.limit.width,
"max-video-height", player->adaptive_info.limit.height, NULL);
- } else if (g_strrstr(klass, "Demux") || g_strrstr(klass, "Parse")) {
- /* FIXIT : first value will be overwritten if there's more
- * than 1 demuxer/parser
- */
-
- //LOGD("plugged element is demuxer. take it\n");
+ } else if (g_strrstr(klass, "Demuxer")) {
+ //LOGD("plugged element is demuxer. take it");
player->pipeline->mainbin[MMPLAYER_M_DEMUX].id = MMPLAYER_M_DEMUX;
player->pipeline->mainbin[MMPLAYER_M_DEMUX].gst = element;
-
- /*Added for multi audio support */ // Q. del?
- if (g_strrstr(klass, "Demux")) {
- player->pipeline->mainbin[MMPLAYER_M_DEMUX_EX].id = MMPLAYER_M_DEMUX_EX;
- player->pipeline->mainbin[MMPLAYER_M_DEMUX_EX].gst = element;
- }
}
if (g_strrstr(factory_name, "asfdemux") || g_strrstr(factory_name, "qtdemux") || g_strrstr(factory_name, "avidemux")) {
}
return;
-}
\ No newline at end of file
+}