|
用directshow做手机camera研发时出现的问题.
[复制链接]
用directshow做手机camera研发时出现的问题.
HRESULT CamTransform::Transform(IMediaSample *pIn, IMediaSample *pOut)
{
BYTE* pOutBuffer;
BYTE* pInBuffer;
LONG size = 2;
REFERENCE_TIME rtStart, rtStop;
int i;
HRESULT hr;
pIn->GetTime(&rtStart, &rtStop);
size = pIn->GetActualDataLength();
pOut->GetPointer(&pOutBuffer);
pIn->GetPointer(&pInBuffer);
memcpy( pOutBuffer, pInBuffer,m_height*m_width*2 );
if ( m_callback )
m_callback( pInBuffer, m_width,m_height , 16 );
MergeTextAndPolyLine( pOutBuffer, m_width,m_height ); //! temp
pOut->SetActualDataLength( size );
pOut->SetTime(&rtStart, &rtStop);
pOut->SetSyncPoint(TRUE);
return S_OK;
} // Transform
自己写了一个Transform方法,pOutBuffer是正常的图像,为什么显示出来的图像不正常呢?SUBTYPE用了RGB565,是不是该手机不支持RGB565的原因?
|
|