MOGetPreviousIntraFrameNumber

C Specification

#include <mo/Mobiclip.h>

MOResult MOGetPreviousIntraFrameNumber(const MOInstance* pInstance, u32 frame, u32 *pIntraFrameNumber);

Arguments

pInstance Instance of the concerned movie.
frame Frame we want the preceding intra of.
pIntraFrameNumber Will contain the frame number of the preceding intra.

Return Values

MO_RESULT_OK Success.
MO_RESULT_NULL MOInstance pointer is NULL.
MO_RESULT_NOT_OPENED A successfull call to MOOpen function have not been done before, or open process not complete yet.

Description

That function is used to get the frame number of the intra preceding a frame.
It is needed to implement a seek application side. For example, if you want to seek to frame 500,
the call to MOGetPreviousIntraFrameNumber(instance,500,&prevIntra) will return 420 in prevIntra parameter.
You can then call MOGoToIFrame to go to frame 420, and decode/skip all the frames up to the 500 th.

It is better to call that function in the same thread that the one calling MODecode.

In order to use the feature in this function, the VideoIndex parameter of .mcj file (used by MoCoderAvi program) must be set to true in order to add keyframes information.
See MoCoderAvi section in Quick Start Guide for more information.

See Also

MODecode

MOGoToNextIntra

MOGoToPreviousIntra

Revision History

02/24/2010 Updated Description section on the way the intra frame number is returned.

03/26/2009 Parameter renaming done.

07/29/2008 Initial version.