ADTF
cScriptPlayerClient

Interface client for adtf::services::ant::IPlayer. More...

Inheritance diagram for cScriptPlayerClient:
[legend]

Public Member Functions

Q_INVOKABLE void open (const QString &strFileNames, bool bLoadReferencedFiles)
 Opens one or more adtfdat files. More...
 
Q_INVOKABLE void close ()
 Closes the current loaded files. More...
 
Q_INVOKABLE void play ()
 Control interface to start streaming. More...
 
Q_INVOKABLE void pause ()
 Control interface to pause streaming. More...
 
Q_INVOKABLE void reset ()
 Control interface to Reset the streaming. More...
 
Q_INVOKABLE QVariantList getTimeRange ()
 
Q_INVOKABLE qint64 getCurrentTime ()
 Information interface to get the current time position of the current opened files. More...
 
Q_INVOKABLE void seekToTime (qint64 tmTime)
 Control interface to seek to the given (Chunk) Time. More...
 

Detailed Description

Interface client for adtf::services::ant::IPlayer.

Example Usage

var player = filter.createInterfaceClient("player_control", "player")
var input = filter.createInputPin("input")
var sampleCounter = 0
input.sample.connect(function(sample)
{
if (++sampleCounter % 10 == 0)
{
player.pause()
}
})

Definition at line 113 of file interface_clients.h.

Member Function Documentation

◆ close()

Q_INVOKABLE void close ( )
inline

Closes the current loaded files.

The playback of a recently opened adtfdat file will be stopped and closed. Also if error occures the new state is closed.

Return values
ERR_NOERRORFiles successfully closed - State is now tState::Closed.

Definition at line 137 of file interface_clients.h.

◆ getCurrentTime()

Q_INVOKABLE qint64 getCurrentTime ( )
inline

Information interface to get the current time position of the current opened files.

Returns
The time between GetTimeRange
Return values
<0No files are opend
See also
GetTimeRange

Definition at line 185 of file interface_clients.h.

◆ getTimeRange()

Q_INVOKABLE QVariantList getTimeRange ( )
inline
Returns
Returns the first and last timestamp of the currently opened files.

Definition at line 169 of file interface_clients.h.

References THROW_IF_FAILED.

◆ open()

Q_INVOKABLE void open ( const QString &  strFileNames,
bool  bLoadReferencedFiles 
)
inline

Opens one or more adtfdat files.

Remarks
The playback of a recently opened adtfdat file will be stopped and closed before a new file is opened. If the open fails the recently the state was changed to close!
Parameters
strFileNames[in] List of Files to open at once. (comma separated list)
bLoadReferencedFiles[in] open files which are added to the file extension "referenced_files".
Return values
ERR_NOERRORFiles successfully opend - State is now tState::Opened.

Definition at line 129 of file interface_clients.h.

◆ pause()

Q_INVOKABLE void pause ( )
inline

Control interface to pause streaming.

Returns
Standard Result Code

Definition at line 153 of file interface_clients.h.

◆ play()

Q_INVOKABLE void play ( )
inline

Control interface to start streaming.

Returns
Standard Result Code

Definition at line 145 of file interface_clients.h.

◆ reset()

Q_INVOKABLE void reset ( )
inline

Control interface to Reset the streaming.

Returns
Standard Result Code

Definition at line 161 of file interface_clients.h.

◆ seekToTime()

Q_INVOKABLE void seekToTime ( qint64  tmTime)
inline

Control interface to seek to the given (Chunk) Time.

Returns
Standard Result Code

Definition at line 193 of file interface_clients.h.