adtf_file_library  0.13.2
Public Member Functions | Static Public Attributes | List of all members
adtf_file::adtf3::MediaDescriptionSerializer Class Reference

DDL based Sample Serializer implementation for ADTF 3 Samples with timestamps of microseconds resolution. This serializer serializes the DDL described values of the sample content from the sample data buffer adtf_file::WriteSample::beginBufferRead into the output stream. More...

#include <adtf3_media_description_serializer.h>

Inheritance diagram for adtf_file::adtf3::MediaDescriptionSerializer:
[legend]
Collaboration diagram for adtf_file::adtf3::MediaDescriptionSerializer:
[legend]

Public Member Functions

 MediaDescriptionSerializer ()
 CTOR.
 
 ~MediaDescriptionSerializer ()
 DTOR.
 
std::string getId () const override
 Get the Id of the sample serializer. More...
 
void setStreamType (const StreamType &stream_type) override
 Set the Stream Type and the serialization state of the serializer. More...
 
void serialize (const WriteSample &sample, OutputStream &stream) override
 Serializes the sample into the given stream. These samples usually are described by the previous set stream type. More...
 

Static Public Attributes

static constexpr const char * id = "media_description_sample_serialization.serialization.adtf.cid"
 identifier for MediaDescriptionSerializer and MediaDescriptionDeserializer
 

Detailed Description

DDL based Sample Serializer implementation for ADTF 3 Samples with timestamps of microseconds resolution. This serializer serializes the DDL described values of the sample content from the sample data buffer adtf_file::WriteSample::beginBufferRead into the output stream.

Remarks
The sample content must be described via set adtf_file::PropertyStreamType with the properties:
  • md_struct name of the struct type used for sample content
  • md_definitions DDL description containing a complete struct definition for md_struct used as sample content
  • md_data_serialized must be set to true and marks the sample content as deserialzed data representation

Member Function Documentation

◆ getId()

std::string adtf_file::adtf3::MediaDescriptionSerializer::getId ( ) const
overridevirtual

Get the Id of the sample serializer.

Returns
std::string

Implements adtf_file::SampleSerializer.

◆ serialize()

void adtf_file::adtf3::MediaDescriptionSerializer::serialize ( const WriteSample sample,
OutputStream stream 
)
overridevirtual

Serializes the sample into the given stream. These samples usually are described by the previous set stream type.

Parameters
samplethe sample to serialize.
streamthe stream to write to.
Remarks
The serializer itself might have a serialization state depending on the setStreamType call.

Implements adtf_file::SampleSerializer.

◆ setStreamType()

void adtf_file::adtf3::MediaDescriptionSerializer::setStreamType ( const StreamType stream_type)
overridevirtual

Set the Stream Type and the serialization state of the serializer.

Parameters
stream_typethe stream type describes all following samples of the serialize call

Implements adtf_file::SampleSerializer.


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

Copyright © CARIAD SE.
Generated on Mon Jun 10 2024 by doxygen 1.9.1
GIT Commit Hash: eb3af397a6b49ad6fcad9a60d8277d909b458b48