CoreSDK  v1.0.0.b1304
Public Member Functions | Public Attributes | List of all members
r5::common::MediaDesc Struct Reference

Unified media data description. More...

#include <r5data.h>

Collaboration diagram for r5::common::MediaDesc:
Collaboration graph
[legend]

Public Member Functions

 MediaDesc (DataType t=DataType::Unknown)
 Default constructor Can specify data type and set all other fields to zero. More...
 
 MediaDesc (const MediaDesc &other)
 Copying constructor. More...
 
MediaDescoperator= (MediaDesc other)
 Assign MediaDesc value. More...
 
 MediaDesc (VideoFmt fmt, int32_t w=0, int32_t h=0, int32_t fps=0)
 Overriden constructor to create video data description Contructs object with type set to Video. More...
 
 MediaDesc (AudioFmt fmt, int32_t ch=0, int32_t sr=0)
 Overriden constructor to create audio data description Contructs object with type set to Audio. More...
 

Public Attributes

DataType type
 Type of media described by structure. Defines what option of union to use.
 
union {
   struct VideoDesc   video
 Description for Video data type.
 
   struct AudioDesc   audio
 Description for Audio data type.
 
}; 
 

Detailed Description

Unified media data description.

Constructor & Destructor Documentation

◆ MediaDesc() [1/4]

r5::common::MediaDesc::MediaDesc ( DataType  t = DataType::Unknown)
inline

Default constructor Can specify data type and set all other fields to zero.

Parameters
toptional data type of media

◆ MediaDesc() [2/4]

r5::common::MediaDesc::MediaDesc ( const MediaDesc other)
inline

Copying constructor.

Parameters
otheroriginal object to copy

◆ MediaDesc() [3/4]

r5::common::MediaDesc::MediaDesc ( VideoFmt  fmt,
int32_t  w = 0,
int32_t  h = 0,
int32_t  fps = 0 
)
inline

Overriden constructor to create video data description Contructs object with type set to Video.

Parameters
fmtoptional video pixel format
woptional video frame width
hoptional video frame height
fpsoptional video stream frame rate

◆ MediaDesc() [4/4]

r5::common::MediaDesc::MediaDesc ( AudioFmt  fmt,
int32_t  ch = 0,
int32_t  sr = 0 
)
inline

Overriden constructor to create audio data description Contructs object with type set to Audio.

Parameters
fmtoptional audio sample format
choptional number of audio channels
sroptional audio stream sample rate

Member Function Documentation

◆ operator=()

MediaDesc& r5::common::MediaDesc::operator= ( MediaDesc  other)
inline

Assign MediaDesc value.

Parameters
otheroriginal object to copy
Returns
*this

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