add BGRA8888 capture
authorYounghwan Ahn <younghwan_.an@samsung.com>
Sat, 8 Sep 2012 10:47:40 +0000 (19:47 +0900)
committerYounghwan Ahn <younghwan_.an@samsung.com>
Sat, 8 Sep 2012 11:01:01 +0000 (20:01 +0900)
src/include/mm_player_utils.h
src/mm_player_capture.c

index cf67015..81214bd 100755 (executable)
@@ -46,7 +46,19 @@ if ( x ) \
        g_free( x ); \
 x = NULL;
 
-#define MMPLAYER_CMD_LOCK(x_player)            g_mutex_lock( ((mm_player_t*)x_player)->cmd_lock )
+#define MMPLAYER_CMD_LOCK(x_player) \
+do \
+{ \
+       GMutex* cmd_lock = ((mm_player_t *)x_player)->cmd_lock; \
+       if (cmd_lock) \
+               g_mutex_lock(cmd_lock); \
+       else \
+       { \
+               debug_log("don't get command lock"); \
+               return MM_ERROR_PLAYER_NOT_INITIALIZED; \
+       } \
+} while (0);
+
 #define MMPLAYER_CMD_UNLOCK(x_player)  g_mutex_unlock( ((mm_player_t*)x_player)->cmd_lock )
 
 #define MMPLAYER_MSG_POST_LOCK(x_player)       g_mutex_lock( ((mm_player_t*)x_player)->msg_cb_lock )
index c85972a..68ac43b 100755 (executable)
@@ -437,6 +437,9 @@ __mmplayer_get_video_frame_from_buffer(mm_player_t* player, GstBuffer *buffer)
                        {\r
                                switch(depth)\r
                                {\r
+                                       case 32:\r
+                                               if (bigendian && isbluefirst)\r
+                                                       src_fmt = MM_UTIL_IMG_FMT_BGRA8888;\r
                                        case 24:\r
                                                if (bigendian && isbluefirst)\r
                                                        src_fmt = MM_UTIL_IMG_FMT_BGRX8888;\r