ADTF
Loading...
Searching...
No Matches
Playback Service

Plugin Information

Plugin Filenameadtf_core.adtfplugin
Plugin Descriptionadtf_core.plugindescription
Plugin NameADTF Core Plugin
LicenseADTF Subscription
Support Mailsupport@digitalwerk.net
Homepage URLhttps://adtf.dev

Plugin Versions

Plugin Version3.99.99
Plugin File Version1.0
adtf3.99.99
adtf::ucom3.1.0

Component Information

NamePlayback Service
CIDplayback.service.adtf.cid
DescriptionUse this service to extend the ADTF Session with playback support for ADTF 3.x .adtfdat files and other container formats.
TypeService
Default Runlevelsystem

Properties

NameValueTypeDescriptionSubproperties
control_clocktruetBoolIf enabled, all Play()/Pause() calls will also control the current stream clock.Value Range:
minimum =
maximum = Filename Extension Filter:
emulate_clockstruetBoolIf enabled, clocks recorded in the files will also be emulated during playback.Value Range:
minimum =
maximum = Filename Extension Filter:
extract_attached_files_fromcFilenameListA semi-colon separated list of ADTFDAT files that the attached files should be extracted from during service initialization.Value Range:
minimum =
maximum = Filename Extension Filter:
extract_attached_files_from_opened_filesfalsetBoolIf set, attached files will be extracted whenever a set of playback files is opened.Value Range:
minimum =
maximum = Filename Extension Filter:
extraction_destination_directory$(ADTF_SESSION_DIR)/attached_filescFilepathThe directory where all attached files should be extracted to.Value Range:
minimum =
maximum = Filename Extension Filter:
ignore_invalid_timestampsfalsetBoolCAUTION: When enabled playback will continue even in the case that chunk timestamps within each playback file are NOT monotonically increasing. The Playback Service will ignore these INVALID timestamps and the clock will be frozen at the latest/highest timestamp while already outdated stream elements catch up without any ordering guarantees. The use of this option is greatly discouraged as it CANNOT offer a determenistic and usable playback in any way and only hides errors already present further up your data processing chain!Value Range:
minimum =
maximum = Filename Extension Filter:
ignore_open_errorsfalsetBoolif enabled, files that can not be opened are ignored.Value Range:
minimum =
maximum = Filename Extension Filter:
ignore_unknown_classesfalsetBoolIf enabled, playback will continue even in case it cannot find the deserializer implementation of one ore more streams.Value Range:
minimum =
maximum = Filename Extension Filter:
interpolate_stream_timefalsetBoolWhen enabled the stream time will continue to go forward between two playback items being sent. Otherwise the time will be increased in discrete steps. Mind that this property only has an effect when 'control_clock' is enabled.Value Range:
minimum =
maximum = Filename Extension Filter:
load_referenced_filestruetBoolif the property is set, additional files referenced in the current playback file are loaded as well.Value Range:
minimum =
maximum = Filename Extension Filter:
loop_mode0tUInt32Whether or not and how playback should be restarted when the end of all streams is reached. This also applies to playlists.Value List:
do not loop = 0
seek to start = 1
change runlevel = 2Value Range:
minimum =
maximum = Filename Extension Filter:
maximum_playback_thread_count1tUInt32Specifies the maximum number of threads that should be used for playback. If this is not equal to 1, multi threaded playback will be used. Keep in mind that the order of samples is non-deterministic in this case! Note that you have to set interpolate_stream_time = True and emulate_clocks = False in this setup. A value of 0 means that as many threads as possible will be used for the current set of files.Value Range:
minimum =
maximum = Filename Extension Filter:
playback_clock_mode0tInt32Whether or not the playback clock should advertise itself as a system clock. This is relevant for Sync2Ref handling during playback. Auto-detect tries to make a guess based on timestamp size and clock names. Mind that this property only has an effect when 'control_clock' is enabled.Value List:
auto detect = 0
system clock = 1
independent clock = 2Value Range:
minimum =
maximum = Filename Extension Filter:
playback_filenamescFilenameListThe list of files (semi-colon) that should be played back. This might be overriden by the Playback Input Source.Value Range:
minimum =
maximum = Filename Extension Filter:
ADTF DAT files (*.dat *.adtfdat),All files (*)
playback_speed1.000000tFloat32The playback speed factor: e.g. 0.5 = half the playback speed, 4 = four times faster.Value Range:
minimum =
maximum = Filename Extension Filter:
playback_time_barrier_mode0tInt32Specifies how the time will advance during playback. All items - The player will create a time barrier for each item (sample, stream type and trigger) and emit it once the time has advanced to this point, thus all items will be emitted exactly as they were recorded. Triggers only - Time barriers are created for triggers only. Samples and stream types will be emitted together with their following trigger.Value List:
all items = 0
triggers only = 1Value Range:
minimum =
maximum = Filename Extension Filter:
playlist_filenamecFilenameIf set, each line in the given file will be used to open the specified files, start playback and wait until the end of all streams is reached. Use the 'loop_mode' and 'runlevel_after_end_of_streams' properties to control what happens in between of playlist entries. This property and the 'playback_filenames' property can only be used exclusively.Value Range:
minimum =
maximum = Filename Extension Filter:
ADTF Playlist files (*.adtfplaylist),All files (*)
read_ahead_queue_length1000000tUInt64The time span (us) that the read thread will continuously read from the file in advance.Value Range:
minimum =
maximum = Filename Extension Filter:
reader_idcStringUse this property to force the use of a specific reader implementation. If empty, the first capable reader will be used.Value Range:
minimum =
maximum = Filename Extension Filter:
replay_on_seek0.000000tFloat64Replay the given amount of seconds before the target seek position. 0.0 = disabled, -1.0 = all since start CAUTION: Long timespans and especially -1.0 will cause serious delays while seeking.Value Range:
minimum =
maximum = Filename Extension Filter:
reset_simulation_clocktruetBoolIf enabled, the simulation clock will be reset to the beginning of the playback sequence. The player will react to clock events only when this is disabled (i.e. by seeking to the reset event time).Value Range:
minimum =
maximum = Filename Extension Filter:
runlevel_after_end_of_playlist0tInt32If the property is != -1 then the service will decrease the runlevel to this value after the end of the playlist has been reached. Note that it will never increase the runlevel based on this property.Value List:
none = -1
Filter Graph = 4
Streaming Graph = 3
Session = 2
System = 1
Shutdown = 0Value Range:
minimum =
maximum = Filename Extension Filter:
runlevel_after_end_of_streams4tInt32If the property is != -1 then the service will decrease the runlevel to this value after the end of all streams has been reached. Note that it will never increase the runlevel based on this property.Value List:
none = -1
Filter Graph = 4
Streaming Graph = 3
Session = 2
System = 1
Shutdown = 0Value Range:
minimum =
maximum = Filename Extension Filter:
try_realtime_playbacktruetBoolThis property is no longer in use, please use change this settting at the Reference Clock Service directly.Value Range:
minimum =
maximum = Filename Extension Filter:

Required Interfaces

IID
reference_clock.vision.streaming.adtf.iid
kernel.penguin.services.adtf.iid
adtf_file_objects.devil.services.adtf.iid

Provided Interfaces

IID
playback_service.services.adtf.iid
player.ant.services.adtf.iid
player.bat.services.adtf.iid
player.elasto.remote.adtf
player.quiet.services.adtf.iid

Playback Service Concept

The Playback Service will create Time Barriers for all playback items at the current ADTF Stream Clock (see...). This ensures that the simulated ADTF Stream Time matches the progress of time during recording.

To create streaming source for a player instance within your filter graph to provide the samples, use the Player.

There can be only one Player in the current filter graph!

Playback of Multiple Files

The Playback Service supports playback of multiple Files and will always play back the recorded samples in correct relation and timestamps compared to recording. This is not only mandatory to guarantee that the offline mode is equal to to the online mode during recording, it also required when loading several files at once.

These are the possible options for simultaneously playback of multiple .adtfdat files:

  • property playback_filenames: You can specify multiple filenames seperated by semicolon
  • property load_referenced_files: adtfdat files can reference other adtfdat files
    • When the Playback Service encounters such a .adtfdat file it will automatically load the referenced files as well
    • This will happen when there had been several Recorder within your filter graph

In both cases, ADTF will merge all files together and plays each Sample according to its timestamp.

The split option is a special implementation of referenced file but seperated from one recorder. The behaviour for playback matches the same.

Player Control

The delivered service implementation follows the interface definition of adtf::services::IPlayer.

The Playback Service can be control from any instance. It will not react on or result in a runlevel change of the system (see Player for control options).

See also adtf::services::IPlayer for interface documentation.

Attached Files

If .adtfdat files are played back, they can contain additional meta content/files for resimulation purpose (e.g. databases for decoding).
See Attached Files for further information how to use them.