H.264 Codec for ESP32-S3
Loading...
Searching...
No Matches
esp_h264_enc_sw_param.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#pragma once
8
9#include <string.h>
11#include "codec_api.h"
12#include "codec_app_def.h"
13#include "codec_def.h"
14#include "esp_h264_check.h"
15#include "esp_h264_alloc.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define ESP_H264_SW_MIN_WIDTH (16)
22#define ESP_H264_SW_MIN_HEIGHT (16)
23
24/**
25 * @brief Configuration structure for software-based H.264 encoder parameters
26 */
27typedef struct esp_h264_set_cfg {
28 ISVCEncoder *device; /*<! Device handle that configure encoders by `WelsCreateSVCEncoder`*/
29} esp_h264_enc_sw_param_cfg_t;
30
31/**
32 * @brief Create a new parameter set handle
33 *
34 * @param cfg It is a pointer to the `esp_h264_enc_hw_param_cfg_t` structure, which contains the configuration settings for the handle
35 * @param handle Hardware H.264 encoder parameter set handle.
36 * If return value isn't `ESP_H264_ERR_OK`, `handle` will be set NULL
37 *
38 * @return
39 * - ESP_H264_ERR_OK Succeeded
40 * - ESP_H264_ERR_ARG Invalid arguments passed
41 * - ESP_H264_ERR_MEM Insufficient memory, the `*handle` will be set NULL
42 *
43 */
44esp_h264_err_t esp_h264_enc_sw_new_param(esp_h264_enc_sw_param_cfg_t *cfg, esp_h264_enc_param_t **handle);
45
46/**
47 * @brief Delete parameter set handle
48 *
49 * @param handle Hardware H.264 encoder parameter set handle
50 *
51 * @return
52 * - ESP_H264_ERR_OK Succeeded
53 */
54esp_h264_err_t esp_h264_enc_sw_del_param(esp_h264_enc_param_t *handle);
55
56#ifdef __cplusplus
57}
58#endif
esp_h264_err_t esp_h264_enc_sw_del_param(esp_h264_enc_param_t *handle)
Delete parameter set handle.
Definition: esp_h264_enc_sw_param.c:102
esp_h264_err_t esp_h264_enc_sw_new_param(esp_h264_enc_sw_param_cfg_t *cfg, esp_h264_enc_param_t **handle)
Create a new parameter set handle.
Definition: esp_h264_enc_sw_param.c:111
Configuration structure for software-based H.264 encoder parameters.
Definition: esp_h264_enc_sw_param.h:27
ISVCEncoder * device
Definition: esp_h264_enc_sw_param.h:28