add video resolution info when media packet is pushed 64/60264/1 accepted/tizen/ivi/20160225.081915 accepted/tizen/mobile/20160225.081822 accepted/tizen/tv/20160225.081833 accepted/tizen/wearable/20160225.081848 submit/tizen/20160224.124741
authorEunhae Choi <eunhae1.choi@samsung.com>
Wed, 24 Feb 2016 12:39:32 +0000 (21:39 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Wed, 24 Feb 2016 12:39:32 +0000 (21:39 +0900)
Change-Id: Idf6e038934113cab8cb85f31063080db3b4a1f7b

muse/include/muse_player_msg.h
muse/src/muse_player_msg_dispatcher.c

index fcab1b5..9b48157 100644 (file)
@@ -43,6 +43,8 @@ typedef struct _player_push_media_msg_type{
        push_media_buf_type_e buf_type;
        uint64_t size;
        uint64_t pts;
+       int width;
+       int height;
        media_format_mimetype_e mimetype;
        media_buffer_flags_e flags;
        tbm_key key;
index 2a3e48a..e5f6d1a 100644 (file)
@@ -1627,6 +1627,8 @@ static int _push_media_stream(intptr_t handle, player_push_media_msg_type *push_
        media_format_h format;
        media_packet_h packet;
        media_format_mimetype_e mimetype;
+       int width = 0;
+       int height = 0;
 
        if (push_media->mimetype & MEDIA_FORMAT_VIDEO) {
                if (!video_format) {
@@ -1636,12 +1638,16 @@ static int _push_media_stream(intptr_t handle, player_push_media_msg_type *push_
                                return PLAYER_ERROR_INVALID_PARAMETER;
                        }
                        ret |= media_format_set_video_mime(video_format, push_media->mimetype);
+                       ret |= media_format_set_video_width(video_format, push_media->width);
+                       ret |= media_format_set_video_height(video_format, push_media->height);
                }
-               ret |= media_format_get_video_info(video_format, &mimetype, NULL, NULL, NULL, NULL);
+               ret |= media_format_get_video_info(video_format, &mimetype, &width, &height, NULL, NULL);
                if (mimetype != push_media->mimetype) {
                        media_format_unref(video_format);
                        media_format_create(&video_format);
                        ret |= media_format_set_video_mime(video_format, push_media->mimetype);
+                       ret |= media_format_set_video_width(video_format, push_media->width);
+                       ret |= media_format_set_video_height(video_format, push_media->height);
                }
                format = video_format;
        } else if (push_media->mimetype & MEDIA_FORMAT_AUDIO) {