From: Hyongtaek Lim Date: Tue, 18 Aug 2015 08:17:41 +0000 (+0900) Subject: Use the omx codec with daemon X-Git-Tag: accepted/tizen/mobile/20150820.043544~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F33%2F46233%2F1;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git Use the omx codec with daemon Signed-off-by: Hyongtaek Lim Change-Id: Ie49fd5fb2c0c84529743aac9fed3260d6893b60c --- diff --git a/src/Makefile.am b/src/Makefile.am index 2caa948..dad5fcb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,7 +83,7 @@ libmmfplayerclient_la_LIBADD = $(GST_LIBS) \ $(INIPARSER_LIBS) \ $(VCONF_LIBS) -libmmfplayer_la_CFLAGS += $(MMLOG_CFLAGS) -DMMF_LOG_OWNER=0x008 -DMMF_DEBUG_PREFIX=\"MMF-PLAYER\" -D_INTERNAL_SESSION_MANAGER_ -DSW_CODEC_ONLY +libmmfplayer_la_CFLAGS += $(MMLOG_CFLAGS) -DMMF_LOG_OWNER=0x008 -DMMF_DEBUG_PREFIX=\"MMF-PLAYER\" -D_INTERNAL_SESSION_MANAGER_ libmmfplayer_la_LIBADD += $(MMLOG_LIBS) libmmfplayerclient_la_CFLAGS += $(MMLOG_CFLAGS) -DMMF_LOG_OWNER=0x008 -DMMF_DEBUG_PREFIX=\"MMF-PLAYER\" -D_INTERNAL_SESSION_MANAGER_ diff --git a/src/client/mm_player_client.c b/src/client/mm_player_client.c index 2de6e42..f4e1c3a 100644 --- a/src/client/mm_player_client.c +++ b/src/client/mm_player_client.c @@ -327,6 +327,7 @@ static int _mmplayer_mused_realize(mm_player_t *player, char *string_caps) int surface_type = 0; gchar *videosink_element = NULL; gchar *videosrc_element = NULL; + gboolean use_tbm = FALSE; /* check current state */ MMPLAYER_CHECK_STATE_RETURN_IF_FAIL( player, MMPLAYER_COMMAND_REALIZE ); @@ -375,6 +376,12 @@ static int _mmplayer_mused_realize(mm_player_t *player, char *string_caps) result = MM_ERROR_PLAYER_INTERNAL; goto REALIZE_ERROR; } + + if(string_caps && (strstr(string_caps, "ST12") || strstr(string_caps, "SN12"))) { + debug_log("using TBM"); + use_tbm = TRUE; + } + if(strcmp(videosrc_element, "shmsrc") == 0) { attr_ret = mm_attrs_get_string_by_name ( attrs, "shm_stream_path", &stream_path ); if(attr_ret == MM_ERROR_NONE && stream_path) { @@ -382,6 +389,7 @@ static int _mmplayer_mused_realize(mm_player_t *player, char *string_caps) g_object_set(G_OBJECT(src), "socket-path", stream_path, "is-live", TRUE, + "use-tbm", use_tbm, NULL); } else { result = MM_ERROR_PLAYER_INTERNAL; diff --git a/src/server/mm_player_priv.c b/src/server/mm_player_priv.c index e7470c2..f60235a 100644 --- a/src/server/mm_player_priv.c +++ b/src/server/mm_player_priv.c @@ -5231,6 +5231,8 @@ __mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDispl case MM_DISPLAY_SURFACE_REMOTE: { char *stream_path = NULL; + /* viceo_zc is the result of check ST12/SN12 */ + bool use_tbm = player->set_mode.video_zc; int attr_ret = mm_attrs_get_string_by_name ( attrs, "shm_stream_path", &stream_path ); if(attr_ret == MM_ERROR_NONE && stream_path) { @@ -5238,6 +5240,7 @@ __mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDispl "socket-path", stream_path, "wait-for-connection", FALSE, "sync", TRUE, + "use-tbm", use_tbm, NULL); debug_log("set path \"%s\" for shmsink", stream_path); } else { @@ -6256,24 +6259,6 @@ __mmplayer_gst_create_pipeline(mm_player_t* player) // @ _mmplayer_track_initialize(player); -#ifdef SW_CODEC_ONLY - mm_attrs_get_int_by_name (player->attrs, "display_surface_type", &surface_type); - if(surface_type == MM_DISPLAY_SURFACE_REMOTE) - { - int idx = 0; - while (player->ini.exclude_element_keyword[idx][0] != '\0') - { - idx++; - } - if(idx < PLAYER_INI_MAX_ELEMENT) - { - strncpy(player->ini.exclude_element_keyword[idx], - "omx", PLAYER_INI_MAX_STRLEN); - debug_log("Remote surface uses s/w codec"); - } - } -#endif - /* create source element */ switch ( player->profile.uri_type ) {