unprepare when resource conflict is happened 37/42937/1
authorHyunil Park <hyunil46.park@samsung.com>
Mon, 6 Jul 2015 07:00:33 +0000 (16:00 +0900)
committerHyunil Park <hyunil46.park@samsung.com>
Mon, 6 Jul 2015 07:00:33 +0000 (16:00 +0900)
Change-Id: Ie1afe179a7f7cc670072b4bc87ccecfbc1ee48f5
Signed-off-by: Hyunil Park <hyunil46.park@samsung.com>
packaging/libmm-player.spec
src/mm_player_priv.c

index 8527caf..7d89fd6 100755 (executable)
@@ -3,8 +3,8 @@
 
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.5.60
-Release:    1
+Version:    0.5.61
+Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
 URL:        http://source.tizen.org
index b3705ab..cf12a6f 100755 (executable)
@@ -1389,8 +1389,8 @@ __mmplayer_set_state(mm_player_t* player, int state) // @
                /* state changed by asm callback */
                if ( interrupted_by_asm )
                {
-      msg.union_type = MM_MSG_UNION_CODE;
-      msg.code = player->sm.event_src;
+                       msg.union_type = MM_MSG_UNION_CODE;
+                       msg.code = player->sm.event_src;
                        MMPLAYER_POST_MSG( player, MM_MESSAGE_STATE_INTERRUPTED, &msg );
                }
                /* state changed by usecase */
@@ -9401,13 +9401,11 @@ __mmplayer_asm_callback(int handle, ASM_event_sources_t event_src, ASM_sound_com
        }
        else if (event_src == ASM_EVENT_SOURCE_RESOURCE_CONFLICT)
        {
-               /* can use video overlay simultaneously */
-               /* video resource conflict */
                if(player->pipeline->videobin)
                {
-                       debug_log("video conflict but, can support multiple video");
-                       result = _mmplayer_pause((MMHandleType)player);
-                       cb_res = ASM_CB_RES_PAUSE;
+                       debug_log("video conflict so, resource will be freed.");
+                       result = _mmplayer_unrealize((MMHandleType)player);
+                       cb_res = ASM_CB_RES_STOP;
                }
                else if (player->pipeline->audiobin)
                {
@@ -11480,7 +11478,6 @@ __mmplayer_try_to_plug_decodebin(mm_player_t* player, GstPad *srcpad, const GstC
        MMPlayerGstElement* mainbin = NULL;
        GstElement* decodebin2 = NULL;
        GstElement* queue2 = NULL;
-       GstElement* id3demux = NULL;
        GstPad* sinkpad = NULL;
        GstPad* qsrcpad= NULL;
        gchar *caps_str = NULL;
@@ -11661,22 +11658,6 @@ ERROR:
                queue2 = NULL;
        }
 
-       if (id3demux)
-       {
-               /* NOTE : Trying to dispose element id3demux, but it is in READY instead of the NULL state.
-                * You need to explicitly set elements to the NULL state before
-                * dropping the final reference, to allow them to clean up.
-                */
-               gst_element_set_state(id3demux, GST_STATE_NULL);
-
-               /* And, it still has a parent "player".
-                * You need to let the parent manage the object instead of unreffing the object directly.
-                */
-               gst_bin_remove (GST_BIN(mainbin[MMPLAYER_M_PIPE].gst), id3demux);
-               gst_object_unref (id3demux);
-               id3demux = NULL;
-       }
-
        if (decodebin2)
        {
                /* NOTE : Trying to dispose element queue0, but it is in READY instead of the NULL state.