summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEunhae Choi <eunhae1.choi@samsung.com>2018-03-13 16:39:19 +0900
committerEunhae Choi <eunhae1.choi@samsung.com>2018-03-13 16:39:19 +0900
commitf12bfd8884152d0fbd0ab2cc8470431c4eab3bf6 (patch)
tree0fc2d3528a0f4f6130af8acfb1b7fe0cf5142cdd
parent583f680866246b526480a751ef7423cd4e31da28 (diff)
downloadlibmm-player-f12bfd8884152d0fbd0ab2cc8470431c4eab3bf6.tar.gz
libmm-player-f12bfd8884152d0fbd0ab2cc8470431c4eab3bf6.tar.bz2
libmm-player-f12bfd8884152d0fbd0ab2cc8470431c4eab3bf6.zip
[0.6.97] add interface to get sphercal info
Change-Id: I563890ddcddbe16bd5dc5174e84902277791fb2c
-rw-r--r--packaging/libmm-player.spec2
-rw-r--r--src/include/mm_player.h1
-rw-r--r--src/include/mm_player_360.h1
-rw-r--r--src/mm_player.c16
-rw-r--r--src/mm_player_360.c22
5 files changed, 41 insertions, 1 deletions
diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec
index fe91057..31f65a5 100644
--- a/packaging/libmm-player.spec
+++ b/packaging/libmm-player.spec
@@ -1,6 +1,6 @@
Name: libmm-player
Summary: Multimedia Framework Player Library
-Version: 0.6.96
+Version: 0.6.97
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
diff --git a/src/include/mm_player.h b/src/include/mm_player.h
index 4d3a48f..fade6ca 100644
--- a/src/include/mm_player.h
+++ b/src/include/mm_player.h
@@ -2164,6 +2164,7 @@ int mm_player_get_streaming_buffering_time(MMHandleType player, int *buffer_ms,
/**
* These functions are to display the 360 video content
*/
+int mm_player_360_is_content_spherical(MMHandleType player, bool *is_spherical);
int mm_player_360_set_enable(MMHandleType player, bool enable);
int mm_player_360_is_enabled(MMHandleType player, bool *enabled);
diff --git a/src/include/mm_player_360.h b/src/include/mm_player_360.h
index fb1bae2..12a07c3 100644
--- a/src/include/mm_player_360.h
+++ b/src/include/mm_player_360.h
@@ -34,6 +34,7 @@ extern "C"
| GLOBAL FUNCTION PROTOTYPES |
========================================================================================*/
+int _mmplayer_360_is_content_spherical(MMHandleType player, bool *is_spherical);
int _mmplayer_360_set_enable(MMHandleType player, bool enable);
int _mmplayer_360_is_enabled(MMHandleType player, bool *enabled);
int _mmplayer_360_set_direction_of_view(MMHandleType player, float yaw, float pitch);
diff --git a/src/mm_player.c b/src/mm_player.c
index 7f85b59..adeeec0 100644
--- a/src/mm_player.c
+++ b/src/mm_player.c
@@ -1347,6 +1347,22 @@ int mm_player_get_audio_only(MMHandleType player, bool *audio_only)
return result;
}
+int mm_player_360_is_content_spherical(MMHandleType player, bool *is_spherical)
+{
+ int result = MM_ERROR_NONE;
+
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(is_spherical, MM_ERROR_INVALID_ARGUMENT);
+
+ MMPLAYER_CMD_LOCK(player);
+
+ result = _mmplayer_360_is_content_spherical(player, is_spherical);
+
+ MMPLAYER_CMD_UNLOCK(player);
+
+ return result;
+}
+
int mm_player_360_set_enable(MMHandleType player, bool enable)
{
int result = MM_ERROR_NONE;
diff --git a/src/mm_player_360.c b/src/mm_player_360.c
index 5a872be..ec85062 100644
--- a/src/mm_player_360.c
+++ b/src/mm_player_360.c
@@ -54,6 +54,28 @@ __mmplayer_check_audio_sink(mm_player_t* player)
return true;
}
+int _mmplayer_360_is_content_spherical(MMHandleType hplayer, bool *is_spherical)
+{
+ mm_player_t* player = (mm_player_t*) hplayer;
+
+ MMPLAYER_FENTER();
+ MMPLAYER_RETURN_VAL_IF_FAIL(player && player->pipeline, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(is_spherical, MM_ERROR_INVALID_ARGUMENT);
+
+ LOGD("state %s, spherical info %d",
+ MMPLAYER_STATE_GET_NAME(MMPLAYER_CURRENT_STATE(player)), player->is_content_spherical);
+
+ if (player->state < MM_PLAYER_STATE_READY) {
+ *is_spherical = false;
+ return MM_ERROR_PLAYER_INVALID_STATE;
+ }
+
+ *is_spherical = (bool)player->is_content_spherical;
+
+ MMPLAYER_FLEAVE();
+ return MM_ERROR_NONE;
+}
+
int _mmplayer_360_set_enable(MMHandleType hplayer, bool enable)
{
mm_player_t* player = (mm_player_t*) hplayer;