hwapi/base: Improve frame allocation method

This allows us to cache existing frames, reducing the CPU and GPU memory load that appears due to constantly recreating frames.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-10-03 19:18:44 +02:00
parent d3f7b15633
commit 650b397ced
+5
View File
@@ -55,6 +55,11 @@ namespace obsffmpeg {
public:
virtual AVBufferRef* create_device_context() = 0;
virtual std::shared_ptr<AVFrame> allocate_frame(AVBufferRef* frames) = 0;
virtual void copy_from_obs(AVBufferRef* frames, uint32_t handle, uint64_t lock_key,
uint64_t* next_lock_key, std::shared_ptr<AVFrame> frame) = 0;
virtual std::shared_ptr<AVFrame> avframe_from_obs(AVBufferRef* frames, uint32_t handle, uint64_t lock_key,
uint64_t* next_lock_key) = 0;
};