NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
Encoder.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
27 #ifndef DW_SENSORS_CODECS_ENCODER_H
28 #define DW_SENSORS_CODECS_ENCODER_H
29 
30 #include <dw/core/base/Exports.h>
31 #include <dw/core/base/Types.h>
32 #include <dw/core/context/Context.h>
33 #include <dw/sensors/codecs/Codec.h>
34 #include <dw/sensors/codecs/CodecHeader.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
41 typedef struct dwCodecEncoderObject* dwEncoderHandle_t;
42 
55  dwCodecHeaderHandle_t config,
56  dwEncoderConfig const* encoderConfig,
57  dwContextHandle_t context);
58 
68 
78 
92 dwStatus dwEncoder_encode(void const* data, size_t dataSize, dwMediaType dataType, dwEncoderHandle_t encoder);
93 
106 
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif // DW_SENSORS_CODECS_ENCODER_H
dwEncoder_flush
dwStatus dwEncoder_flush(dwEncoderHandle_t encoder)
This function consumes all data from the internal data buffer.
dwEncoder_encode
dwStatus dwEncoder_encode(void const *data, size_t dataSize, dwMediaType dataType, dwEncoderHandle_t encoder)
This function enqueues a codec packet.
dwEncoder_release
dwStatus dwEncoder_release(dwEncoderHandle_t encoder)
This function releases the encoder.
dwEncoder_returnPacket
dwStatus dwEncoder_returnPacket(dwCodecPacket *packet, dwEncoderHandle_t encoder)
This function returns the codec packet.
dwEncoderConfig
Encoder specific configs.
Definition: Codec.h:304
dwEncoder_drainPacket
dwStatus dwEncoder_drainPacket(dwCodecPacket *packet, dwEncoderHandle_t encoder)
This function drains previously queued encode requests.
dwMediaType
dwMediaType
Media Type for Codec.
Definition: Codec.h:47
dwEncoderHandle_t
struct dwCodecEncoderObject * dwEncoderHandle_t
Handle representing an encoder.
Definition: Encoder.h:41
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwCodecHeaderHandle_t
struct dwCodecHeaderObject * dwCodecHeaderHandle_t
CodecHeader handle.
Definition: CodecHeaderTypes.h:38
dwEncoder_initialize
dwStatus dwEncoder_initialize(dwEncoderHandle_t *encoder, dwCodecHeaderHandle_t config, dwEncoderConfig const *encoderConfig, dwContextHandle_t context)
This function initializes the encoder.
dwCodecPacket
Generic struct storing data output from codec.
Definition: Codec.h:240