libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
libZPlayCpp::zplay_Seek Function

Seek position.

C++
__stdcall __declspec(dllimport) int zplay_Seek(ZPLAY_HANDLE handle, TTimeFormat fFormat, TStreamTime * pTime, TSeekMethod nMoveMethod);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay
TTimeFormat fFormat 
Time format of pTime parameter. With this parameter you need to specify which member of TStreamTime is valid. 
TStreamTime * pTime 
Pointer to TStreamTime structure specifying new position. 
TSeekMethod nMoveMethod 
Return Values 
Description 
All OK. 
Error. To get error message read here

Warning: This function will fail on dynamic stream

Note: Accuracy of seek position depends on interface settings. See accurate seek

Jump 50 seconds from beginning. 

ZPlay C++ Class interface  

TStreamTime pTime;
pTime.sec = 50; // we are using sec member of TStreamTime structure so we need tfSecond time format.
instance->Seek(tfSecond, &pTime, smFromBeginning);

 

C Style interface

TStreamTime pTime;
pTime.sec = 50; // we are using sec member of TStreamTime structure so we need tfSecond time format.
zplay_Seek(instance, tfSecond, &pTime, smFromBeginning);

Jump 5 seconds forward from current position 

ZPlay C++ Class interface  

TStreamTime pTime;
pTime.sec = 5; // we are using sec member of TStreamTime structure so we need tfSecond time format.
instance->Seek(tfSecond, &pTime, smFromCurrentForward);

 

C Style interface

TStreamTime pTime;
pTime.sec = 5; // we are using sec member of TStreamTime structure so we need tfSecond time format.
zplay_Seek(instance, tfSecond, &pTime, smFromCurrentForward);
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr