result = mm_attrs_get_valist(attrs, err_attr_name, attribute_name, args_list);
if (result != MM_ERROR_NONE)
- LOGE("failed to get %s attribute\n", attribute_name);
+ LOGE("failed to get %s attribute", attribute_name);
return result;
}
result = mm_attrs_set_valist(attrs, err_attr_name, attribute_name, args_list);
if (result != MM_ERROR_NONE) {
- LOGE("failed to set %s attribute\n", attribute_name);
+ LOGE("failed to set %s attribute", attribute_name);
return result;
}
result = __mmplayer_apply_attribute(handle, attribute_name);
if (result != MM_ERROR_NONE) {
- LOGE("failed to apply attributes\n");
+ LOGE("failed to apply attributes");
return result;
}
result = mm_attrs_get_info_by_name(attrs, attribute_name, &src_info);
if (result != MM_ERROR_NONE) {
- LOGE("failed to get attribute info\n");
+ LOGE("failed to get attribute info");
return result;
}
int
__mmplayer_apply_attribute(MMHandleType handle, const char *attribute_name)
{
- mm_player_t* player = 0;
+ mm_player_t *player = 0;
MMPLAYER_RETURN_VAL_IF_FAIL(handle, MM_ERROR_COMMON_INVALID_ARGUMENT);
MMPLAYER_RETURN_VAL_IF_FAIL(attribute_name, MM_ERROR_COMMON_INVALID_ARGUMENT);
param_name[str_len] = '\0';
LOGD(" param_name: %s", param_name);
if (MM_ERROR_NONE != _mmplayer_update_video_param(player, param_name)) {
- g_free(param_name);
+ MMPLAYER_FREEIF(param_name);
LOGE("failed to update video param");
return MM_ERROR_PLAYER_INTERNAL;
}
- g_free(param_name);
+ MMPLAYER_FREEIF(param_name);
}
if (g_strrstr(attribute_name, MM_PLAYER_GAPLESS_MODE)) {
int gapless = 0;
mm_attrs_get_int_by_name(player->attrs, "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);
"profile_uri", // name
MM_ATTRS_TYPE_STRING, // type
MM_ATTRS_FLAG_RW, // flag
- (void *) NULL, // default value
+ (void *)NULL, // default value
MM_ATTRS_VALID_TYPE_NONE, // validity type
0, // validity min value
0 // validity max value
"profile_user_param",
MM_ATTRS_TYPE_DATA,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"profile_play_count",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 1, /* -1 : repeat continually */
+ (void *)1, /* -1 : repeat continually */
MM_ATTRS_VALID_TYPE_INT_RANGE,
-1,
1
"profile_prepare_async",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
1
"streaming_user_agent",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"streaming_cookie",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"subtitle_uri",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"content_bitrate",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_max_bitrate",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_video_found",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
1
"content_video_codec",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"content_video_bitrate",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_video_fps",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_video_width",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_video_height",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_audio_codec",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"content_audio_bitrate",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_audio_channels",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_audio_samplerate",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"content_text_track_num",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"current_text_track_index",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) -1,
+ (void *)-1,
MM_ATTRS_VALID_TYPE_INT_RANGE,
-1,
MMPLAYER_MAX_INT
"tag_artist",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"tag_title",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"tag_album",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL
+ (void *)NULL
},
{
"tag_genre",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"tag_author",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"tag_copyright",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"tag_date",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"tag_description",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"tag_track_num",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"tag_album_cover",
MM_ATTRS_TYPE_DATA,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"display_rotation",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) MM_DISPLAY_ROTATION_NONE,
+ (void *)MM_DISPLAY_ROTATION_NONE,
MM_ATTRS_VALID_TYPE_INT_RANGE,
MM_DISPLAY_ROTATION_NONE,
MM_DISPLAY_ROTATION_270
"display_visible",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) FALSE,
+ (void *)FALSE,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
1
"display_method",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) MM_DISPLAY_METHOD_LETTER_BOX,
+ (void *)MM_DISPLAY_METHOD_LETTER_BOX,
MM_ATTRS_VALID_TYPE_INT_RANGE,
MM_DISPLAY_METHOD_LETTER_BOX,
MM_DISPLAY_METHOD_CUSTOM_ROI
"display_overlay",
MM_ATTRS_TYPE_DATA,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"display_win_roi_x",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
MMPLAYER_MIN_INT,
MMPLAYER_MAX_INT
"display_win_roi_y",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
MMPLAYER_MIN_INT,
MMPLAYER_MAX_INT
"display_win_roi_width",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"display_win_roi_height",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"display_surface_type",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) MM_DISPLAY_SURFACE_NULL,
+ (void *)MM_DISPLAY_SURFACE_NULL,
MM_ATTRS_VALID_TYPE_INT_RANGE,
MM_DISPLAY_SURFACE_OVERLAY,
MM_DISPLAY_SURFACE_NUM - 1
"sound_stream_type",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"sound_latency_mode",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 1, // 0: low latency, 1: middle latency 2: high latency
+ (void *)1, // 0: low latency, 1: middle latency 2: high latency
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
2
"pcm_extraction_samplerate", // set samplerate for pcm extraction
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 44100, // hz
+ (void *)44100, // hz
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"pcm_extraction_channels", // set channels for pcm extraction
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 1,
+ (void *)1,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
MMPLAYER_MAX_INT
"accurate_seek",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) 0,
+ (void *)0,
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
1
"content_video_orientation", // orientation of video content
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"pcm_audioformat",
MM_ATTRS_TYPE_STRING,
MM_ATTRS_FLAG_RW,
- (void *) NULL,
+ (void *)NULL,
MM_ATTRS_VALID_TYPE_NONE,
0,
0
"drc_mode",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) FALSE,
+ (void *)FALSE,
MM_ATTRS_VALID_TYPE_INT_RANGE,
FALSE,
TRUE
"gapless_mode",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) FALSE,
+ (void *)FALSE,
MM_ATTRS_VALID_TYPE_INT_RANGE,
FALSE,
TRUE
"enable_video_decoded_cb",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) FALSE,
+ (void *)FALSE,
MM_ATTRS_VALID_TYPE_INT_RANGE,
FALSE,
TRUE
"content_video_is_spherical",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) -1,
+ (void *)-1,
MM_ATTRS_VALID_TYPE_INT_RANGE,
-1,
MMPLAYER_MAX_INT
"video_codec_type",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) MM_PLAYER_CODEC_TYPE_DEFAULT,
+ (void *)MM_PLAYER_CODEC_TYPE_DEFAULT,
MM_ATTRS_VALID_TYPE_INT_RANGE,
MM_PLAYER_CODEC_TYPE_DEFAULT,
MM_PLAYER_CODEC_TYPE_SW
"audio_codec_type",
MM_ATTRS_TYPE_INT,
MM_ATTRS_FLAG_RW,
- (void *) MM_PLAYER_CODEC_TYPE_DEFAULT,
+ (void *)MM_PLAYER_CODEC_TYPE_DEFAULT,
MM_ATTRS_VALID_TYPE_INT_RANGE,
MM_PLAYER_CODEC_TYPE_DEFAULT,
MM_PLAYER_CODEC_TYPE_SW
/* commit */
if (mm_attrs_commit_all(attrs)) {
- LOGE("failed to update attributes\n");
+ LOGE("failed to update attributes");
mm_attrs_free(attrs);
return 0;
}