DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

CodecHeader

Detailed Description

Defines the codecheader types.

Typedefs

typedef struct dwCodecHeaderObject const * dwCodecHeaderConstHandle_t
 
typedef struct dwCodecHeaderObject * dwCodecHeaderHandle_t
 CodecHeader handle. More...
 

Functions

dwStatus dwCodecHeader_create (dwCodecHeaderHandle_t *handle, dwCodecType type, void *codecConfig)
 Get the specified dwCodecType in a codec header. More...
 
dwStatus dwCodecHeader_destroy (dwCodecHeaderHandle_t handle)
 Get the specified dwCodecType in a codec header. More...
 
dwStatus dwCodecHeader_getCodecType (dwCodecType *type, dwCodecHeaderConstHandle_t handle)
 Get the specified dwCodecType in a codec header. More...
 
dwStatus dwCodecHeader_getConfig (void *config, size_t configSize, dwMediaType mediaType, dwCodecHeaderConstHandle_t handle)
 Get the specified dwCodecConfig* in a codec header. More...
 
dwStatus dwCodecHeader_getMediaType (dwMediaType *type, dwCodecHeaderConstHandle_t handle)
 Get the specified dwMediaType in a codec header. More...
 
dwStatus dwCodecHeader_load (dwCodecHeaderHandle_t *handle, void *data, size_t dataSize, dwContextHandle_t context)
 Load a serialized codec header from JSON string. More...
 
dwStatus dwCodecHeader_release (dwCodecHeaderHandle_t handle)
 Release resources associated with codec header. More...
 
dwStatus dwCodecHeader_save (size_t *dataSize, void *data, size_t maxDataSize, dwCodecHeaderConstHandle_t handle)
 Serializes the codec header into JSON string. More...
 

Typedef Documentation

◆ dwCodecHeaderConstHandle_t

typedef struct dwCodecHeaderObject const* dwCodecHeaderConstHandle_t

Definition at line 61 of file CodecHeader.h.

◆ dwCodecHeaderHandle_t

typedef struct dwCodecHeaderObject* dwCodecHeaderHandle_t

CodecHeader handle.

Definition at line 60 of file CodecHeader.h.

Function Documentation

◆ dwCodecHeader_create()

dwStatus dwCodecHeader_create ( dwCodecHeaderHandle_t handle,
dwCodecType  type,
void *  codecConfig 
)

Get the specified dwCodecType in a codec header.

Parameters
[out]handlethe pointer in which the created codec header is stored
[in]typethe type of codec header to create
[in]codecConfigthe config associated with the type. Such as dwCodecConfigVideo for video codec types
Returns
DW_NOT_SUPPORT if type is not a supported type.
DW_INVALID_ARGUMENT if handle is nullptr DW_SUCCESS

◆ dwCodecHeader_destroy()

dwStatus dwCodecHeader_destroy ( dwCodecHeaderHandle_t  handle)

Get the specified dwCodecType in a codec header.

Parameters
[in]handlethe handle to release
Returns
DW_SUCCESS

◆ dwCodecHeader_getCodecType()

dwStatus dwCodecHeader_getCodecType ( dwCodecType type,
dwCodecHeaderConstHandle_t  handle 
)

Get the specified dwCodecType in a codec header.

Parameters
[out]typestored in codec header
[in]handlethe handle of codec header
Returns
DW_INVALID_ARGUMENT if type or codecHeader is nullptr.
DW_SUCCESS

◆ dwCodecHeader_getConfig()

dwStatus dwCodecHeader_getConfig ( void *  config,
size_t  configSize,
dwMediaType  mediaType,
dwCodecHeaderConstHandle_t  handle 
)

Get the specified dwCodecConfig* in a codec header.

Parameters
[out]configstored in codec header
[in]configSizesize of the memory pointed by the passed in config pointer
[in]mediaTypemedia type corresonding to the codecHeader
[in]handlethe handle of codec header
Returns
DW_INVALID_ARGUMENT if config or codecHeader is nullptr, or if configSize mismatches the expected size of specified mediaType.
DW_SUCCESS

◆ dwCodecHeader_getMediaType()

dwStatus dwCodecHeader_getMediaType ( dwMediaType type,
dwCodecHeaderConstHandle_t  handle 
)

Get the specified dwMediaType in a codec header.

Parameters
[out]typestored in codec header
[in]handlethe handle of codec header
Returns
DW_INVALID_ARGUMENT if type or codecHeader is nullptr.
DW_SUCCESS

◆ dwCodecHeader_load()

dwStatus dwCodecHeader_load ( dwCodecHeaderHandle_t handle,
void *  data,
size_t  dataSize,
dwContextHandle_t  context 
)

Load a serialized codec header from JSON string.

Parameters
[out]handlethe handle of codec to populate
[in]datapointer to memory block to containing the serialized codec header
[in]dataSizesize of the serialized data
[in]contextDW context
Returns
DW_INVALID_ARGUMENT if data or codecHeader is nullptr.
DW_SUCCESS

◆ dwCodecHeader_release()

dwStatus dwCodecHeader_release ( dwCodecHeaderHandle_t  handle)

Release resources associated with codec header.

Parameters
[in]handlethe handle of codec to populate
Returns
DW_SUCCESS

◆ dwCodecHeader_save()

dwStatus dwCodecHeader_save ( size_t *  dataSize,
void *  data,
size_t  maxDataSize,
dwCodecHeaderConstHandle_t  handle 
)

Serializes the codec header into JSON string.

Parameters
[out]dataSizesize of the serialized data
[out]datapointer to memory block to store the serialized string
[in]maxDataSizesize of the memory block pointed to by data
[in]handlethe handle of codec header
Returns
DW_INVALID_ARGUMENT if dataSize, data or codecHeader is nullptr, or if maxDataSize is smaller than the serialized size.
DW_SUCCESS