Index   Commented   Search   About

AVIStreamFindSample

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 supercedes the obsolete AVIStreamFindKeyFrame function.

STDAPI_(LONG) AVIStreamFindSample(

PAVISTREAM pavi,

LONG lPos,

LONG lFlags

);

Parameters

pavi

Handle of 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:

FIND_ANY

Finds a nonempty frame. This flag supercedes the SEARCH_ANY flag.

FIND_KEY

Finds a key frame. This flag supercedes the SEARCH_KEY flag.

FIND_FORMAT

Finds a format change.

FIND_NEXT

Finds 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 supercedes the SEARCH_FORWARD flag.

FIND_PREV

Finds 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 supercedes the SEARCH_NEAREST and SEARCH_BACKWARD flags.

FIND_FROM_START

Finds 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 Values

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.

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun