#define MMPLAYER_GENERATE_DOT_IF_ENABLED(x_player, x_name) \
do { \
if (x_player->ini.generate_dot) { \
- GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst), \
+ GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst), \
GST_DEBUG_GRAPH_SHOW_ALL, x_name); \
} \
} while (0)
sinkpad = NULL;
}
+ MMPLAYER_GENERATE_DOT_IF_ENABLED(player, "pipeline-pad-added");
return;
}
g_list_free(streams);
}
+ /* in paused state, seek to current pos to flush mq buffer and release waiting task */
+ if (MMPLAYER_CURRENT_STATE(player) == MM_PLAYER_STATE_PAUSED) {
+ gint64 pos_nsec = GST_CLOCK_TIME_NONE;
+
+ if (!gst_element_query_position(player->pipeline->mainbin[MMPLAYER_M_PIPE].gst, GST_FORMAT_TIME, &pos_nsec))
+ pos_nsec = player->last_position;
+
+ LOGD("current pos %" GST_TIME_FORMAT ", rate = %f", GST_TIME_ARGS(pos_nsec), player->playback_rate);
+
+ if (!_mmplayer_gst_seek(player, player->pipeline->mainbin[MMPLAYER_M_PIPE].gst,
+ player->playback_rate, GST_FORMAT_TIME,
+ (GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE),
+ GST_SEEK_TYPE_SET, pos_nsec, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE)) {
+ LOGW("failed to seek");
+ return MM_ERROR_PLAYER_INTERNAL;
+ }
+ }
+
MMPLAYER_FLEAVE();
return MM_ERROR_NONE;
}