diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-29 22:22:46 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-29 22:22:46 +0200 |
commit | dfe2b176487ee7937aec7ef3b9134ff7fa97dfa1 (patch) | |
tree | 6b885bb37d8088c3c35d870a2897bff086cf2860 /include/encoder | |
parent | 1b356677ea281a10f89eb21365d7182ae6019360 (diff) |
Prepare for video codec query, cleanup readme, add libva-drm as dependency
Diffstat (limited to 'include/encoder')
-rw-r--r-- | include/encoder/video/video.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/encoder/video/video.h b/include/encoder/video/video.h index 21338d6..899357a 100644 --- a/include/encoder/video/video.h +++ b/include/encoder/video/video.h @@ -8,7 +8,20 @@ typedef struct gsr_video_encoder gsr_video_encoder; typedef struct AVCodecContext AVCodecContext; typedef struct AVFrame AVFrame; +typedef struct { + bool h264; + bool hevc; + bool hevc_hdr; + bool hevc_10bit; + bool av1; + bool av1_hdr; + bool av1_10bit; + bool vp8; + bool vp9; +} gsr_supported_video_codecs; + struct gsr_video_encoder { + gsr_supported_video_codecs (*get_supported_codecs)(gsr_video_encoder *encoder, bool cleanup); bool (*start)(gsr_video_encoder *encoder, AVCodecContext *video_codec_context, AVFrame *frame); void (*copy_textures_to_frame)(gsr_video_encoder *encoder, AVFrame *frame); /* Can be NULL */ /* |textures| should be able to fit 2 elements */ @@ -19,6 +32,7 @@ struct gsr_video_encoder { bool started; }; +gsr_supported_video_codecs gsr_video_encoder_get_supported_codecs(gsr_video_encoder *encoder, bool cleanup); bool gsr_video_encoder_start(gsr_video_encoder *encoder, AVCodecContext *video_codec_context, AVFrame *frame); void gsr_video_encoder_copy_textures_to_frame(gsr_video_encoder *encoder, AVFrame *frame); void gsr_video_encoder_get_textures(gsr_video_encoder *encoder, unsigned int *textures, int *num_textures, gsr_destination_color *destination_color); |