IAVIStream::FindSample method (vfw.h)

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.

Syntax

LONG FindSample(
  LONG lPos,
  LONG lFlags
);

Parameters

lPos

Position of the sample or frame.

lFlags

Applicable flags. The following values are defined.

Value Description
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 value

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) 
 

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header vfw.h
Library Vfw32.lib

See also

Custom File and Stream Handler Interfaces

Custom File and Stream Handlers