Changeset 3804

Show
Ignore:
Timestamp:
09/05/06 18:56:11 (8 years ago)
Author:
piers
Message:

changed printf's to debug_msg's.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vic/trunk/video/grabber-win32.cpp

    r3701 r3804  
    621621    WaitForSingleObject(cb_mutex_,INFINITE); 
    622622 
    623         if ((capwin_ = capCreateCaptureWindow((LPSTR)"Capture Window", WS_POPUP | WS_CAPTION, CW_USEDEFAULT, CW_USEDEFAULT, (basewidth_ / decimate_ + GetSystemMetrics(SM_CXFIXEDFRAME)), (baseheight_ / decimate_ + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYFIXEDFRAME)), (HWND) 0, (int) 0)) == NULL) { 
    624                 fprintf(stderr, "capCreateCaptureWindow: failed - %lu\n", capwin_); 
    625                 abort(); 
     623        if ((capwin_ = capCreateCaptureWindow((LPSTR)"Capture Window", WS_POPUP | WS_CAPTION, 
     624                CW_USEDEFAULT, CW_USEDEFAULT, (basewidth_ / decimate_ + GetSystemMetrics(SM_CXFIXEDFRAME)),  
     625                (baseheight_ / decimate_ + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYFIXEDFRAME)),  
     626                (HWND) 0, (int) 0)) == NULL) { 
     627                  debug_msg("capCreateCaptureWindow: failed - %lu\n", capwin_); 
     628                  abort(); 
    626629        } 
    627630        capSetCallbackOnError(capwin_, ErrorHandler); 
    628631        if (!capSetCallbackOnVideoStream(capwin_, VideoHandler)) { 
    629                 fprintf(stderr, "capSetCallbackOnVideoStream: failed - %lu\n", GetLastError()); 
     632                debug_msg("capSetCallbackOnVideoStream: failed - %lu\n", GetLastError()); 
    630633                /*abort();*/ 
    631634        } 
    632635        if (!capDriverConnect(capwin_, dev_)) { 
    633                 fprintf(stderr, "capDriverConnect: dev=%d failed - %lu\n", dev_, GetLastError()); 
     636                debug_msg( "capDriverConnect: dev=%d failed - %lu\n", dev_, GetLastError()); 
    634637                /*abort();*/ 
    635638        } 
     
    646649 
    647650        if (!capDriverGetCaps(capwin_, &caps_, sizeof(caps_))) { 
    648                 fprintf(stderr, "capGetDriverCaps: failed - %lu\n", GetLastError()); 
     651                debug_msg( "capGetDriverCaps: failed - %lu\n", GetLastError()); 
    649652                /*abort();*/ 
    650653        } 
     
    658661        fmt_ = (LPBITMAPINFOHEADER)new u_char[fmtsize_]; 
    659662        if (!capGetVideoFormat(capwin_, fmt_, fmtsize_)) { 
    660                 fprintf(stderr, "capGetVideoFormat: failed - %lu\n", 
    661                         GetLastError()); 
     663                debug_msg("capGetVideoFormat: failed - %lu\n", GetLastError()); 
    662664                /*abort();*/ 
    663665        }