Changeset 4680

Show
Ignore:
Timestamp:
03/07/10 07:16:05 (4 years ago)
Author:
douglask
Message:

For DirectShow? devices that can't capture < 480i, allow them to capture up to 1920x1080. Kludge to filter out webcams that can capture at 1920x1080 but at low frame rates like 1.5fps.

Location:
vic/branches/mpeg4/video
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/mpeg4/video/grabber-win32DS.cpp

    r4651 r4680  
    818818//-------------------------------- 
    819819 
    820 int DirectShowGrabber::getCaptureCapabilities() { 
     820int DirectShowGrabber::getCaptureCapabilities(int preferred_max_width) { 
    821821   IAMStreamConfig          *pConfig; 
    822822   AM_MEDIA_TYPE            *pmtConfig; 
    823823   int                      iCount; 
    824824   int                      iSize; 
    825    int                      preferred_max_width; 
    826825   VIDEO_STREAM_CONFIG_CAPS scc; 
    827826   HRESULT                  hr; 
     
    835834   } 
    836835 
    837    preferred_max_width = 1024; 
    838836   max_width_ = 0; 
    839837   max_height_ = 0; 
     
    891889   } 
    892890   pConfig->Release(); 
     891 
     892   if (min_height_>=NTSC_BASE_HEIGHT && preferred_max_width != 1920) 
     893       getCaptureCapabilities(1920); 
     894 
    893895   if (max_width_>0) 
    894896       return TRUE; 
  • vic/branches/mpeg4/video/grabber-win32DS.h

    r4475 r4680  
    138138      virtual int  grab(); 
    139139      void         setport(const char *port); 
    140       int          getCaptureCapabilities(); 
     140      int          getCaptureCapabilities(int preferred_max_width=1024); 
    141141      virtual void setCaptureOutputFormat(); 
    142142