#ifndef _VENC_H265_H_
#define _VENC_H265_H_
#include <stdint.h>
#include <h265/h265.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_h265_writer_new(const uint8_t *vps,
size_t vps_size,
const uint8_t *sps,
size_t sps_size,
const uint8_t *pps,
size_t pps_size,
struct h265_ctx **ret_obj);
VENC_API int venc_h265_writer_destroy(struct h265_ctx *h265);
VENC_API int venc_h265_aud_write(struct h265_ctx *h265,
struct mbuf_coded_video_frame *frame);
VENC_API int venc_h265_ps_copy(struct h265_ctx *h265,
struct mbuf_coded_video_frame *frame,
const uint8_t *vps,
size_t vps_size,
const uint8_t *sps,
size_t sps_size,
const uint8_t *pps,
size_t pps_size);
VENC_API int venc_h265_sei_reset(struct h265_ctx *h265);
VENC_API int venc_h265_sei_add_recovery_point(struct h265_ctx *h265,
unsigned int recovery_poc_cnt);
VENC_API int venc_h265_sei_add_time_code(struct h265_ctx *h265,
uint64_t timestamp);
VENC_API int venc_h265_sei_add_mdcv(struct h265_ctx *h265,
const struct vdef_format_info *format);
VENC_API int venc_h265_sei_add_cll(struct h265_ctx *h265,
const struct vdef_format_info *format);
VENC_API int venc_h265_sei_add_user_data(struct h265_ctx *h265,
const uint8_t *data,
size_t len);
VENC_API int venc_h265_sei_write(struct h265_ctx *h265,
struct mbuf_coded_video_frame *frame);
VENC_API int venc_h265_generate_nalus(struct venc_encoder *self,
struct mbuf_coded_video_frame *frame,
const struct vdef_coded_frame *info);
VENC_API int
venc_h265_format_convert(struct mbuf_coded_video_frame *frame,
const struct vdef_coded_format *target_format);
#ifdef __cplusplus
}
#endif
#endif