Ignore:
Timestamp:
Mar 24, 2011 3:20:05 PM (11 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.