MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
dataformat.h File Reference

Public flow format identifiers and format classification helpers. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MXL_DATA_FORMAT_GRAIN_SIZE   4096

Typedefs

typedef enum mxlDataFormat mxlDataFormat

Enumerations

enum  mxlDataFormat {
  MXL_DATA_FORMAT_UNSPECIFIED , MXL_DATA_FORMAT_VIDEO , MXL_DATA_FORMAT_AUDIO , MXL_DATA_FORMAT_DATA ,
  MXL_DATA_FORMAT_EVENT
}

Functions

int mxlIsContinuousDataFormat (int format)
int mxlIsDiscreteDataFormat (int format)
int mxlIsEventDataFormat (int format)
 Test whether a format uses the event queue API.
int mxlIsSupportedDataFormat (int format)
int mxlIsValidDataFormat (int format)

Detailed Description

Public flow format identifiers and format classification helpers.

Definition in file dataformat.h.

Macro Definition Documentation

◆ MXL_DATA_FORMAT_GRAIN_SIZE

#define MXL_DATA_FORMAT_GRAIN_SIZE   4096

Fixed payload capacity in bytes of an MXL video/smpte291 data grain or event. This is large enough to hold all the ANC data in a single grain. This size is a usual VFS page; no point in going smaller.

Definition at line 15 of file dataformat.h.

Typedef Documentation

◆ mxlDataFormat

Source and flow data formats as defined by AMWA NMOS IS-04.

Enumeration Type Documentation

◆ mxlDataFormat

Source and flow data formats as defined by AMWA NMOS IS-04.

Enumerator
MXL_DATA_FORMAT_UNSPECIFIED 
MXL_DATA_FORMAT_VIDEO 
MXL_DATA_FORMAT_AUDIO 
MXL_DATA_FORMAT_DATA 
MXL_DATA_FORMAT_EVENT 

Asynchronous queue of complete events or event fragments.

Definition at line 24 of file dataformat.h.

25 {
mxlDataFormat
Definition dataformat.h:25
@ MXL_DATA_FORMAT_EVENT
Asynchronous queue of complete events or event fragments.
Definition dataformat.h:30
@ MXL_DATA_FORMAT_AUDIO
Definition dataformat.h:28
@ MXL_DATA_FORMAT_UNSPECIFIED
Definition dataformat.h:26
@ MXL_DATA_FORMAT_DATA
Definition dataformat.h:29
@ MXL_DATA_FORMAT_VIDEO
Definition dataformat.h:27

Function Documentation

◆ mxlIsContinuousDataFormat()

int mxlIsContinuousDataFormat ( int format)
inline

Return whether the specified format is operating in continuous samples.

Parameters
[in]formatthe mxlDataFormat of interest.
Returns
1 if the format specified in format is operating with continuous samples, otherwise 0.

Definition at line 106 of file dataformat.h.

107 {
108 switch (format)
109 {
110 case MXL_DATA_FORMAT_AUDIO: return 1;
111
112 default: return 0;
113 }
114 }

◆ mxlIsDiscreteDataFormat()

int mxlIsDiscreteDataFormat ( int format)
inline

Return whether the specified format is operating in discrete grains.

Parameters
[in]formatthe mxlDataFormat of interest.
Returns
1 if the format specified in format is operating with continuous samples, otherwise 0.

Definition at line 75 of file dataformat.h.

76 {
77 switch (format)
78 {
80 case MXL_DATA_FORMAT_DATA: return 1;
81
82 default: return 0;
83 }
84 }

◆ mxlIsEventDataFormat()

int mxlIsEventDataFormat ( int format)
inline

Test whether a format uses the event queue API.

Parameters
formatData format identifier to inspect.
Returns
1 for MXL_DATA_FORMAT_EVENT; 0 for every other value.

Definition at line 91 of file dataformat.h.

92 {
93 switch (format)
94 {
95 case MXL_DATA_FORMAT_EVENT: return 1;
96 default: return 0;
97 }
98 }

◆ mxlIsSupportedDataFormat()

int mxlIsSupportedDataFormat ( int format)
inline

Return whether the specified format is supported by MXL.

Parameters
[in]formatthe mxlDataFormat of interest.
Returns
1 if the format specified in format is supported, otherwise 0.

Definition at line 56 of file dataformat.h.

57 {
58 switch (format)
59 {
63 case MXL_DATA_FORMAT_EVENT: return 1;
64
65 default: return 0;
66 }
67 }

◆ mxlIsValidDataFormat()

int mxlIsValidDataFormat ( int format)
inline

Return whether the specified format is valid.

Parameters
[in]formatthe mxlDataFormat of interest.
Returns
1 if the format specified in format is valid, otherwise 0.

Definition at line 38 of file dataformat.h.

39 {
40 switch (format)
41 {
45 case MXL_DATA_FORMAT_EVENT: return 1;
46
47 default: return 0;
48 }
49 }