mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-04-20 08:55:48 +09:00
Move codec query from encoder to separate file
This commit is contained in:
18
include/codec_query/codec_query.h
Normal file
18
include/codec_query/codec_query.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef GSR_CODEC_QUERY_H
|
||||
#define GSR_CODEC_QUERY_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
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;
|
||||
|
||||
#endif /* GSR_CODEC_QUERY_H */
|
||||
8
include/codec_query/cuda.h
Normal file
8
include/codec_query/cuda.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GSR_CODEC_QUERY_CUDA_H
|
||||
#define GSR_CODEC_QUERY_CUDA_H
|
||||
|
||||
#include "codec_query.h"
|
||||
|
||||
bool gsr_get_supported_video_codecs_nvenc(gsr_supported_video_codecs *video_codecs, bool cleanup);
|
||||
|
||||
#endif /* GSR_CODEC_QUERY_CUDA_H */
|
||||
8
include/codec_query/vaapi.h
Normal file
8
include/codec_query/vaapi.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GSR_CODEC_QUERY_VAAPI_H
|
||||
#define GSR_CODEC_QUERY_VAAPI_H
|
||||
|
||||
#include "codec_query.h"
|
||||
|
||||
bool gsr_get_supported_video_codecs_vaapi(gsr_supported_video_codecs *video_codecs, const char *card_path, bool cleanup);
|
||||
|
||||
#endif /* GSR_CODEC_QUERY_VAAPI_H */
|
||||
@@ -8,20 +8,7 @@ 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 */
|
||||
@@ -32,7 +19,6 @@ 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);
|
||||
|
||||
Reference in New Issue
Block a user