post message for gapless on evas surface 99/86599/3
authorNAMJEONGYOON <just.nam@samsung.com>
Fri, 2 Sep 2016 05:10:33 +0000 (14:10 +0900)
committerNam <just.nam@samsung.com>
Mon, 9 Jan 2017 08:13:44 +0000 (00:13 -0800)
Change-Id: I9a7abca0d4175661c429e9504742491d1e651682

src/mm_player_priv.c

index 74edc32..42a9fcb 100644 (file)
@@ -5406,6 +5406,16 @@ __mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDispl
                                                                        "preroll-handoff",
                                                                        G_CALLBACK(__mmplayer_video_stream_decoded_preroll_cb),
                                                                        (gpointer)player);
+                       if (attrs) {
+                               int gapless = 0;
+
+                               mm_attrs_get_int_by_name(attrs, "gapless_mode", &gapless);
+
+                               if (gapless > 0) {
+                                       LOGD("disable last-sample");
+                                       g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "enable-last-sample", FALSE, NULL);
+                               }
+                       }
                }
                break;
        }
@@ -12106,6 +12116,7 @@ __mmplayer_gst_decode_drained(GstElement *bin, gpointer data)
        player->gapless.update_segment[MM_PLAYER_TRACK_TYPE_VIDEO] = FALSE;
 
        /* deactivate pipeline except sinkbins to set up the new pipeline of next uri*/
+       MMPLAYER_POST_MSG(player, MM_MESSAGE_GAPLESS_CONSTRUCTION, NULL); /* post message for gapless */
        __mmplayer_deactivate_old_path(player);
        MMPLAYER_CMD_UNLOCK(player);