int mm_player_set_external_subtitle_path(MMHandleType player, const char* path);
/**
- * This function is to set download mode of video hub
- *
- * @param player [in] handle of player
- * @param mode [in] download mode
- * @return This function returns zero on success, or negative value with error code.
- */
-int mm_player_set_video_hub_download_mode(MMHandleType player, bool mode);
-
-/**
- * This function is to set using sync handler.
- *
- * @param player [in] handle of player
- * @param enable [in] enable/disable
- * @return This function returns zero on success, or negative value with error code.
- */
-int mm_player_enable_sync_handler(MMHandleType player, bool enable);
-
-/**
* This function is to set uri.
*
* @param player [in] handle of player
/* initialize values */
mm_player_ini_t ini;
- /* just for native app (video hub) */
- gboolean video_hub_download_mode;
- gboolean sync_handler;
-
/* store dump pad list */
GList *dump_list;
int _mmplayer_set_audiostream_cb(MMHandleType hplayer, bool sync, mm_player_audio_stream_callback callback, void *user_param);
int _mmplayer_change_track_language(MMHandleType hplayer, MMPlayerTrackType type, int index);
int _mmplayer_sync_subtitle_pipeline(mm_player_t *player);
-int _mmplayer_set_video_hub_download_mode(MMHandleType hplayer, bool mode);
int _mmplayer_use_system_clock(MMHandleType hplayer);
-int _mmplayer_enable_sync_handler(MMHandleType hplayer, bool enable);
int _mmplayer_set_file_buffering_path(MMHandleType hplayer, const char *file_path);
int _mmplayer_set_uri(MMHandleType hplayer, const char *uri);
int _mmplayer_set_next_uri(MMHandleType hplayer, const char *uri, bool is_first_path);
return result;
}
-int mm_player_set_video_hub_download_mode(MMHandleType player, bool mode)
-{
- int result = MM_ERROR_NONE;
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- MMPLAYER_CMD_LOCK(player);
-
- result = _mmplayer_set_video_hub_download_mode(player, mode);
-
- MMPLAYER_CMD_UNLOCK(player);
-
- return result;
-}
-
-int mm_player_enable_sync_handler(MMHandleType player, bool enable)
-{
- int result = MM_ERROR_NONE;
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- MMPLAYER_CMD_LOCK(player);
-
- result = _mmplayer_enable_sync_handler(player, enable);
-
- MMPLAYER_CMD_UNLOCK(player);
-
- return result;
-}
-
int mm_player_set_uri(MMHandleType player, const char *uri)
{
int result = MM_ERROR_NONE;
}
switch (GST_MESSAGE_TYPE(message)) {
- case GST_MESSAGE_STATE_CHANGED:
- /* post directly for fast launch */
- if (player->sync_handler) {
- __mmplayer_gst_bus_msg_callback(message, player);
- reply = GST_BUS_DROP;
- } else
- reply = GST_BUS_PASS;
- break;
case GST_MESSAGE_TAG:
__mmplayer_gst_extract_tag_from_msg(player, message);
player->no_more_pad = FALSE;
player->num_dynamic_pad = 0;
player->demux_pad_index = 0;
- player->video_hub_download_mode = 0;
MMPLAYER_SUBTITLE_INFO_LOCK(player);
player->subtitle_language_list = NULL;
if (g_strrstr(factory_name, "asfdemux")) {
LOGD("set file-location %s\n", player->profile.uri);
g_object_set(G_OBJECT(element), "file-location", player->profile.uri, NULL);
-
- if (player->video_hub_download_mode == TRUE)
- g_object_set(G_OBJECT(element), "downloading-mode", player->video_hub_download_mode, NULL);
} else if (g_strrstr(factory_name, "legacyh264parse")) {
LOGD("[%s] output-format to legacyh264parse\n", "mssdemux");
g_object_set(G_OBJECT(element), "output-format", 1, NULL); /* NALU/Byte Stream format */
return MM_ERROR_NONE;
}
-int
-_mmplayer_set_video_hub_download_mode(MMHandleType hplayer, bool mode)
-{
- mm_player_t* player = (mm_player_t*) hplayer;
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- if (MMPLAYER_CURRENT_STATE(player) != MM_PLAYER_STATE_NULL) {
- MMPLAYER_PRINT_STATE(player);
- LOGE("wrong-state : can't set the download mode to parse");
- return MM_ERROR_PLAYER_INVALID_STATE;
- }
-
- LOGD("set video hub download mode to %s", (mode) ? "ON" : "OFF");
- player->video_hub_download_mode = mode;
-
- return MM_ERROR_NONE;
-}
-
-int
-_mmplayer_enable_sync_handler(MMHandleType hplayer, bool enable)
-{
- mm_player_t* player = (mm_player_t*) hplayer;
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- LOGD("enable sync handler : %s", (enable) ? "ON" : "OFF");
- player->sync_handler = enable;
-
- return MM_ERROR_NONE;
-}
-
static gboolean
__mmplayer_add_dump_buffer_probe(mm_player_t *player, GstElement *element)
{