Skip to content

OpenPlayerAtFramePositions

function

Delphi
function OpenPlayerAtFramePositions (StartFrame: LargeInteger; StopFrame: LargeInteger; KeepBounds: Boolean; CloseAndReopenIfAlreadyOpened: Boolean): Boolean;
C++Builder
bool __fastcall OpenPlayerAtFramePositions(LargeInteger StartFrame, LargeInteger StopFrame, bool KeepBounds, bool CloseAndReopenIfAlreadyOpened);
C#
public bool OpenPlayerAtFramePositions(long StartFrame, long StopFrame, bool KeepBounds, bool CloseAndReopenIfAlreadyOpened);
VB.NET
Public Function OpenPlayerAtFramePositions(StartFrame As Long, StopFrame As Long, KeepBounds As Boolean, CloseAndReopenIfAlreadyOpened As Boolean) As Boolean
C++/Qt
BOOL OpenPlayerAtFramePositions (__int64 StartFrame, __int64 StopFrame, BOOL KeepBounds, BOOL CloseAndReopenIfAlreadyOpened);

Opens a video clip that will start and stop playing within the boundaries of the specified start and stop frames.

StartFrame: opens the clip starting from this frame number (0 = from beginning).

StopFrame: stops playing the clip at this frame number (0 = until the end).

KeepBounds:

  • true: when invoking StopPlayer the position returns to the StartFrame location; when the clip is paused, it is not possible to set a position before StartFrame or after StopFrame.

  • false: when invoking StopPlayer the position returns to frame number 1; when the clip is paused, it is possible to set a position before StartFrame or after StopFrame.

CloseAndReopenIfAlreadyOpened:

  • true: if OpenPlayerAtFramePositions is invoked again the clip is reopened.

  • false: if OpenPlayerAtFramePositions is invoked again the start and stop positions are updated to the specified positions.

Notes:

  • when the video clip has already been opened and the CloseAndReopenIfAlreadyOpened parameter is false, invoking this function makes it possible to modify the playing boundaries, without closing/reopening the video clip.

  • to specify only a start frame and let the clip play until the end, set StopFrame = 0.

  • to specify only a stop frame and let the clip play from the beginning, set StartFrame = 0.

  • to reset the normal clip boundaries, set StopFrame = 0 and StartFrame = 0.

E.g. OpenPlayerAtFramePositions (100, 900, true, false) plays the clip between the 100th and the 900th frames.