ADTF  3.14.3
IPlayerabstract

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

Inheritance diagram for IPlayer:
[legend]

Public Types

enum class  tLoopMode : uint32_t { DontLoop = 0 , SeekToStart , ChangeRunlevel }
 
enum class  tStepDirection : uint32_t { Forward , Backward }
 
enum class  tStepItems : uint32_t { Any , Samples , StreamTypes , Triggers }
 
- Public Types inherited from IPlayer
enum  tState : uint32_t { Closed = 0 , Paused = 1 , Streaming = 2 }
 

Public Member Functions

 ADTF_IID (IPlayer, "player.elasto.remote.adtf")
 
virtual tResult SetLoopMode (const tLoopMode &eLoopMode)=0
 Sets the loop mode of the player. More...
 
virtual tLoopMode GetLoopMode () const =0
 Retrieves the loop mode of the player. More...
 
virtual tResult SetPlaybackSpeed (float fPlaybackSpeed)=0
 Sets the playback speed of the player. More...
 
virtual float GetPlaybackSpeed () const =0
 Retrieves the current playback speed of the player. More...
 
virtual tResult Step (uint64_t nSteps, tStepDirection eDirection, tStepItems eItems, bool bWait)=0
 Steps n items in given direction. More...
 
- Public Member Functions inherited from IPlayer
 ADTF_IID (IPlayer, "player.bat.services.adtf.iid")
 Interface ID for the playback service interface.
 
virtual tResult GetMarkers (adtf::base::ant::IString &&strMarkers) const =0
 Get Markers. More...
 
virtual tResult ExtractAttachedFiles (const char *strAdtfDatFileNames, const char *strDestinationDirectory)=0
 Extracts all attached files from the given ADTF DAT files. More...
 
- Public Member Functions inherited from IPlayer
 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(adtf::ucom::object_ptr< IPlayer > &pPlayer)
Gets the current registered player instance.
Definition: player_intf.h:375
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 298 of file player_intf.h.

Member Enumeration Documentation

◆ tLoopMode

enum tLoopMode : uint32_t
strong
Enumerator
DontLoop 

do not loop at all

SeekToStart 

loop via seek

ChangeRunlevel 

loop via a runlevel change sequence

Definition at line 304 of file player_intf.h.

◆ tStepDirection

enum tStepDirection : uint32_t
strong
Enumerator
Forward 

step forward

Backward 

step backward

Definition at line 314 of file player_intf.h.

◆ tStepItems

enum tStepItems : uint32_t
strong
Enumerator
Any 

each stream item is considered

Samples 

only samples are considered

StreamTypes 

only stream types samples are considered

Triggers 

only triggers are considered

Definition at line 322 of file player_intf.h.

Member Function Documentation

◆ GetLoopMode()

virtual tLoopMode GetLoopMode ( ) const
pure virtual

Retrieves the loop mode of the player.

Returns
the current looping mode

◆ GetPlaybackSpeed()

virtual float GetPlaybackSpeed ( ) const
pure virtual

Retrieves the current playback speed of the player.

Returns
the current playback speed

◆ SetLoopMode()

virtual tResult SetLoopMode ( const tLoopMode eLoopMode)
pure virtual

Sets the loop mode of the player.

Parameters
[in]eLoopModethe loop mode to be set
Returns
Standard result.

◆ SetPlaybackSpeed()

virtual tResult SetPlaybackSpeed ( float  fPlaybackSpeed)
pure virtual

Sets the playback speed of the player.

Parameters
[in]fPlaybackSpeedthe playback speed to be set
Returns
Standard result.

◆ Step()

virtual tResult Step ( uint64_t  nSteps,
tStepDirection  eDirection,
tStepItems  eItems,
bool  bWait 
)
pure virtual

Steps n items in given direction.

Parameters
[in]nStepsThe number of steps to be done.
[in]eDirectionThe direction to step to.
[in]eItemsThe items to consider.
[in]bWaitWhether to block until the operation has finished or not.
Returns
Standard result.

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