DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

CodecHeaderPlugin.h File Reference

Detailed Description

NVIDIA DriveWorks API: CodecHeader Plugin Interface

Description: This file defines codec header plugin interface for encoding and decoding.

Definition in file CodecHeaderPlugin.h.

Go to the source code of this file.

Data Structures

struct  dwCodecHeaderPluginFunctions
 Function Table exposing plugin functions. More...
 

Typedefs

typedef dwStatus(* dwCodecHeaderPlugin_canLoad) (void const *const data, size_t const dataSize)
 Check if given data can be loaded. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_getCodecType) (char *const mimeType, const size_t size, dwCodecHeaderPluginHandle_t handle)
 Get the CodecType of the CodecHeader. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_getConfig) (void *config, size_t const configSize, dwCodecHeaderPluginHandle_t handle)
 Get the config of the CodecHeader. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_getMaxRawPacketSize) (size_t *const size, dwCodecHeaderPluginHandle_t handle)
 Get the max raw packet size of the CodecHeader. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_getMediaType) (dwMediaType *const mediaType, dwCodecHeaderPluginHandle_t handle)
 Get the MediaType of the CodecHeader. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_getProperties) (void *const properties, size_t const size, dwCodecHeaderPluginHandle_t handle)
 Get the properties of the CodecHeader. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_initializeDecoder) (dwDecoderPluginHandle_t *decoderHandle, dwDecoderPluginFunctions const **decoderFuncs, dwCodecHeaderPluginHandle_t handle, dwContextHandle_t ctx)
 Initialize a new handle to the Decoder managed by the plugin module. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_initializeHandle) (dwCodecHeaderPluginHandle_t *handle, void *const codecConfig, void *const params)
 Initialize a new handle to the CodecHeader managed by the plugin module. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_load) (dwCodecHeaderPluginHandle_t *handle, void const *const data, size_t const dataSize)
 Load a serialized codec header. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_release) (dwCodecHeaderPluginHandle_t handle)
 Release a CodecHeader managed by the plugin module. More...
 
typedef dwStatus(* dwCodecHeaderPlugin_save) (size_t *const dataSize, void *data, size_t const maxDataSize, dwCodecHeaderPluginHandle_t handle)
 Serializes the codec header. More...
 
typedef void * dwCodecHeaderPluginHandle_t
 CodecHeader plugin handle. More...
 

Data Structure Documentation

◆ dwCodecHeaderPluginFunctions

struct dwCodecHeaderPluginFunctions
Data Fields
dwCodecHeaderPlugin_canLoad canLoad function pointer of function used to check if given data can be loaded.
dwCodecHeaderPlugin_getCodecType getCodecType function pointer of function used to get codec type.
dwCodecHeaderPlugin_getConfig getConfig function pointer of function used to get the config of the CodecHeader.
dwCodecHeaderPlugin_getMaxRawPacketSize getMaxRawPacketSize function pointer of function used to get the max raw packet size of the CodecHeader.
dwCodecHeaderPlugin_getMediaType getMediaType function pointer of function used to get media type.
dwCodecHeaderPlugin_getProperties getProperties function pointer of function used to get the properties of the CodecHeader.
dwCodecHeaderPlugin_initializeDecoder initializeDecoder function pointer of function used to initialize decoder.
dwCodecHeaderPlugin_initializeHandle initializeHandle function pointer of initialize a new handle to the CodecHeader managed by the plugin module.
dwCodecHeaderPlugin_load load function pointer of function used to load a serialized codec header.
dwCodecHeaderPlugin_release release function pointer of release a CodecHeader managed by the plugin module..
dwCodecHeaderPlugin_save save function pointer of function used to save.

Typedef Documentation

◆ dwCodecHeaderPlugin_canLoad

typedef dwStatus(* dwCodecHeaderPlugin_canLoad) (void const *const data, size_t const dataSize)

Check if given data can be loaded.

Parameters
[in]dataPointer to memory block to containing the serialized codec header
[in]dataSizeSize of the serialized data
Returns
DW_INVALID_ARGUMENT if data or handle is nullptr
DW_FAILURE if the CodecHeader can't load the given serialized data
DW_SUCCESS if call is successful.

Definition at line 158 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_getCodecType

typedef dwStatus(* dwCodecHeaderPlugin_getCodecType) (char *const mimeType, const size_t size, dwCodecHeaderPluginHandle_t handle)

Get the CodecType of the CodecHeader.

Parameters
[out]mimeTypeThe CodecType of given CodecHeader.
[in]sizeSize of mimeType.
[in]handleThe handle to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
Returns
DW_INVALID_ARGUMENT if the handle is NULL or invalid
DW_SUCCESS if call is successful.

Definition at line 87 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_getConfig

typedef dwStatus(* dwCodecHeaderPlugin_getConfig) (void *config, size_t const configSize, dwCodecHeaderPluginHandle_t handle)

Get the config of the CodecHeader.

Parameters
[out]configThe codec config of given CodecHeader.
[out]configSizeSize of config.
[in]handleThe handle to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
Returns
DW_INVALID_ARGUMENT if the handle is NULL or invalid
DW_SUCCESS if call is successful.

Definition at line 133 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_getMaxRawPacketSize

typedef dwStatus(* dwCodecHeaderPlugin_getMaxRawPacketSize) (size_t *const size, dwCodecHeaderPluginHandle_t handle)

Get the max raw packet size of the CodecHeader.

Parameters
[out]sizeSize of max raw packet.
[in]handleThe handle to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
Returns
DW_SUCCESS if call is successful.

Definition at line 108 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_getMediaType

typedef dwStatus(* dwCodecHeaderPlugin_getMediaType) (dwMediaType *const mediaType, dwCodecHeaderPluginHandle_t handle)

Get the MediaType of the CodecHeader.

Parameters
[out]mediaTypeThe MideaType of given CodecHeader.
[in]handleThe handle to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
Returns
DW_INVALID_ARGUMENT if the handle is NULL or invalid
DW_SUCCESS if call is successful.

Definition at line 98 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_getProperties

typedef dwStatus(* dwCodecHeaderPlugin_getProperties) (void *const properties, size_t const size, dwCodecHeaderPluginHandle_t handle)

Get the properties of the CodecHeader.

Parameters
[out]propertiesThe properties of given CodecHeader.
[in]sizeSize of properties.
[in]handleThe handle to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
Returns
DW_INVALID_ARGUMENT if the handle is NULL or invalid
DW_NOT_IMPLEMENTED if the given CodecHeader doesn't have properties.
DW_SUCCESS if call is successful.

Definition at line 121 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_initializeDecoder

typedef dwStatus(* dwCodecHeaderPlugin_initializeDecoder) (dwDecoderPluginHandle_t *decoderHandle, dwDecoderPluginFunctions const **decoderFuncs, dwCodecHeaderPluginHandle_t handle, dwContextHandle_t ctx)

Initialize a new handle to the Decoder managed by the plugin module.

Parameters
[out]decoderHandleA pointer to Decoder handle
[out]decoderFuncsFunction table provided by the Decoder
[in]handleThe handle to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
[in]ctxDW context
Returns
DW_INVALID_ARGUMENT if handle or ctx is nullptr
DW_SUCCESS if call is successful.

Definition at line 183 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_initializeHandle

typedef dwStatus(* dwCodecHeaderPlugin_initializeHandle) (dwCodecHeaderPluginHandle_t *handle, void *const codecConfig, void *const params)

Initialize a new handle to the CodecHeader managed by the plugin module.

Parameters
[out]handleA pointer to CodecHeader handle
[in]codecConfigThe config associated with the CodecHeader. Such as dwCodecConfigVideo for video codec types
[in]paramsOptional params for the CodecHeader plugin
Returns
DW_INVALID_ARGUMENT if handle is nullptr
DW_SUCCESS if call is successful.

Definition at line 65 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_load

typedef dwStatus(* dwCodecHeaderPlugin_load) (dwCodecHeaderPluginHandle_t *handle, void const *const data, size_t const dataSize)

Load a serialized codec header.

Parameters
[out]handleA pointer to CodecHeader handle
[in]dataPointer to memory block to containing the serialized codec header
[in]dataSizeSize of the serialized data
Returns
DW_INVALID_ARGUMENT if data or handle is nullptr
DW_SUCCESS if call is successful.

Definition at line 170 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_release

typedef dwStatus(* dwCodecHeaderPlugin_release) (dwCodecHeaderPluginHandle_t handle)

Release a CodecHeader managed by the plugin module.

Parameters
[in]handleThe handle to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
Returns
DW_INVALID_ARGUMENT if the handle is NULL or invalid
DW_SUCCESS if call is successful.

Definition at line 75 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPlugin_save

typedef dwStatus(* dwCodecHeaderPlugin_save) (size_t *const dataSize, void *data, size_t const maxDataSize, dwCodecHeaderPluginHandle_t handle)

Serializes the codec header.

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 to a CodecHeader created previously with the 'dwCodecHeaderPlugin_initializeHandle' interface.
Returns
DW_INVALID_ARGUMENT if dataSize, data or handle is nullptr, or if maxDataSize is smaller than the serialized size.
DW_SUCCESS if call is successful.

Definition at line 146 of file CodecHeaderPlugin.h.

◆ dwCodecHeaderPluginHandle_t

CodecHeader plugin handle.

Definition at line 53 of file CodecHeaderPlugin.h.