From: Eunhye Choi Date: Mon, 8 Apr 2019 05:54:40 +0000 (+0900) Subject: [0.6.135] fix video info error X-Git-Tag: submit/tizen_5.0/20190408.080132^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93f9979bc762d743b0f548a93e3816fc8786a4d6;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git [0.6.135] fix video info error - Sets the right video stream information considering the plane num. - side issue of 5d1c02ba12f2242370e47e7da8f6a0b5e45f4ccd - this is the same with tizen 5.5 commit I182c8d31a5b34f1b9d8b4cf127aa3066571330df Change-Id: I4d74ccabb14ed627937bef5f32fbbde08e5acec2 --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 21eedee..bfb1b40 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.134 +Version: 0.6.135 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/include/mm_player.h b/src/include/mm_player.h index b941138..949fd91 100644 --- a/src/include/mm_player.h +++ b/src/include/mm_player.h @@ -267,6 +267,7 @@ typedef struct { int stride[BUFFER_MAX_PLANE_NUM]; /**< stride of plane */ int elevation[BUFFER_MAX_PLANE_NUM]; /**< elevation of plane */ int orientation; /**< orientation */ + int plane_num; } MMPlayerVideoStreamDataType; /** diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index fffea77..ef4dbaf 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -3728,6 +3728,7 @@ __mmplayer_video_stream_decoded_render_cb(GstElement* object, GstBuffer *buffer, unsigned int fourcc = 0; unsigned int pitch = 0; int index = 0; + GstVideoInfo info; MMPLAYER_FENTER(); MMPLAYER_RETURN_IF_FAIL(player && player->video_stream_cb); @@ -3760,6 +3761,8 @@ __mmplayer_video_stream_decoded_render_cb(GstElement* object, GstBuffer *buffer, if (string_format) fourcc = _mmplayer_convert_fourcc_string_to_value(string_format); stream->format = util_get_pixtype(fourcc); + gst_video_info_from_caps(&info, caps); + stream->plane_num = GST_VIDEO_INFO_N_PLANES(&info); gst_caps_unref(caps); caps = NULL; @@ -3785,9 +3788,18 @@ __mmplayer_video_stream_decoded_render_cb(GstElement* object, GstBuffer *buffer, if (player->set_mode.video_zc && player->set_mode.media_packet_video_stream && gst_is_tizen_memory(mem)) { + + tbm_bo bo = NULL; for (index = 0; index < gst_tizen_memory_get_num_bos(mem); index++) { + bo = gst_tizen_memory_get_bos(mem, index); + if (bo) + stream->bo[index] = tbm_bo_ref(bo); + else + LOGE("failed to get bo for index %d", index); + } + + for (index = 0; index < stream->plane_num; index++) { tbm_surface_internal_get_plane_data(surface, index, NULL, NULL, &pitch); - stream->bo[index] = tbm_bo_ref(gst_tizen_memory_get_bos(mem, index)); stream->stride[index] = pitch; stream->elevation[index] = stream->height; }