[0.6.196] support offload looping with seeking 42/208442/1
authorEunhye Choi <eunhae1.choi@samsung.com>
Mon, 24 Jun 2019 08:54:36 +0000 (17:54 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Mon, 24 Jun 2019 08:54:39 +0000 (17:54 +0900)
- In case of offload, gapless playback is not supportable.
  Looping is supportable with seeking operation.

Change-Id: Ie3181022cdcf0b9b71482bd6b52129f3b7eaceb9

packaging/libmm-player.spec
src/mm_player_attrs.c
src/mm_player_priv.c

index 7db1ad3..91dd001 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.195
+Version:    0.6.196
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index b2d707e..6f43df6 100644 (file)
@@ -221,7 +221,7 @@ __mmplayer_apply_attribute(MMHandleType handle, const char *attribute_name)
        if (g_strrstr(attribute_name, MM_PLAYER_GAPLESS_MODE)) {
                int gapless = 0;
 
-               mm_attrs_get_int_by_name(player->attrs, "gapless_mode", &gapless);
+               mm_attrs_get_int_by_name(player->attrs, MM_PLAYER_GAPLESS_MODE, &gapless);
                if (gapless > 0) {
                        LOGD("disable last-sample at videosink");
                        g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "enable-last-sample", FALSE, NULL);
index 42528d6..d495e7a 100644 (file)
@@ -3542,7 +3542,7 @@ __mmplayer_gst_set_videosink_property(mmplayer_t *player, MMDisplaySurfaceType s
                                                                                "sync", TRUE, "max-lateness", FAKE_SINK_MAX_LATENESS, NULL);
        }
 
-       mm_attrs_get_int_by_name(attrs, "gapless_mode", &gapless);
+       mm_attrs_get_int_by_name(attrs, MM_PLAYER_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);
@@ -6409,6 +6409,11 @@ __mmplayer_verify_gapless_play_path(mmplayer_t *player)
 
        LOGD("checking for gapless play option");
 
+       if (player->build_audio_offload) {
+               LOGE("offload path is not supportable.");
+               goto ERROR;
+       }
+
        if (player->pipeline->textbin) {
                LOGE("subtitle path is enabled. gapless play is not supported.");
                goto ERROR;
@@ -6432,7 +6437,7 @@ __mmplayer_verify_gapless_play_path(mmplayer_t *player)
        if (mm_attrs_get_int_by_name(attrs, "profile_play_count", &count) != MM_ERROR_NONE)
                LOGE("failed to get play count");
 
-       if (mm_attrs_get_int_by_name(attrs, "gapless_mode", &gapless) != MM_ERROR_NONE)
+       if (mm_attrs_get_int_by_name(attrs, MM_PLAYER_GAPLESS_MODE, &gapless) != MM_ERROR_NONE)
                LOGE("failed to get gapless mode");
 
        /* check repeat count in case of audio */