Wednesday, February 06, 2008

How can we skip the frame in a Temporal Decoder Filter ?

How can we skip the frame in a Temporal Decoder Filter ?

I developed the Temporal Decoder filter. During Decoding, I am not able to get the temporal decoded data.
My Temporal Decoder filter developed by deriving a CTransformFilter class..

CTransformFilter's Transform() fn, if we are not having decoded data,
then we have to skip the Current Frame.

if we return S_FALSE within Transform() fn. it will skip the current frame.

Example :

HRESULT CTemporalDecoder :: Transform(IMediaSample* pSrc, IMediaSample* pDest)
{
return DecodeBuffer(Src,pDest);
}

HRESULT DecodeBuffer(IMediaSample* pSrc, IMediaSample* pDest)
{
BYTE* pbEncodedData;
pSrc->GetPointer( &pbEncodedData);

if Decode(pbEncodedData ) //doesnt return the DecodedBuffer
{
return S_FALSE; //Skip the Current Frame.
}
}

No comments: