Index: /pjproject/branches/projects/2.0-dev/pjmedia/build/Makefile
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/build/Makefile	(revision 3483)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/build/Makefile	(revision 3484)
@@ -29,4 +29,5 @@
 		   $(CC_INC)../../pjlib/include \
 		   $(CC_INC)../../pjlib-util/include \
+		   $(CC_INC)../../pjmedia/include \
 		   $(CC_INC)../../pjnath/include \
 		   $(CC_INC)../.. \
@@ -120,5 +121,5 @@
 export PJMEDIA_TEST_SRCDIR = ../src/test
 export PJMEDIA_TEST_OBJS += codec_vectors.o jbuf_test.o main.o mips_test.o \
-			    vid_codec_test.o rtp_test.o test.o
+			    vid_codec_test.o vid_dev_test.o rtp_test.o test.o
 export PJMEDIA_TEST_OBJS += sdp_neg_test.o 
 export PJMEDIA_TEST_CFLAGS += $(_CFLAGS)
Index: /pjproject/branches/projects/2.0-dev/pjmedia/build/os-auto.mak.in
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/build/os-auto.mak.in	(revision 3483)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/build/os-auto.mak.in	(revision 3484)
@@ -167,8 +167,6 @@
 # Mac OS specific, use obj-c
 export PJMEDIA_VIDEODEV_OBJS += sdl_dev_m.o
-export PJMEDIA_TEST_OBJS += vid_dev_test_m.o
 else
 # Other platforms, compile .c
 export PJMEDIA_VIDEODEV_OBJS += sdl_dev.o
-export PJMEDIA_TEST_OBJS += vid_dev_test.o
 endif
Index: /pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia_videodev.h
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia_videodev.h	(revision 3483)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia_videodev.h	(revision 3484)
@@ -28,3 +28,9 @@
 #include <pjmedia-videodev/videodev_imp.h>
 
+#if defined(PJ_DARWINOS) && PJ_DARWINOS!=0
+#   if PJMEDIA_VIDEO_DEV_HAS_SDL
+#	include <SDL.h>
+#endif
+#endif
+
 #endif	/* __PJMEDIA_VIDEODEV_H__ */
Index: /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/qt_dev.m
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/qt_dev.m	(revision 3483)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/qt_dev.m	(revision 3484)
@@ -549,4 +549,6 @@
     }
     
+    CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
+    
     return PJ_SUCCESS;
 }
Index: /pjproject/branches/projects/2.0-dev/pjmedia/src/test/main.c
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/src/test/main.c	(revision 3483)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/src/test/main.c	(revision 3484)
@@ -19,4 +19,5 @@
  */
 #include "test.h"
+#include <pjmedia_videodev.h>
 
  
Index: /pjproject/branches/projects/2.0-dev/pjmedia/src/test/vid_dev_test.c
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/src/test/vid_dev_test.c	(revision 3483)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/src/test/vid_dev_test.c	(revision 3484)
@@ -24,16 +24,4 @@
 #include <pjmedia_videodev.h>
 
-#if defined(PJ_DARWINOS) && PJ_DARWINOS!=0
-#    include "TargetConditionals.h"
-#    if !TARGET_OS_IPHONE
-#	define VID_DEV_TEST_MAC_OS 1
-#    endif
-#endif
-
-#if VID_DEV_TEST_MAC_OS
-#   include <Foundation/NSAutoreleasePool.h>
-#   include <AppKit/NSApplication.h>
-#endif
-
 #define THIS_FILE "vid_dev_test.c"
 
@@ -144,8 +132,5 @@
 
     /* Sleep while the webcam is being displayed... */
-    for (i = 0; i < 15 && (!is_quitting); i++) {
-#if VID_DEV_TEST_MAC_OS
-        CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
-#endif
+    for (i = 0; i < 25 && (!is_quitting); i++) {
         pj_thread_sleep(100);
     }
@@ -208,7 +193,4 @@
 
     for (i = 0; i < 35 && (!is_quitting); i++) {
-#if VID_DEV_TEST_MAC_OS
-        CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
-#endif
         pj_thread_sleep(100);
     }
@@ -229,10 +211,4 @@
     int rc = 0;
     pj_status_t status;
-
-#if VID_DEV_TEST_MAC_OS
-    NSAutoreleasePool *apool = [[NSAutoreleasePool alloc] init];
-    
-    [NSApplication sharedApplication];
-#endif
     
     PJ_LOG(3, (THIS_FILE, "Video device tests.."));
@@ -255,8 +231,4 @@
     pjmedia_vid_subsys_shutdown();
     pj_pool_release(pool);
-
-#if VID_DEV_TEST_MAC_OS
-    [apool release];
-#endif
     
     return rc;
Index: project/branches/projects/2.0-dev/pjmedia/src/test/vid_dev_test_m.m
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/src/test/vid_dev_test_m.m	(revision 3483)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/* $Id$ */
-/*
- * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
- * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include "vid_dev_test.c"
