/* convert orientation degree into enum here */
switch (orientation) {
- case 0:
- rot_enum = MM_UTIL_ROTATE_0;
- break;
case 90:
rot_enum = MM_UTIL_ROTATE_90;
break;
temp1 = left&0x3F;
if (temp3 > 192) {
memcpy(yuv420_dest+linear_offset, nv12t_src+tiled_offset+temp1, 64-temp1);
- temp2 = ((left+63)>>6)<<6;
- temp3 = ((yuv420_width-right)>>6)<<6;
- if (temp2 == temp3)
- temp2 = yuv420_width-right-(64-temp1);
memcpy(yuv420_dest+linear_offset+64-temp1, nv12t_src+tiled_offset+2048, 64);
memcpy(yuv420_dest+linear_offset+128-temp1, nv12t_src+tiled_offset1, 64);
memcpy(yuv420_dest+linear_offset+192-temp1, nv12t_src+tiled_offset1+2048, 64);
mm_attrs_set_string_by_name(player->attrs, "content_audio_codec", audio_codec);
MMPLAYER_FREEIF(audio_codec);
- mmf_attrs_commit(player->attrs);
+ if (mmf_attrs_commit(player->attrs))
+ LOGE("failed to update attributes\n");
+
LOGD("set audio codec type with caps\n");
}
player->subtitle_language_list = (GList *)g_value_get_pointer(lang_list);
mm_attrs_set_int_by_name(attrs, "content_text_track_num", (gint)count);
if (mmf_attrs_commit(attrs))
- LOGE("failed to commit.\n");
+ LOGE("failed to commit.\n");
LOGD("Total subtitle tracks = %d \n", count);
}
while (count) {
} while (0)
#define MMPLAYER_UPDATE_TAG_UINT(gsttag, attribute, playertag) \
-if (gst_tag_list_get_uint(tag_list, gsttag, &v_uint)) {\
- if (v_uint) {\
- if (!strncmp(gsttag, GST_TAG_BITRATE, strlen(GST_TAG_BITRATE))) {\
+if (gst_tag_list_get_uint(tag_list, gsttag, &v_uint)) { \
+ if (v_uint) { \
+ if (!strncmp(gsttag, GST_TAG_BITRATE, strlen(GST_TAG_BITRATE))) { \
if (player->updated_bitrate_count == 0) \
mm_attrs_set_int_by_name(attribute, "content_audio_bitrate", v_uint); \
- if (player->updated_bitrate_count < MM_PLAYER_STREAM_COUNT_MAX) {\
+ if (player->updated_bitrate_count < MM_PLAYER_STREAM_COUNT_MAX) { \
player->bitrate[player->updated_bitrate_count] = v_uint;\
player->total_bitrate += player->bitrate[player->updated_bitrate_count]; \
player->updated_bitrate_count++; \
mm_attrs_set_int_by_name(attribute, playertag, player->total_bitrate);\
SECURE_LOGD("update bitrate %d[bps] of stream #%d.\n", v_uint, player->updated_bitrate_count);\
} \
- } \
- else if (!strncmp(gsttag, GST_TAG_MAXIMUM_BITRATE, strlen(GST_TAG_MAXIMUM_BITRATE))) {\
+ } else if (!strncmp(gsttag, GST_TAG_MAXIMUM_BITRATE, strlen(GST_TAG_MAXIMUM_BITRATE))) {\
if (player->updated_maximum_bitrate_count < MM_PLAYER_STREAM_COUNT_MAX) {\
player->maximum_bitrate[player->updated_maximum_bitrate_count] = v_uint;\
player->total_maximum_bitrate += player->maximum_bitrate[player->updated_maximum_bitrate_count]; \
mm_attrs_set_int_by_name(attribute, playertag, player->total_maximum_bitrate); \
SECURE_LOGD("update maximum bitrate %d[bps] of stream #%d\n", v_uint, player->updated_maximum_bitrate_count);\
} \
- } else\
+ } else { \
mm_attrs_set_int_by_name(attribute, playertag, v_uint); \
+ } \
v_uint = 0;\
} \
}
player->play_count--;
mm_attrs_set_int_by_name(attrs, "profile_play_count", player->play_count);
- mmf_attrs_commit(attrs);
+ if (mmf_attrs_commit(attrs))
+ LOGE("failed to update attributes\n");
} else {
LOGE("seeking to 0 failed in repeat play");
}
/* Note : Textbin is not linked to the video or audio bin.
* It needs to send the event to the text sink seperatelly.
*/
- if (player->play_subtitle) {
+ if (player->play_subtitle && player->pipeline) {
GstElement *text_sink = GST_ELEMENT_CAST(player->pipeline->textbin[MMPLAYER_T_FAKE_SINK].gst);
if (GST_IS_ELEMENT(text_sink)) {