Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AVIStreamFindSample function

The AVIStreamFindSample function returns the position of a sample (key frame, nonempty frame, or a frame containing a format change) relative to the specified position.

This function supersedes the obsolete AVIStreamFindKeyFrame function.

Syntax


STDAPI_(LONG) AVIStreamFindSample(
  PAVISTREAM pavi,
  LONG lPos,
  LONG lFlags
);

Parameters

pavi

Handle to an open stream.

lPos

Starting frame for the search.

lFlags

Flags that designate the type of frame to locate, the direction in the stream to search, and the type of return information. The following flags are defined.

Value Meaning
FIND_ANYFinds a nonempty frame. This flag supersedes the SEARCH_ANY flag.
FIND_KEYFinds a key frame. This flag supersedes the SEARCH_KEY flag.
FIND_FORMATFinds a format change.
FIND_NEXTFinds nearest sample, frame, or format change searching forward. The current sample is included in the search. Use this flag with the FIND_ANY, FIND_KEY, or FIND_FORMAT flag. This flag supersedes the SEARCH_FORWARD flag.
FIND_PREVFinds nearest sample, frame, or format change searching backward. The current sample is included in the search. Use this flag with the FIND_ANY, FIND_KEY, or FIND_FORMAT flag. This flag supersedes the SEARCH_NEAREST and SEARCH_BACKWARD flags.
FIND_FROM_STARTFinds first sample, frame, or format change beginning from the start of the stream. Use this flag with the FIND_ANY, FIND_KEY, or FIND_FORMAT flag.

 

Return value

Returns the position of the frame found or -1 if the search is unsuccessful.

Remarks

The FIND_KEY, FIND_ANY, and FIND_FORMAT flags are mutually exclusive, as are the FIND_NEXT and FIND_PREV flags.

The argument pavi contains a pointer to an IAVIStream interface.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Vfw.h

Library

Vfw32.lib

DLL

Avifil32.dll

See also

AVIFile Functions and Macros
AVIFile Functions

 

 

Community Additions

Show:
© 2014 Microsoft