Name: libmm-player
Summary: Multimedia Framework Player Library
-Version: 0.6.189
+Version: 0.6.190
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
*
*/
#define MM_PLAYER_VIDEO_HEIGHT "content_video_height"
+
+/**
+ * MM_PLAYER_VIDEO_FPS:
+ */
+#define MM_PLAYER_VIDEO_FPS "content_video_fps"
+
+/**
+ * MM_PLAYER_VIDEO_BITRATE:
+ */
+#define MM_PLAYER_VIDEO_BITRATE "content_video_bitrate"
+
/**
* MM_PLAYER_VIDEO_EVAS_SURFACE_SINK:
*
typedef bool (*mm_player_track_selected_subtitle_language_callback)(int track_num, void *user_param);
/**
- * Buffer underrun / overflow data callback function type.
- *
- * @param status [in] buffer status
- * @param user_param [in] User defined parameter which is passed when set
- * to enough data callback or need data callback
- *
- * @return This callback function have to return MM_ERROR_NONE.
- */
-typedef bool (*mm_player_media_stream_buffer_status_callback)(mmplayer_stream_type_e type, mmplayer_media_stream_buffer_status_e status, unsigned long long bytes, void *user_param);
-
-/**
- * Buffer seek data callback function type.
- *
- * @param offset [in] offset for the buffer playback
- * @param user_param [in] User defined parameter which is passed when set
- * to seek data callback
- *
- * @return This callback function have to return MM_ERROR_NONE.
- */
-typedef bool (*mm_player_media_stream_seek_data_callback)(mmplayer_stream_type_e type, unsigned long long offset, void *user_param);
-
-/**
* Called to notify the stream changed.
*
* @param user_data [in] The user data passed from the callback registration function
int mm_player_set_subtitle_info(MMHandleType player, mmplayer_subtitle_stream_info_t *info);
/**
- * This function set callback function for receiving need or enough data message from player.
- *
- * @param player [in] Handle of player.
- * @param type [in] stream type
- * @param callback [in] data callback function for stream type.
- * @param user_param [in] User parameter.
- *
- * @return This function returns zero on success, or negative value with error
- * code.
- */
-int mm_player_set_media_stream_buffer_status_callback(MMHandleType player, mmplayer_stream_type_e type, mm_player_media_stream_buffer_status_callback callback, void *user_param);
-
-/**
- * This function set callback function for receiving seek data message from player.
- *
- * @param player [in] Handle of player.
- * @param type [in] stream type
- * @param callback [in] Seek data callback function for stream type.
- * @param user_param [in] User parameter.
- *
- * @return This function returns zero on success, or negative value with error
- * code.
- */
-int mm_player_set_media_stream_seek_data_callback(MMHandleType player, mmplayer_stream_type_e type, mm_player_media_stream_seek_data_callback callback, void *user_param);
-
-/**
* This function is to set max size of buffer(appsrc).
*
* @param player [in] Handle of player.
int mm_player_set_audio_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param);
/**
- * This function set callback function for changing video stream from player. \n
- * It's only supported when video stream is included in file. \n
- *
- * @param player [in] Handle of player.
- * @param callback [in] Video stream changed callback function.
- * @param user_param [in] User parameter.
- *
- * @return This function returns zero on success, or negative value with error
- * code.
- * @see mm_player_stream_changed_callback
- */
-int mm_player_set_video_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param);
-
-/**
* This function is to get timeout value according to the content type for muse. \n
* It's only supported when video stream is included in file. \n
*
int _mmplayer_submit_packet(MMHandleType player, media_packet_h packet);
-int _mmplayer_set_media_stream_buffer_status_cb(MMHandleType player,
- mmplayer_stream_type_e type,
- mm_player_media_stream_buffer_status_callback callback,
- void *user_param);
-
-int _mmplayer_set_media_stream_seek_data_cb(MMHandleType player,
- mmplayer_stream_type_e type,
- mm_player_media_stream_seek_data_callback callback,
- void *user_param);
-
int _mmplayer_set_media_stream_max_size(MMHandleType hplayer,
mmplayer_stream_type_e type,
guint64 max_size);
guint64 media_stream_buffer_max_size[MM_PLAYER_STREAM_TYPE_MAX];
guint media_stream_buffer_min_percent[MM_PLAYER_STREAM_TYPE_MAX];
- mm_player_media_stream_buffer_status_callback media_stream_buffer_status_cb[MM_PLAYER_STREAM_TYPE_MAX];
- mm_player_media_stream_seek_data_callback media_stream_seek_data_cb[MM_PLAYER_STREAM_TYPE_MAX];
- GMutex media_stream_cb_lock;
-
- void *buffer_cb_user_param[MM_PLAYER_STREAM_TYPE_MAX];
- void *seek_cb_user_param[MM_PLAYER_STREAM_TYPE_MAX];
-
- /* video stream changed callback */
- mm_player_stream_changed_callback video_stream_changed_cb;
- void *video_stream_changed_cb_user_param;
/* audio stream changed callback */
mm_player_stream_changed_callback audio_stream_changed_cb;
int _mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int pos);
int _mmplayer_set_playspeed(MMHandleType hplayer, float rate, bool streaming);
int _mmplayer_set_message_callback(MMHandleType hplayer, MMMessageCallback callback, void *user_param);
-int _mmplayer_set_videostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
int _mmplayer_set_audiostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param);
int _mmplayer_set_video_decoded_cb(MMHandleType hplayer, mm_player_video_decoded_callback callback, void *user_param);
int _mmplayer_set_subtitle_silent(MMHandleType hplayer, int silent);
#define MMPLAYER_VIDEO_BO_WAIT_UNTIL(x_player, end_time) g_cond_wait_until(&((mmplayer_t *)x_player)->video_bo_cond, &((mmplayer_t *)x_player)->video_bo_mutex, end_time)
#define MMPLAYER_VIDEO_BO_SIGNAL(x_player) g_cond_signal(&((mmplayer_t *)x_player)->video_bo_cond);
-/* media stream lock */
-#define MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(x_player) g_mutex_lock(&((mmplayer_t *)x_player)->media_stream_cb_lock)
-#define MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(x_player) g_mutex_unlock(&((mmplayer_t *)x_player)->media_stream_cb_lock)
-
/* subtitle info */
#define MMPLAYER_SUBTITLE_INFO_LOCK(x_player) g_mutex_lock(&((mmplayer_t *)x_player)->subtitle_info_mutex)
#define MMPLAYER_SUBTITLE_INFO_UNLOCK(x_player) g_mutex_unlock(&((mmplayer_t *)x_player)->subtitle_info_mutex)
return result;
}
-int mm_player_set_media_stream_buffer_status_callback(MMHandleType player, mmplayer_stream_type_e type, mm_player_media_stream_buffer_status_callback callback, void *user_param)
-{
- int result = MM_ERROR_NONE;
-
- LOGD("\n");
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- MMPLAYER_CMD_LOCK(player);
-
- result = _mmplayer_set_media_stream_buffer_status_cb(player, type, callback, user_param);
-
- MMPLAYER_CMD_UNLOCK(player);
-
- return result;
-}
-
-int mm_player_set_media_stream_seek_data_callback(MMHandleType player, mmplayer_stream_type_e type, mm_player_media_stream_seek_data_callback callback, void *user_param)
-{
- int result = MM_ERROR_NONE;
-
- LOGD("\n");
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- MMPLAYER_CMD_LOCK(player);
-
- result = _mmplayer_set_media_stream_seek_data_cb(player, type, callback, user_param);
-
- MMPLAYER_CMD_UNLOCK(player);
-
- return result;
-}
-
int mm_player_set_audio_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param)
{
int result = MM_ERROR_NONE;
return result;
}
-int mm_player_set_video_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param)
-{
- int result = MM_ERROR_NONE;
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- MMPLAYER_CMD_LOCK(player);
-
- result = _mmplayer_set_videostream_changed_cb(player, callback, user_param);
-
- MMPLAYER_CMD_UNLOCK(player);
-
- return result;
-}
-
int mm_player_get_timeout(MMHandleType player, int *timeout)
{
int result = MM_ERROR_NONE;
return ret;
}
-int
-_mmplayer_set_media_stream_buffer_status_cb(MMHandleType hplayer,
- mmplayer_stream_type_e type,
- mm_player_media_stream_buffer_status_callback callback,
- void *user_param)
-{
- mmplayer_t *player = (mmplayer_t *)hplayer;
-
- MMPLAYER_FENTER();
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(player);
-
- if (player->media_stream_buffer_status_cb[type]) {
- if (!callback)
- LOGD("[type:%s] will be clear", MMPLAYER_STREAM_TYPE_GET_NAME(type));
- else
- LOGD("[type:%s] will be overwritten", MMPLAYER_STREAM_TYPE_GET_NAME(type));
- }
-
- player->media_stream_buffer_status_cb[type] = callback;
- player->buffer_cb_user_param[type] = user_param;
-
- LOGD("player handle %p, type %s, callback %p",
- player, MMPLAYER_STREAM_TYPE_GET_NAME(type), player->media_stream_buffer_status_cb[type]);
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
-
- MMPLAYER_FLEAVE();
-
- return MM_ERROR_NONE;
-}
-
-int
-_mmplayer_set_media_stream_seek_data_cb(MMHandleType hplayer,
- mmplayer_stream_type_e type,
- mm_player_media_stream_seek_data_callback callback,
- void *user_param)
-{
- mmplayer_t *player = (mmplayer_t *)hplayer;
-
- MMPLAYER_FENTER();
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(player);
-
- if (player->media_stream_seek_data_cb[type]) {
- if (!callback)
- LOGD("[type:%s] will be clear", MMPLAYER_STREAM_TYPE_GET_NAME(type));
- else
- LOGD("[type:%s] will be overwritten", MMPLAYER_STREAM_TYPE_GET_NAME(type));
- }
-
- player->media_stream_seek_data_cb[type] = callback;
- player->seek_cb_user_param[type] = user_param;
-
- LOGD("player handle %p, type %s, callback %p",
- player, MMPLAYER_STREAM_TYPE_GET_NAME(type), player->media_stream_seek_data_cb[type]);
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
-
- MMPLAYER_FLEAVE();
-
- return MM_ERROR_NONE;
-}
-
static GstElement *
__mmplayer_get_source_element(mmplayer_t *player, mmplayer_stream_type_e type)
{
MMPLAYER_FENTER();
MMPLAYER_RETURN_VAL_IF_FAIL(player && element, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(((type == MM_PLAYER_STREAM_TYPE_AUDIO) || (type == MM_PLAYER_STREAM_TYPE_VIDEO)), MM_ERROR_INVALID_ARGUMENT);
if (player->media_stream_buffer_max_size[type] > 0)
max_bytes = player->media_stream_buffer_max_size[type];
}
if (MMPLAYER_CURRENT_STATE(player) != MM_PLAYER_STATE_PLAYING) {
- MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(player);
- if (!player->media_stream_buffer_status_cb[type]) {
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
- return MM_ERROR_NONE;
- }
-
current_level_per = (guint)(gst_util_guint64_to_gdouble(current_level_bytes) / gst_util_guint64_to_gdouble(max_bytes) * 100);
LOGD("type: %s, min_per %u, curr_per %u max %"G_GUINT64_FORMAT" cur %"G_GUINT64_FORMAT,
player->media_stream_buffer_max_size[type],
current_level_bytes);
- if (current_level_per < player->media_stream_buffer_min_percent[type])
- player->media_stream_buffer_status_cb[type](type, MM_PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN, current_level_bytes, player->buffer_cb_user_param[type]);
+ if (current_level_per < player->media_stream_buffer_min_percent[type]) {
+ MMMessageParamType msg_param = {0,};
+
+ msg_param.union_type = MM_MSG_UNION_BUFFER_STATUS;
+ msg_param.buffer_status.stream_type = type;
+ msg_param.buffer_status.status = MM_PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN;
+ msg_param.buffer_status.bytes = current_level_bytes;
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
+ MMPLAYER_POST_MSG(player, MM_MESSAGE_PUSH_BUFFER_STATUS, &msg_param);
+ }
}
MMPLAYER_FLEAVE();
LOGD("need to update caps due to codec data is changed");
return TRUE;
-}
\ No newline at end of file
+}
int separtor_len = strlen(seperator);
strncpy(video_width, video_frame_size, (frame_size_len - separtor_len));
- mm_attrs_set_int_by_name(attrs, "content_video_width", atoi(video_width));
+ mm_attrs_set_int_by_name(attrs, MM_PLAYER_VIDEO_WIDTH, atoi(video_width));
seperator++;
- mm_attrs_set_int_by_name(attrs, "content_video_height", atoi(seperator));
+ mm_attrs_set_int_by_name(attrs, MM_PLAYER_VIDEO_HEIGHT, atoi(seperator));
}
}
__mmplayer_gst_appsrc_feed_data(GstElement *element, guint size, gpointer user_data)
{
mmplayer_t *player = (mmplayer_t *)user_data;
- mmplayer_stream_type_e type = MM_PLAYER_STREAM_TYPE_DEFAULT;
+ mmplayer_stream_type_e stream_type = MM_PLAYER_STREAM_TYPE_DEFAULT;
+ MMMessageParamType msg_param = {0,};
guint64 current_level_bytes = 0;
MMPLAYER_RETURN_IF_FAIL(player);
if (g_strrstr(GST_ELEMENT_NAME(element), "audio")) {
- type = MM_PLAYER_STREAM_TYPE_AUDIO;
+ stream_type = MM_PLAYER_STREAM_TYPE_AUDIO;
} else if (g_strrstr(GST_ELEMENT_NAME(element), "video")) {
- type = MM_PLAYER_STREAM_TYPE_VIDEO;
- } else if (g_strrstr(GST_ELEMENT_NAME(element), "subtitle")) {
- type = MM_PLAYER_STREAM_TYPE_TEXT;
+ stream_type = MM_PLAYER_STREAM_TYPE_VIDEO;
} else {
- LOGE("can not enter here");
+ LOGW("invalid feed-data signal from %s", GST_ELEMENT_NAME(element));
return;
}
g_object_get(G_OBJECT(element), "current-level-bytes", ¤t_level_bytes, NULL);
- LOGI("type: %d, level: %"G_GUINT64_FORMAT, type, current_level_bytes);
+ LOGI("stream type: %d, level: %"G_GUINT64_FORMAT, stream_type, current_level_bytes);
+
+ msg_param.union_type = MM_MSG_UNION_BUFFER_STATUS;
+ msg_param.buffer_status.stream_type = stream_type;
+ msg_param.buffer_status.status = MM_PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN;
+ msg_param.buffer_status.bytes = current_level_bytes;
- MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(player);
- if (player->media_stream_buffer_status_cb[type])
- player->media_stream_buffer_status_cb[type](type, MM_PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN, current_level_bytes, player->buffer_cb_user_param[type]);
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
+ MMPLAYER_POST_MSG(player, MM_MESSAGE_PUSH_BUFFER_STATUS, &msg_param);
}
void
__mmplayer_gst_appsrc_enough_data(GstElement *element, gpointer user_data)
{
mmplayer_t *player = (mmplayer_t *)user_data;
- mmplayer_stream_type_e type = MM_PLAYER_STREAM_TYPE_DEFAULT;
+ mmplayer_stream_type_e stream_type = MM_PLAYER_STREAM_TYPE_DEFAULT;
+ MMMessageParamType msg_param = {0,};
guint64 current_level_bytes = 0;
MMPLAYER_RETURN_IF_FAIL(player);
if (g_strrstr(GST_ELEMENT_NAME(element), "audio")) {
- type = MM_PLAYER_STREAM_TYPE_AUDIO;
+ stream_type = MM_PLAYER_STREAM_TYPE_AUDIO;
} else if (g_strrstr(GST_ELEMENT_NAME(element), "video")) {
- type = MM_PLAYER_STREAM_TYPE_VIDEO;
- } else if (g_strrstr(GST_ELEMENT_NAME(element), "subtitle")) {
- type = MM_PLAYER_STREAM_TYPE_TEXT;
+ stream_type = MM_PLAYER_STREAM_TYPE_VIDEO;
} else {
- LOGE("can not enter here");
+ LOGW("invalid enough-data signal from %s", GST_ELEMENT_NAME(element));
return;
}
- LOGI("type: %d, buffer is full", type);
-
g_object_get(G_OBJECT(element), "current-level-bytes", ¤t_level_bytes, NULL);
- MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(player);
+ LOGI("stream type: %d, level: %"G_GUINT64_FORMAT, stream_type, current_level_bytes);
- if (player->media_stream_buffer_status_cb[type])
- player->media_stream_buffer_status_cb[type](type, MM_PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW, current_level_bytes, player->buffer_cb_user_param[type]);
+ msg_param.union_type = MM_MSG_UNION_BUFFER_STATUS;
+ msg_param.buffer_status.stream_type = stream_type;
+ msg_param.buffer_status.status = MM_PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW;
+ msg_param.buffer_status.bytes = current_level_bytes;
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
+ MMPLAYER_POST_MSG(player, MM_MESSAGE_PUSH_BUFFER_STATUS, &msg_param);
}
gboolean
__mmplayer_gst_appsrc_seek_data(GstElement *element, guint64 position, gpointer user_data)
{
mmplayer_t *player = (mmplayer_t *)user_data;
- mmplayer_stream_type_e type = MM_PLAYER_STREAM_TYPE_DEFAULT;
+ mmplayer_stream_type_e stream_type = MM_PLAYER_STREAM_TYPE_DEFAULT;
+ MMMessageParamType msg_param = {0,};
MMPLAYER_RETURN_VAL_IF_FAIL(player, FALSE);
if (g_strrstr(GST_ELEMENT_NAME(element), "audio")) {
- type = MM_PLAYER_STREAM_TYPE_AUDIO;
+ stream_type = MM_PLAYER_STREAM_TYPE_AUDIO;
} else if (g_strrstr(GST_ELEMENT_NAME(element), "video")) {
- type = MM_PLAYER_STREAM_TYPE_VIDEO;
- } else if (g_strrstr(GST_ELEMENT_NAME(element), "subtitle")) {
- type = MM_PLAYER_STREAM_TYPE_TEXT;
+ stream_type = MM_PLAYER_STREAM_TYPE_VIDEO;
} else {
- LOGE("can not enter here");
+ LOGW("invalid seek-data signal from %s", GST_ELEMENT_NAME(element));
return TRUE;
}
- LOGD("type: %d, pos: %"G_GUINT64_FORMAT, type, position);
- MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(player);
+ LOGD("stream type: %d, pos: %"G_GUINT64_FORMAT, stream_type, position);
+
+ msg_param.union_type = MM_MSG_UNION_SEEK_DATA;
+ msg_param.seek_data.stream_type = stream_type;
+ msg_param.seek_data.offset = position;
- if (player->media_stream_seek_data_cb[type])
- player->media_stream_seek_data_cb[type](type, position, player->seek_cb_user_param[type]);
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
+ MMPLAYER_POST_MSG(player, MM_MESSAGE_PUSH_BUFFER_SEEK_DATA, &msg_param);
return TRUE;
}
player->set_mode.video_zc = name[0] == 'S';
_mmplayer_update_content_attrs(player, ATTR_VIDEO);
-
- if (player->video_stream_changed_cb) {
- LOGE("call the video stream changed cb");
- player->video_stream_changed_cb(player->video_stream_changed_cb_user_param);
- }
+ MMPLAYER_POST_MSG(player, MM_MESSAGE_VIDEO_STREAM_CHANGED, NULL);
} else {
LOGW("invalid caps info");
}
g_mutex_init(&player->video_bo_mutex);
g_cond_init(&player->video_bo_cond);
- /* create media stream callback mutex */
- g_mutex_init(&player->media_stream_cb_lock);
-
/* create subtitle info lock and cond */
g_mutex_init(&player->subtitle_info_mutex);
g_cond_init(&player->subtitle_info_cond);
g_mutex_clear(&player->video_bo_mutex);
g_cond_clear(&player->video_bo_cond);
- /* release media stream callback lock */
- g_mutex_clear(&player->media_stream_cb_lock);
-
MMPLAYER_FLEAVE();
return MM_ERROR_NONE;
}
int
-_mmplayer_set_videostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param)
-{
- mmplayer_t *player = (mmplayer_t *)hplayer;
-
- MMPLAYER_FENTER();
-
- MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
-
- player->video_stream_changed_cb = callback;
- player->video_stream_changed_cb_user_param = user_param;
- LOGD("Handle value is %p : %p", player, player->video_stream_changed_cb);
-
- MMPLAYER_FLEAVE();
-
- return MM_ERROR_NONE;
-}
-
-int
_mmplayer_set_audiostream_changed_cb(MMHandleType hplayer, mm_player_stream_changed_callback callback, void *user_param)
{
mmplayer_t *player = (mmplayer_t *)hplayer;
player->audio_decoded_cb_user_param = NULL;
player->audio_extract_opt = MM_PLAYER_AUDIO_EXTRACT_DEFAULT;
- player->video_stream_changed_cb = NULL;
- player->video_stream_changed_cb_user_param = NULL;
-
player->audio_stream_changed_cb = NULL;
player->audio_stream_changed_cb_user_param = NULL;
player->maximum_bitrate[i] = 0;
}
- MMPLAYER_MEDIA_STREAM_CALLBACK_LOCK(player);
-
- /* remove media stream cb(appsrc cb) */
- for (i = 0; i < MM_PLAYER_STREAM_TYPE_MAX; i++) {
- player->media_stream_buffer_status_cb[i] = NULL;
- player->media_stream_seek_data_cb[i] = NULL;
- player->buffer_cb_user_param[i] = NULL;
- player->seek_cb_user_param[i] = NULL;
- }
- MMPLAYER_MEDIA_STREAM_CALLBACK_UNLOCK(player);
-
/* free memory related to audio effect */
MMPLAYER_FREEIF(player->audio_effect_info.custom_ext_level_for_plugin);
p = gst_caps_get_structure(caps_v, 0);
gst_structure_get_int(p, "width", &width);
- mm_attrs_set_int_by_name(attrs, "content_video_width", width);
+ mm_attrs_set_int_by_name(attrs, MM_PLAYER_VIDEO_WIDTH, width);
gst_structure_get_int(p, "height", &height);
- mm_attrs_set_int_by_name(attrs, "content_video_height", height);
+ mm_attrs_set_int_by_name(attrs, MM_PLAYER_VIDEO_HEIGHT, height);
gst_structure_get_fraction(p, "framerate", &tmpNu, &tmpDe);
gst_object_unref(pad);
if (tmpDe > 0) {
- mm_attrs_set_int_by_name(attrs, "content_video_fps", tmpNu / tmpDe);
+ mm_attrs_set_int_by_name(attrs, MM_PLAYER_VIDEO_FPS, tmpNu / tmpDe);
SECURE_LOGD("fps : %d", tmpNu / tmpDe);
}
if (msec_dur > 0) {
bitrate = data_size * 8 * 1000 / msec_dur;
SECURE_LOGD("file size : %"G_GUINT64_FORMAT", video bitrate = %"G_GUINT64_FORMAT, data_size, bitrate);
- mm_attrs_set_int_by_name(attrs, "content_video_bitrate", bitrate);
+ mm_attrs_set_int_by_name(attrs, MM_PLAYER_VIDEO_BITRATE, bitrate);
ret = TRUE;
} else {
if (MMPLAYER_IS_RTSP_STREAMING(player)) {
if (player->total_bitrate) {
- mm_attrs_set_int_by_name(attrs, "content_video_bitrate", player->total_bitrate);
+ mm_attrs_set_int_by_name(attrs, MM_PLAYER_VIDEO_BITRATE, player->total_bitrate);
ret = TRUE;
}
}