summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbok Lee <gilbok.lee@samsung.com>2017-01-06 14:41:26 +0900
committerGilbok Lee <gilbok.lee@samsung.com>2017-01-06 14:41:33 +0900
commitb0deccd9d9692201f20d43a29fc5c4d3e5a3768b (patch)
tree707d003247499baaa95c46492864afc8f5a1533a
parent6cf5372e38e6524c9dde5fe281ed33b11465a4c4 (diff)
parent61095e50ad93ae637100d18ad7929b8a95054c07 (diff)
downloadlibmm-player-b0deccd9d9692201f20d43a29fc5c4d3e5a3768b.tar.gz
libmm-player-b0deccd9d9692201f20d43a29fc5c4d3e5a3768b.tar.bz2
libmm-player-b0deccd9d9692201f20d43a29fc5c4d3e5a3768b.zip
Change-Id: I04ebbbf9fa2c06bd2e7901dc095a2d8638a2fdf2
-rw-r--r--packaging/libmm-player.spec2
-rw-r--r--src/include/mm_player_priv.h3
-rw-r--r--src/include/mm_player_utils.h5
-rw-r--r--src/mm_player_priv.c22
4 files changed, 30 insertions, 2 deletions
diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec
index d2d2c92..3cd343f 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.20
+Version: 0.6.22
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
diff --git a/src/include/mm_player_priv.h b/src/include/mm_player_priv.h
index 911dd62..33b2fda 100644
--- a/src/include/mm_player_priv.h
+++ b/src/include/mm_player_priv.h
@@ -485,6 +485,9 @@ typedef struct {
/* fakesink handling lock */
GMutex fsink_lock;
+ /* update tag lock */
+ GMutex update_tag_lock;
+
/* player attributes */
MMHandleType attrs;
diff --git a/src/include/mm_player_utils.h b/src/include/mm_player_utils.h
index 4249afe..099986f 100644
--- a/src/include/mm_player_utils.h
+++ b/src/include/mm_player_utils.h
@@ -85,6 +85,11 @@ x = NULL;
#define MMPLAYER_FSINK_LOCK(x_player) g_mutex_lock(&((mm_player_t *)x_player)->fsink_lock)
#define MMPLAYER_FSINK_UNLOCK(x_player) g_mutex_unlock(&((mm_player_t *)x_player)->fsink_lock)
+
+/* handling update tag */
+#define MMPLAYER_UPDATE_TAG_LOCK(x_player) g_mutex_lock(&((mm_player_t *)x_player)->update_tag_lock)
+#define MMPLAYER_UPDATE_TAG_UNLOCK(x_player) g_mutex_unlock(&((mm_player_t *)x_player)->update_tag_lock)
+
/* video stream bo */
#define MMPLAYER_VIDEO_BO_LOCK(x_player) g_mutex_lock(&((mm_player_t *)x_player)->video_bo_mutex)
#define MMPLAYER_VIDEO_BO_UNLOCK(x_player) g_mutex_unlock(&((mm_player_t *)x_player)->video_bo_mutex)
diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c
index e94848c..74edc32 100644
--- a/src/mm_player_priv.c
+++ b/src/mm_player_priv.c
@@ -1923,7 +1923,9 @@ if (gst_tag_list_get_double(tag_list, gsttag, &v_double)) {\
MMPLAYER_UPDATE_TAG_STRING(GST_TAG_AUDIO_CODEC, attrs, "content_audio_codec");
MMPLAYER_UPDATE_TAG_UINT(GST_TAG_BITRATE, attrs, "content_bitrate");
MMPLAYER_UPDATE_TAG_UINT(GST_TAG_MAXIMUM_BITRATE, attrs, "content_max_bitrate");
+ MMPLAYER_UPDATE_TAG_LOCK(player);
MMPLAYER_UPDATE_TAG_IMAGE(GST_TAG_IMAGE, attrs, "tag_album_cover");
+ MMPLAYER_UPDATE_TAG_UNLOCK(player);
/* MMPLAYER_UPDATE_TAG_UINT(GST_TAG_NOMINAL_BITRATE, ?, ?); */
/* MMPLAYER_UPDATE_TAG_UINT(GST_TAG_MINIMUM_BITRATE, ?, ?); */
/* MMPLAYER_UPDATE_TAG_UINT(GST_TAG_SERIAL, ?, ?); */
@@ -8561,6 +8563,9 @@ _mmplayer_create_player(MMHandleType handle) // @
/* create lock. note that g_tread_init() has already called in gst_init() */
g_mutex_init(&player->fsink_lock);
+ /* create update tag lock */
+ g_mutex_init(&player->update_tag_lock);
+
/* create repeat mutex */
g_mutex_init(&player->repeat_thread_mutex);
@@ -8653,6 +8658,9 @@ ERROR:
/* free lock */
g_mutex_clear(&player->fsink_lock);
+ /* free update tag lock */
+ g_mutex_clear(&player->update_tag_lock);
+
/* free thread */
if (player->repeat_thread) {
player->repeat_thread_exit = TRUE;
@@ -8960,6 +8968,9 @@ _mmplayer_destroy(MMHandleType handle) // @
/* release lock */
g_mutex_clear(&player->fsink_lock);
+ /* release lock */
+ g_mutex_clear(&player->update_tag_lock);
+
/* release video bo lock and cond */
g_mutex_clear(&player->video_bo_mutex);
g_cond_clear(&player->video_bo_cond);
@@ -10270,7 +10281,9 @@ GstCaps *caps, gpointer data)
if ((!MMPLAYER_IS_WFD_STREAMING(player)) &&
(!MMPLAYER_IS_RTSP_STREAMING(player)) &&
- (g_strrstr(player->type, "audio/x-raw-int"))) {
+ (g_strrstr(player->type, "audio/x-raw-int") ||
+ g_strrstr(player->type, "audio/webm") ||
+ g_strrstr(player->type, "video/webm"))) {
LOGE("not support media format\n");
if (player->msg_posted == FALSE) {
@@ -11792,7 +11805,14 @@ GstCaps * caps, gpointer data)
/* set it directly because not sent by TAG */
if (g_strrstr(caps_str, "mobile-xmf"))
mm_attrs_set_string_by_name(player->attrs, "content_audio_codec", "mobile-xmf");
+ if (g_strrstr(caps_str, "audio/webm")) {
+ LOGD("webm is not supported");
+ ret = FALSE;
+ }
MMPLAYER_FREEIF(caps_str);
+ } else if (g_str_has_prefix(mime, "video/webm")) {
+ LOGD("webm is not supported");
+ ret = FALSE;
} else if (g_str_has_prefix(mime, "video") && !player->ini.video_playback_supported) {
MMMessageParamType msg_param;
memset(&msg_param, 0, sizeof(MMMessageParamType));