ADTF
Loading...
Searching...
No Matches
adtf::services::ant::IPlayer Class Referenceabstract

ADTF Playback Service Control interface to control the ADTF Player. More...

#include <player_intf.h>

Inherits adtf::ucom::ant::IObject.

Inherited by adtf::services::bat::IPlayer.

Classes

class  IListStreamCallback
 callback for stream information More...
 
struct  tEvent
 Layout of the events emitted by the playback service. More...
 

Public Types

enum  tState : uint32_t { Closed = 0 , Paused = 1 , Streaming = 2 }
 

Public Member Functions

 ADTF_IID (IPlayer, "player.ant.services.adtf.iid")
 Interface ID for the playback service interface.
 
virtual tResult Open (const char *strFileNames, bool bLoadReferencedFiles)=0
 Opens one or more adtfdat files.
 
virtual tResult Close ()=0
 Closes the current loaded files.
 
virtual tResult GetTimeRange (tTimeStamp &tmFirstItem, tTimeStamp &tmLastItem) const =0
 
virtual uint64_t GetChunkCount () const =0
 
virtual tResult GetCurrentFileNames (base::ant::IString &&strFileNames) const =0
 
virtual tTimeStamp GetCurrentTime () const =0
 
virtual IPlayer::tState GetCurrentState () const =0
 
virtual tResult Play ()=0
 
virtual tResult Pause ()=0
 
virtual tResult Reset ()=0
 
virtual tResult SeekToTime (tTimeStamp tmTime)=0
 
virtual tResult SeekToChunkIndex (uint64_t ui64ChunkIndex)=0
 
virtual tResult SeekToStreamIndex (uint16_t ui16StreamId, uint64_t ui64StreamIndex)=0
 
virtual tResult ListStreams (IListStreamCallback &oCallback)=0
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

ADTF Playback Service Control interface to control the ADTF Player.

This interface enables you to control an instance of ADTF Playback Service. Usually the ADTF Playback Service will be controlled by the Player. By following code the service will be controlled by you. Make sure the property "enable_control" is set to false, if you want to control it by yourself.

// MIND: This call will only succeed if player is present and it will be called _AFTER_ the PlaybackService was
initialized! if (IS_OK(get_player(pPlayer))
{
if (IS_OK(pPlayer->Open("c:/temp/my_test_file.adtfdat", true)))
{
pPlayer->Play();
}
}
#define IS_OK(s)
Check if result is OK.
Definition result.h:17
Definition object_ptr.h:384
tResult get_player(ucom::object_ptr< IPlayer > &pPlayer)
Definition player_intf.h:232
Remarks
Usually this Playback interface and the states of the Player does NOT depend on the Runlevel. Only the concrete implementation of the Player maps it to the StreamingGraph State.

Member Enumeration Documentation

◆ tState

Enumerator
Closed 

no file is loaded

Paused 

file is opened and playback has been paused

Streaming 

file is opened and streaming

Member Function Documentation

◆ Close()

virtual tResult adtf::services::ant::IPlayer::Close ( )
pure virtual

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.

◆ GetChunkCount()

virtual uint64_t adtf::services::ant::IPlayer::GetChunkCount ( ) const
pure virtual

Information interface to get the chunk count of the current opened files.

Returns
chunk count
Return values
0no file is opend

◆ GetCurrentFileNames()

virtual tResult adtf::services::ant::IPlayer::GetCurrentFileNames ( base::ant::IString && strFileNames) const
pure virtual

Information interface to get the time range of the current opened file.

Parameters
strFileNames[out] String where to return the filenames to. (comma separated list)
Remarks
It will only return valid values if ERR_NOERROR is returned.
Return values
ERR_NOERRORState change succeded

◆ GetCurrentState()

virtual IPlayer::tState adtf::services::ant::IPlayer::GetCurrentState ( ) const
pure virtual

Information interface to get the current state of the Player.

Remarks
It will only return valid values if ERR_NOERROR is returned.
Return values
theState of the player

◆ GetCurrentTime()

virtual tTimeStamp adtf::services::ant::IPlayer::GetCurrentTime ( ) const
pure virtual

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

◆ GetTimeRange()

virtual tResult adtf::services::ant::IPlayer::GetTimeRange ( tTimeStamp & tmFirstItem,
tTimeStamp & tmLastItem ) const
pure virtual

Information interface to get the time range of the currently opened files.

Parameters
tmFirstItem[out] (Chunk)Time of the first item
tmLastItem[out] (Chunk)Time of the last item
Remarks
It will only return valid values if ERR_NOERROR is returned.
Return values
ERR_NOERRORFile is at least opend and information where read.

◆ ListStreams()

virtual tResult adtf::services::ant::IPlayer::ListStreams ( IListStreamCallback & oCallback)
pure virtual

List all available streams

Parameters
[in]oCallbackThe callback that retrieves all streams.

◆ Open()

virtual tResult adtf::services::ant::IPlayer::Open ( const char * strFileNames,
bool bLoadReferencedFiles )
pure virtual

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.

◆ Pause()

virtual tResult adtf::services::ant::IPlayer::Pause ( )
pure virtual

Control interface to pause streaming.

Returns
Standard Result Code

◆ Play()

virtual tResult adtf::services::ant::IPlayer::Play ( )
pure virtual

Control interface to start streaming.

Returns
Standard Result Code

◆ Reset()

virtual tResult adtf::services::ant::IPlayer::Reset ( )
pure virtual

Control interface to Reset the streaming.

Returns
Standard Result Code

◆ SeekToChunkIndex()

virtual tResult adtf::services::ant::IPlayer::SeekToChunkIndex ( uint64_t ui64ChunkIndex)
pure virtual

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

Returns
Standard Result Code

◆ SeekToStreamIndex()

virtual tResult adtf::services::ant::IPlayer::SeekToStreamIndex ( uint16_t ui16StreamId,
uint64_t ui64StreamIndex )
pure virtual

Control interface to seek to the given (Stream) Index of the given stream.

Returns
Standard Result Code

◆ SeekToTime()

virtual tResult adtf::services::ant::IPlayer::SeekToTime ( tTimeStamp tmTime)
pure virtual

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

Returns
Standard Result Code

The documentation for this class was generated from the following file: