Changeset 3484


Ignore:
Timestamp:
Mar 24, 2011 3:20:05 PM (14 years ago)
Author:
ming
Message:

Re #1213:

  • Move Mac OS' CFRunLoop object from vid_dev_test inside qt
  • Remove NSApplication object management and auto release pool from vid_dev_test. Temporarily depend on SDLmain library for these.
Location:
pjproject/branches/projects/2.0-dev/pjmedia
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/build/Makefile

    r3445 r3484  
    2929                   $(CC_INC)../../pjlib/include \ 
    3030                   $(CC_INC)../../pjlib-util/include \ 
     31                   $(CC_INC)../../pjmedia/include \ 
    3132                   $(CC_INC)../../pjnath/include \ 
    3233                   $(CC_INC)../.. \ 
     
    120121export PJMEDIA_TEST_SRCDIR = ../src/test 
    121122export PJMEDIA_TEST_OBJS += codec_vectors.o jbuf_test.o main.o mips_test.o \ 
    122                             vid_codec_test.o rtp_test.o test.o 
     123                            vid_codec_test.o vid_dev_test.o rtp_test.o test.o 
    123124export PJMEDIA_TEST_OBJS += sdp_neg_test.o  
    124125export PJMEDIA_TEST_CFLAGS += $(_CFLAGS) 
  • pjproject/branches/projects/2.0-dev/pjmedia/build/os-auto.mak.in

    r3395 r3484  
    167167# Mac OS specific, use obj-c 
    168168export PJMEDIA_VIDEODEV_OBJS += sdl_dev_m.o 
    169 export PJMEDIA_TEST_OBJS += vid_dev_test_m.o 
    170169else 
    171170# Other platforms, compile .c 
    172171export PJMEDIA_VIDEODEV_OBJS += sdl_dev.o 
    173 export PJMEDIA_TEST_OBJS += vid_dev_test.o 
    174172endif 
  • pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia_videodev.h

    r3392 r3484  
    2828#include <pjmedia-videodev/videodev_imp.h> 
    2929 
     30#if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 
     31#   if PJMEDIA_VIDEO_DEV_HAS_SDL 
     32#       include <SDL.h> 
     33#endif 
     34#endif 
     35 
    3036#endif  /* __PJMEDIA_VIDEODEV_H__ */ 
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/qt_dev.m

    r3467 r3484  
    549549    } 
    550550     
     551    CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false); 
     552     
    551553    return PJ_SUCCESS; 
    552554} 
  • pjproject/branches/projects/2.0-dev/pjmedia/src/test/main.c

    r2408 r3484  
    1919 */ 
    2020#include "test.h" 
     21#include <pjmedia_videodev.h> 
    2122 
    2223  
  • pjproject/branches/projects/2.0-dev/pjmedia/src/test/vid_dev_test.c

    r3431 r3484  
    2424#include <pjmedia_videodev.h> 
    2525 
    26 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 
    27 #    include "TargetConditionals.h" 
    28 #    if !TARGET_OS_IPHONE 
    29 #       define VID_DEV_TEST_MAC_OS 1 
    30 #    endif 
    31 #endif 
    32  
    33 #if VID_DEV_TEST_MAC_OS 
    34 #   include <Foundation/NSAutoreleasePool.h> 
    35 #   include <AppKit/NSApplication.h> 
    36 #endif 
    37  
    3826#define THIS_FILE "vid_dev_test.c" 
    3927 
     
    144132 
    145133    /* Sleep while the webcam is being displayed... */ 
    146     for (i = 0; i < 15 && (!is_quitting); i++) { 
    147 #if VID_DEV_TEST_MAC_OS 
    148         CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false); 
    149 #endif 
     134    for (i = 0; i < 25 && (!is_quitting); i++) { 
    150135        pj_thread_sleep(100); 
    151136    } 
     
    208193 
    209194    for (i = 0; i < 35 && (!is_quitting); i++) { 
    210 #if VID_DEV_TEST_MAC_OS 
    211         CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false); 
    212 #endif 
    213195        pj_thread_sleep(100); 
    214196    } 
     
    229211    int rc = 0; 
    230212    pj_status_t status; 
    231  
    232 #if VID_DEV_TEST_MAC_OS 
    233     NSAutoreleasePool *apool = [[NSAutoreleasePool alloc] init]; 
    234      
    235     [NSApplication sharedApplication]; 
    236 #endif 
    237213     
    238214    PJ_LOG(3, (THIS_FILE, "Video device tests..")); 
     
    255231    pjmedia_vid_subsys_shutdown(); 
    256232    pj_pool_release(pool); 
    257  
    258 #if VID_DEV_TEST_MAC_OS 
    259     [apool release]; 
    260 #endif 
    261233     
    262234    return rc; 
Note: See TracChangeset for help on using the changeset viewer.