aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/recorder/video_codec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/recorder/video_codec.h')
-rw-r--r--include/recorder/video_codec.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/recorder/video_codec.h b/include/recorder/video_codec.h
new file mode 100644
index 0000000..9347a9e
--- /dev/null
+++ b/include/recorder/video_codec.h
@@ -0,0 +1,18 @@
+#ifndef GSR_RECORDER_VIDEO_CODEC_H
+#define GSR_RECORDER_VIDEO_CODEC_H
+
+#include <stdbool.h>
+#include "../defs.h"
+#include "../egl.h"
+#include "settings.h"
+
+#include <libavcodec/avcodec.h>
+
+int video_quality_to_h264_equivalent_qp(gsr_video_quality video_quality);
+enum AVPixelFormat get_pixel_format(gsr_video_codec video_codec, gsr_gpu_vendor vendor, bool use_software_video_encoder);
+
+AVCodecContext* create_video_codec_context(enum AVPixelFormat pix_fmt, const AVCodec *codec, const gsr_egl *egl, const gsr_recorder_settings *settings, int width, int height);
+bool open_video_software(AVCodecContext *codec_context, const gsr_recorder_settings *settings);
+bool open_video_hardware(AVCodecContext *codec_context, bool low_power, const gsr_egl *egl, const gsr_recorder_settings *settings);
+
+#endif /* GSR_RECORDER_VIDEO_CODEC_H */