@@ -38,6 +38,7 @@ class FFMPEG_API_DLL Recorder {
38
38
* @return true if initialization is successful, false otherwise.
39
39
*/
40
40
geode::Result<> init (const RenderSettings& settings);
41
+
41
42
/* *
42
43
* @brief Stops the recording process and finalizes the output file.
43
44
*
@@ -75,24 +76,29 @@ class FFMPEG_API_DLL Recorder {
75
76
geode::Result<> filterFrame (AVFrame* inputFrame, AVFrame* outputFrame);
76
77
77
78
private:
78
- AVFormatContext* m_formatContext = nullptr ;
79
- const AVCodec* m_codec = nullptr ;
80
- AVStream* m_videoStream = nullptr ;
81
- AVCodecContext* m_codecContext = nullptr ;
82
- AVBufferRef* m_hwDevice = nullptr ;
83
- AVFrame* m_frame = nullptr ;
84
- AVFrame* m_convertedFrame = nullptr ;
85
- AVFrame* m_filteredFrame = nullptr ;
86
- AVPacket* m_packet = nullptr ;
87
- SwsContext* m_swsCtx = nullptr ;
88
- AVFilterGraph* m_filterGraph = nullptr ;
89
- AVFilterContext* m_buffersrcCtx = nullptr ;
90
- AVFilterContext* m_buffersinkCtx = nullptr ;
91
- AVFilterContext* m_colorspaceCtx = nullptr ;
92
- AVFilterContext* m_vflipCtx = nullptr ;
79
+ class Impl {
80
+ public:
81
+ AVFormatContext* m_formatContext = nullptr ;
82
+ const AVCodec* m_codec = nullptr ;
83
+ AVStream* m_videoStream = nullptr ;
84
+ AVCodecContext* m_codecContext = nullptr ;
85
+ AVBufferRef* m_hwDevice = nullptr ;
86
+ AVFrame* m_frame = nullptr ;
87
+ AVFrame* m_convertedFrame = nullptr ;
88
+ AVFrame* m_filteredFrame = nullptr ;
89
+ AVPacket* m_packet = nullptr ;
90
+ SwsContext* m_swsCtx = nullptr ;
91
+ AVFilterGraph* m_filterGraph = nullptr ;
92
+ AVFilterContext* m_buffersrcCtx = nullptr ;
93
+ AVFilterContext* m_buffersinkCtx = nullptr ;
94
+ AVFilterContext* m_colorspaceCtx = nullptr ;
95
+ AVFilterContext* m_vflipCtx = nullptr ;
96
+
97
+ size_t m_frameCount = 0 ;
98
+ bool m_init = false ;
99
+ };
93
100
94
- size_t m_frameCount = 0 ;
95
- bool m_init = false ;
101
+ std::unique_ptr<Impl> m_impl = nullptr ;
96
102
};
97
103
98
104
END_FFMPEG_NAMESPACE_V
0 commit comments