IAMDroppedFrames Interface
Top  Previous  Next

Description

Provides information about frames that the filter dropped (that is, did not send), the frame rate achieved, and the data rate achieved.
.

Methods

HRESULT GetNumDropped(long *plDropped
)
Retrieves the total number of frames that the pin dropped since it last started streaming.  
 
HRESULT GetNumNotDropped( long
*plNotDropped )
Retrieves the total number of frames that the pin delivered downstream (did not drop).  
 
HRESULT GetAverageFrameSize( long
*plAverageSize )
Retrieves the average size of frames that the pin dropped.  
 

Parameters

plDropped  
[out] Pointer to the total number of dropped frames.  
plNotDropped  
[out] Pointer to the total number of frames that were not dropped  
plAverageSize  
[out, retval] Pointer to the average size of frames sent out by the pin since the pin started streaming, in bytes.  
 
 
Return Values

S_OK  
Success  
E_FAIL  
Failure.  
E_INVALIDARG  
Invalid argument.  
 

Example


This C++ code request a pointer to IAMDroppedFrame interface from the video capture pin and retrieves the number of dropped and non-dropped frames:

IAMDroppedFrames *pDroppedFrames;
HRESULT hr;
long nDropped, nNonDropped;
hr = pBuilder->FindInterface(&PIN_CATEGORY_CAPTURE,
            &MEDIATYPE_Video, pFilter,
            IID_IAMDroppedFrames, (void **)&pDroppedFrames);
if(hr)
{
pDroppedFrames->GetNumDropped(&nDropped);
pDroppedFrames->GetNumNotDropped(&nNotDropped);
}
 
Remarks

IAMDroppedFrames is a standard DirectShow interface. Refer to Microsoft DirectX SDK documentation for more details.