#ifndef _VENC_H264_H_
#define _VENC_H264_H_
#include <stdint.h>
#include <h264/h264.h>
#include <media-buffers/mbuf_coded_video_frame.h>
#include <media-buffers/mbuf_mem.h>
#include <media-buffers/mbuf_mem_generic.h>
#include <media-buffers/mbuf_raw_video_frame.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef VENC_API_EXPORTS
# ifdef _WIN32
# define VENC_API __declspec(dllexport)
# else
# define VENC_API __attribute__((visibility("default")))
# endif
#else
# define VENC_API
#endif
VENC_API int venc_h264_writer_new(const uint8_t *sps,
size_t sps_size,
const uint8_t *pps,
size_t pps_size,
struct h264_ctx **ret_obj);
VENC_API int venc_h264_writer_destroy(struct h264_ctx *h264);
VENC_API int venc_h264_aud_write(struct h264_ctx *h264,
struct mbuf_coded_video_frame *frame);
VENC_API int venc_h264_sps_pps_copy(struct h264_ctx *h264,
struct mbuf_coded_video_frame *frame,
const uint8_t *sps,
size_t sps_size,
const uint8_t *pps,
size_t pps_size);
VENC_API int venc_h264_sei_reset(struct h264_ctx *h264);
VENC_API int venc_h264_sei_add_recovery_point(struct h264_ctx *h264,
unsigned int recovery_frame_cnt);
VENC_API int venc_h264_sei_add_picture_timing(struct h264_ctx *h264,
uint64_t timestamp);
VENC_API int
venc_h264_sei_add_parrot_streaming_v2_user_data(struct h264_ctx *h264,
unsigned int slice_count,
unsigned int slice_mb_count);
VENC_API int venc_h264_sei_add_parrot_streaming_v4_user_data(
struct h264_ctx *h264,
unsigned int slice_mb_count,
unsigned int slice_mb_count_recovery_point);
VENC_API int venc_h264_sei_add_user_data(struct h264_ctx *h264,
const uint8_t *data,
size_t len);
VENC_API int venc_h264_sei_write(struct h264_ctx *h264,
struct mbuf_coded_video_frame *frame);
VENC_API int venc_h264_generate_nalus(struct venc_encoder *self,
struct mbuf_coded_video_frame *frame,
const struct vdef_coded_frame *info);
VENC_API int
venc_h264_format_convert(struct mbuf_coded_video_frame *frame,
const struct vdef_coded_format *target_format);
#ifdef __cplusplus
}
#endif
#endif