[Opalvoip-svn] SF.net SVN: opalvoip:[30129] ptlib/branches/v2_12/src/ptlib/msos/directshow .cxx
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2013-07-08 07:48:17
|
Revision: 30129 http://sourceforge.net/p/opalvoip/code/30129 Author: rjongbloed Date: 2013-07-08 07:48:12 +0000 (Mon, 08 Jul 2013) Log Message: ----------- Fixed the setting of the "native flip" flag in DirectShow grabber, it appears to be dependent on the selected colour space. Modified Paths: -------------- ptlib/branches/v2_12/src/ptlib/msos/directshow.cxx Modified: ptlib/branches/v2_12/src/ptlib/msos/directshow.cxx =================================================================== --- ptlib/branches/v2_12/src/ptlib/msos/directshow.cxx 2013-07-08 05:11:04 UTC (rev 30128) +++ ptlib/branches/v2_12/src/ptlib/msos/directshow.cxx 2013-07-08 07:48:12 UTC (rev 30129) @@ -531,6 +531,11 @@ m_selectedGUID = pMediaFormat->subtype; m_maxFrameBytes = CalculateFrameBytes(frameWidth, frameHeight, colourFormat); + if (pVih->bmiHeader.biHeight > 0 && colourFormat.NumCompare("BGR") == EqualTo) { + nativeVerticalFlip = true; + PTRACE(3, "DShow\tImage up side down"); + } + if (running) PCOM_RETURN_ON_FAILED(m_pMediaControl->Run,()); @@ -1531,12 +1536,6 @@ PTRACE(5, "DShow\tChecking image flip"); PCOM_RETURN_ON_FAILED(m_pSampleGrabber->GetConnectedMediaType,(&mt)); - VIDEOINFOHEADER * pvih = (VIDEOINFOHEADER *)mt.pbFormat; - if (pvih->bmiHeader.biHeight > 0) { - nativeVerticalFlip = true; - PTRACE(3, "DShow\tImage up side down"); - } - // Query for camera controls if (FAILED(m_pCaptureFilter->QueryInterface(IID_IAMCameraControl, (void **)&m_pCameraControls))) { PTRACE(3, "DShow\tCamera " << deviceName << " does not support Camera Controls."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |