Use the omx codec with daemon 33/46233/1
authorHyongtaek Lim <hyongtaek.lim@samsung.com>
Tue, 18 Aug 2015 08:17:41 +0000 (17:17 +0900)
committerHyongtaek Lim <hyongtaek.lim@samsung.com>
Tue, 18 Aug 2015 08:18:19 +0000 (17:18 +0900)
Signed-off-by: Hyongtaek Lim <hyongtaek.lim@samsung.com>
Change-Id: Ie49fd5fb2c0c84529743aac9fed3260d6893b60c

src/Makefile.am
src/client/mm_player_client.c
src/server/mm_player_priv.c

index 2caa948..dad5fcb 100644 (file)
@@ -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_
index 2de6e42..f4e1c3a 100644 (file)
@@ -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;
index e7470c2..f60235a 100644 (file)
@@ -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 )
        {