H.264 Codec for ESP32-S3
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
esp_h264_enc_param.h File Reference
#include "esp_h264_types.h"
Include dependency graph for esp_h264_enc_param.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  esp_h264_enc_param_if
 The H.264 encoder parameter interface. More...
 

Typedefs

typedef struct esp_h264_enc_param_ifesp_h264_enc_param_handle_t
 It is a pointer to the H.264 encoding parameters structure.
 
typedef struct esp_h264_enc_param_if esp_h264_enc_param_t
 The H.264 encoder parameter interface.
 

Functions

esp_h264_err_t esp_h264_enc_get_resolution (esp_h264_enc_param_handle_t handle, esp_h264_resolution_t *out_res)
 This function retrieves the resolution of the video encoder specified by the handle parameter The encoder's resolution is stored in the res, which is of type esp_h264_resolution_t.
 
esp_h264_err_t esp_h264_enc_set_fps (esp_h264_enc_param_handle_t handle, uint8_t fps)
 This function sets the frames per second (FPS) parameter for the H.264 encoder.
 
esp_h264_err_t esp_h264_enc_get_fps (esp_h264_enc_param_handle_t handle, uint8_t *out_fps)
 This function is used to retrieve the frames per second (FPS) from the encoder.
 
esp_h264_err_t esp_h264_enc_set_gop (esp_h264_enc_param_handle_t handle, uint8_t gop)
 This function sets the group of picture(GOP) parameter for the H.264 encoder.
 
esp_h264_err_t esp_h264_enc_get_gop (esp_h264_enc_param_handle_t handle, uint8_t *out_gop)
 This function is used to retrieve the group of picture(GOP) from the encoder.
 
esp_h264_err_t esp_h264_enc_set_bitrate (esp_h264_enc_param_handle_t handle, uint32_t bitrate)
 This function sets the bitrate parameter for the H.264 encoder.
 
esp_h264_err_t esp_h264_enc_get_bitrate (esp_h264_enc_param_handle_t handle, uint32_t *out_bitrate)
 This function is used to retrieve the bitrate from the encoder.
 
esp_h264_err_t esp_h264_enc_get_bpp (esp_h264_enc_param_handle_t handle, float *out_bpp)
 This function is used to retrieve the bits per pixel from the encoder.
 

Typedef Documentation

◆ esp_h264_enc_param_handle_t

It is a pointer to the H.264 encoding parameters structure.

◆ esp_h264_enc_param_t

The H.264 encoder parameter interface.

Function Documentation

◆ esp_h264_enc_get_bitrate()

esp_h264_err_t esp_h264_enc_get_bitrate ( esp_h264_enc_param_handle_t  handle,
uint32_t *  out_bitrate 
)

This function is used to retrieve the bitrate from the encoder.

Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure
[out]out_bitratePointer to a variable to store the retrieved bitrate value
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed
  • ESP_H264_ERR_UNSUPPORTED Get bitrate feature is not supported by the encoder

◆ esp_h264_enc_get_bpp()

esp_h264_err_t esp_h264_enc_get_bpp ( esp_h264_enc_param_handle_t  handle,
float *  out_bpp 
)

This function is used to retrieve the bits per pixel from the encoder.

Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure
[out]out_bppPointer to a variable to store the retrieved bits per pixel value
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed

◆ esp_h264_enc_get_fps()

esp_h264_err_t esp_h264_enc_get_fps ( esp_h264_enc_param_handle_t  handle,
uint8_t *  out_fps 
)

This function is used to retrieve the frames per second (FPS) from the encoder.

Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure
[out]out_fpsPointer to a variable to store the retrieved FPS value
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed
  • ESP_H264_ERR_UNSUPPORTED Get FPS feature is not supported by the encoder

◆ esp_h264_enc_get_gop()

esp_h264_err_t esp_h264_enc_get_gop ( esp_h264_enc_param_handle_t  handle,
uint8_t *  out_gop 
)

This function is used to retrieve the group of picture(GOP) from the encoder.

Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure.
[out]out_gopPointer to a variable to store the retrieved GOP value
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed
  • ESP_H264_ERR_UNSUPPORTED Get GOP feature is not supported by the encoder

◆ esp_h264_enc_get_resolution()

esp_h264_err_t esp_h264_enc_get_resolution ( esp_h264_enc_param_handle_t  handle,
esp_h264_resolution_t out_res 
)

This function retrieves the resolution of the video encoder specified by the handle parameter The encoder's resolution is stored in the res, which is of type esp_h264_resolution_t.

Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure
[out]out_resA pointer to the resolution structure where the encoder's resolution will be stored
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed
  • ESP_H264_ERR_UNSUPPORTED Get resolution feature is not supported by the encoder

◆ esp_h264_enc_set_bitrate()

esp_h264_err_t esp_h264_enc_set_bitrate ( esp_h264_enc_param_handle_t  handle,
uint32_t  bitrate 
)

This function sets the bitrate parameter for the H.264 encoder.

Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure
[in]bitrateThe desired bitrate value
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed
  • ESP_H264_ERR_UNSUPPORTED Set bitrate feature is not supported by the encoder

◆ esp_h264_enc_set_fps()

esp_h264_err_t esp_h264_enc_set_fps ( esp_h264_enc_param_handle_t  handle,
uint8_t  fps 
)

This function sets the frames per second (FPS) parameter for the H.264 encoder.

Note
The higher FPS, the more coherent and realistic the video. When FPS is greater than 24, the general video seems coherent. When FPS is greater than 30, the game video seems coherent. When FPS is greater than 75, increase FPS, the video fluency improvement isn't obvious. Ensure the fps value is within the range of 1 to 255. This function may return ESP_H264_ERR_ARG if fps value is out of range.
Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure
[in]fpsThe desired FPS value (a single byte)
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed
  • ESP_H264_ERR_UNSUPPORTED Set FPS feature is not supported by the encoder

◆ esp_h264_enc_set_gop()

esp_h264_err_t esp_h264_enc_set_gop ( esp_h264_enc_param_handle_t  handle,
uint8_t  gop 
)

This function sets the group of picture(GOP) parameter for the H.264 encoder.

Note
GOP is usually set to the number of frames per second output by the encoder, that is, the GOP, which is generally 25 or 30, but other values can also be set. Ensure the gop value is within the range of 1 to 255. This function may return ESP_H264_ERR_ARG if gop value is out of range.
Parameters
[in]handleIt is a pointer to the H.264 encoding parameters structure.
[in]gopThe desired GOP value (a single byte)
Returns
  • ESP_H264_ERR_OK Succeeded
  • ESP_H264_ERR_ARG Invalid arguments passed
  • ESP_H264_ERR_UNSUPPORTED Set GOP feature is not supported by the encoder