ADTF  3.14.3
IPlayerabstract

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

Inheritance diagram for IPlayer:
[legend]

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. More...
 
virtual tResult Close ()=0
 Closes the current loaded files. More...
 
virtual tResult GetTimeRange (tTimeStamp &tmFirstItem, tTimeStamp &tmLastItem) const =0
 Information interface to get the time range of the currently opened files. More...
 
virtual uint64_t GetChunkCount () const =0
 Information interface to get the chunk count of the current opened files. More...
 
virtual tResult GetCurrentFileNames (base::ant::IString &&strFileNames) const =0
 Information interface to get the time range of the current opened file. More...
 
virtual tTimeStamp GetCurrentTime () const =0
 Information interface to get the current time position of the current opened files. More...
 
virtual IPlayer::tState GetCurrentState () const =0
 Information interface to get the current state of the Player. More...
 
virtual tResult Play ()=0
 Control interface to start streaming. More...
 
virtual tResult Pause ()=0
 Control interface to pause streaming. More...
 
virtual tResult Reset ()=0
 Control interface to Reset the streaming. More...
 
virtual tResult SeekToTime (tTimeStamp tmTime)=0
 Control interface to seek to the given (Chunk) Time. More...
 
virtual tResult SeekToChunkIndex (uint64_t ui64ChunkIndex)=0
 Control interface to seek to the given (Chunk) Index. More...
 
virtual tResult SeekToStreamIndex (uint16_t ui16StreamId, uint64_t ui64StreamIndex)=0
 Control interface to seek to the given (Stream) Index of the given stream. More...
 
virtual tResult ListStreams (IListStreamCallback &oCallback)=0
 List all available streams. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Additional Inherited Members

- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

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 ADTFDAT File 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.

ucom::object_ptr<IPlayer> pPlayer;
// 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();
}
}
///...
tResult get_player(ucom::object_ptr< IPlayer > &pPlayer)
Gets the current registered player instance.
Definition: player_intf.h:228
Remarks
Usually this Playback interface and the states of the Player does NOT depend on the Runlevel. Only the concrete implementation of the ADTFDAT File Player maps it to the StreamingGraph State.
See also
Streaming Graph, ADTFDAT File Player

Definition at line 57 of file player_intf.h.

Member Enumeration Documentation

◆ tState

enum tState : uint32_t
Enumerator
Closed 

no file is loaded

Paused 

file is opened and playback has been paused

Streaming 

file is opened and streaming

Definition at line 64 of file player_intf.h.

Member Function Documentation

◆ Close()

virtual tResult 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 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 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 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 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 GetTimeRange ( tTimeStamp &  tmFirstItem,
tTimeStamp &  tmLastItem 
) const
pure virtual

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

Parameters
tmFirstItemoutTime of the first item
tmLastItemoutTime 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 ListStreams ( IListStreamCallback oCallback)
pure virtual

List all available streams.

Parameters
[in]oCallbackThe callback that retrieves all streams.

◆ Open()

virtual tResult 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 Pause ( )
pure virtual

Control interface to pause streaming.

Returns
Standard Result Code

◆ Play()

virtual tResult Play ( )
pure virtual

Control interface to start streaming.

Returns
Standard Result Code

◆ Reset()

virtual tResult Reset ( )
pure virtual

Control interface to Reset the streaming.

Returns
Standard Result Code

◆ SeekToChunkIndex()

virtual tResult SeekToChunkIndex ( uint64_t  ui64ChunkIndex)
pure virtual

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

Returns
Standard Result Code

◆ SeekToStreamIndex()

virtual tResult 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 SeekToTime ( tTimeStamp  tmTime)
pure virtual

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

Returns
Standard Result Code

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)