IAVIStream::FindSample

The FindSample method obtains the position in a stream of a key frame or a nonempty frame. Called when an application uses the AVIStreamFindSample function.

LONG FindSample(
  PAVISTREAM ps,  
  LONG lPos,      
  LONG lFlags     
);
 

Parameters

ps
Address of the interface to a stream.
lPos
Position of the sample or frame.
lFlags
Applicable flags. The following values are defined:
FIND_ANY
Searches for a nonempty frame.
FIND_FORMAT
Searches for a format change.
FIND_KEY
Searches for a key frame.
FIND_NEXT
Searches forward through a stream, beginning with the current frame.
FIND_PREV
Searches backward through a stream, beginning with the current frame.

The FIND_ANY, FIND_KEY, and FIND_FORMAT flags are mutually exclusive, as are the FIND_NEXT and FIND_PREV flags. You must specify one value from each group.

Return Values

Returns the location of the key frame corresponding to the frame specified by the application.

Remarks

If key frames are not significant in your custom format, return the position specified for lPos.

For handlers written in C++, FindSample has the following syntax:

LONG FindSample(LONG lPos, LONG lFlags) 
 

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in vfw.h.
  Import Library: Use vfw32.lib.

See Also

Custom File and Stream Handlers Overview, Custom File and Stream Handler Interfaces, AVIStreamFindSample