fixed converting issue when decoding with s/w codec 97/164297/3 accepted/tizen/4.0/unified/20171220.064254 submit/tizen_4.0/20171219.043609
authorSejun Park <sejun79.park@samsung.com>
Mon, 18 Dec 2017 10:41:45 +0000 (19:41 +0900)
committerSejun Park <sejun79.park@samsung.com>
Mon, 18 Dec 2017 23:58:51 +0000 (08:58 +0900)
Change-Id: I4aef71e251b2c583934d79437d94534fe6b1c0f2

src/include/mm_player_internal.h
src/mm_player_capture.c

index 8504d97..d0c33f2 100755 (executable)
@@ -100,6 +100,7 @@ typedef enum {
        MM_PLAYER_COLORSPACE_RGB888,                    /**< RGB888 pixel format */
        MM_PLAYER_COLORSPACE_NV12_TILED,                /**< Customized color format */
        MM_PLAYER_COLORSPACE_NV12,
+       MM_PLAYER_COLORSPACE_BGRx,                              /**< BGRx pixel format */
        MM_PLAYER_COLORSPACE_MAX = 0x7FFFFFFF
 } MMPlayerVideoColorspace;
 
index 7f1e5df..10aabf5 100755 (executable)
@@ -569,19 +569,24 @@ __mmplayer_get_video_frame_from_buffer(mm_player_t* player, GstPad *pad, GstBuff
        if (gst_structure_has_name(structure, "video/x-raw")) {
                /* NV12T */
                const gchar *gst_format = gst_structure_get_string(structure, "format");
-               if (!g_strcmp0(gst_format, "ST12") || !g_strcmp0(gst_format, "SN12") || !g_strcmp0(gst_format, "S420")) {
-                       guint n;
-                       LOGI("captured format is %s\n", gst_format);
 
+               if (!g_strcmp0(gst_format, "ST12"))
+                       player->video_cs = MM_PLAYER_COLORSPACE_NV12_TILED;
+               else if (!g_strcmp0(gst_format, "S420"))
+                       player->video_cs = MM_PLAYER_COLORSPACE_I420;
+               else if (!g_strcmp0(gst_format, "SN12"))
+                       player->video_cs = MM_PLAYER_COLORSPACE_NV12;
+               else if (!g_strcmp0(gst_format, "BGRx"))
+                       player->video_cs = MM_PLAYER_COLORSPACE_BGRx;
+               else
+                       player->video_cs = MM_PLAYER_COLORSPACE_MAX;
+
+               LOGI("captured format is %s\n", gst_format);
+
+               if (!g_strcmp0(gst_format, "ST12") || !g_strcmp0(gst_format, "SN12")
+                       || !g_strcmp0(gst_format, "S420")) {
+                       guint n;
                        MMVideoBuffer *proved = NULL;
-                       if (!g_strcmp0(gst_format, "ST12"))
-                               player->video_cs = MM_PLAYER_COLORSPACE_NV12_TILED;
-                       else if (!g_strcmp0(gst_format, "S420"))
-                               player->video_cs = MM_PLAYER_COLORSPACE_I420;
-                       else if (!g_strcmp0(gst_format, "SN12"))
-                               player->video_cs = MM_PLAYER_COLORSPACE_NV12;
-                       else
-                               player->video_cs = MM_PLAYER_COLORSPACE_MAX;
 
                        /* get video frame info from proved buffer */
                        n = gst_buffer_n_memory(buffer);