__mmplayer_remove_g_source_from_context(player->context.thread_default, player->bus_watcher);
MMPLAYER_BUS_WATCHER_LOCK(player);
end_time = g_get_monotonic_time () + 2 * G_TIME_SPAN_SECOND;
- while (player->bus_watcher > 0)
- MMPLAYER_BUS_WATCHER_WAIT_UNTIL(player, end_time);
+ while (player->bus_watcher > 0) {
+ if (!MMPLAYER_BUS_WATCHER_WAIT_UNTIL(player, end_time)) {
+ LOGW("MMPLAYER_BUS_WATCHER_WAIT_UNTIL() timeout has passed - bus_watcher (%d)",
+ player->bus_watcher);
+ break;
+ }
+ }
MMPLAYER_BUS_WATCHER_UNLOCK(player);
-
g_mutex_clear(&player->bus_watcher_mutex);
g_cond_clear(&player->bus_watcher_cond);
}
ret = _mmplayer_initialize_video_capture(player);
if (ret != MM_ERROR_NONE) {
- LOGE("failed to initialize video capture");
- goto ERROR;
+ LOGW("video capture is not supported");
+ /* do not handle as error for headless profile */
}
/* initialize resource manager */
if (MMPLAYER_USE_DECODEBIN(player))
return;
- if (!videobin || !g_str_has_prefix (GST_PAD_NAME (pad), "video"))
+ if (!videobin || !g_str_has_prefix(GST_PAD_NAME (pad), "video"))
return;
ret = _mmplayer_gst_set_state(player, mainbin[MMPLAYER_M_V_CONCAT].gst, GST_STATE_NULL, FALSE, timeout);
#endif
player->pipeline->mainbin[MMPLAYER_M_DEMUX].id = MMPLAYER_M_DEMUX;
player->pipeline->mainbin[MMPLAYER_M_DEMUX].gst = element;
+ } else if (g_strrstr(klass, "Parser") && (g_strrstr(klass, "Video"))) {
+ player->pipeline->mainbin[MMPLAYER_M_V_PARSE].id = MMPLAYER_M_V_PARSE;
+ player->pipeline->mainbin[MMPLAYER_M_V_PARSE].gst = element;
}
if (g_strrstr(factory_name, "asfdemux") || g_strrstr(factory_name, "qtdemux") || g_strrstr(factory_name, "avidemux")) {
}
} else if (g_strrstr(factory_name, player->ini.videocodec_element_hw)) {
player->pipeline->mainbin[MMPLAYER_M_DEC1].gst = element;
+ } else if (g_strrstr(factory_name, "omxdec_h264")) {
+ GstElement *video_parse = player->pipeline->mainbin[MMPLAYER_M_V_PARSE].gst;
+ if (video_parse && (g_object_class_find_property(G_OBJECT_GET_CLASS(video_parse), "config-interval"))) {
+ g_object_set(G_OBJECT(video_parse), "config-interval", -1, NULL);
+ LOGD("Send SPS and PPS Insertion every IDR frame");
+ }
}
if ((player->pipeline->mainbin[MMPLAYER_M_DEMUX].gst) &&
for (; sig_list; sig_list = sig_list->next) {
item = sig_list->data;
- if (item && item->obj && GST_IS_ELEMENT(item->obj)) {
+ if (item && item->obj) {
if (g_signal_handler_is_connected(item->obj, item->sig))
g_signal_handler_disconnect(item->obj, item->sig);
}
if (streams) {
LOGD("send select stream event");
- gst_element_send_event(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst,
+ gst_element_send_event(player->pipeline->mainbin[MMPLAYER_M_AUTOPLUG].gst,
gst_event_new_select_streams(streams));
g_list_free(streams);
}