Various backend improvements are included in this commit, mostly for the benefit of exporting. These include: - Moving more non-GL code from OpenGL derivatives into base classes - An "export mode" that changes the cache behavior of video backends - Using the Viewer's UUID introduced a few commits ago - No longer hardcoding the pixel format/render mode in the backend (since they'll inevitably differ when exporting vs previewing) - Improved signalling for frames that are completed
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#ifndef AUDIORENDERBACKEND_H
|
|
#define AUDIORENDERBACKEND_H
|
|
|
|
#include "common/timerange.h"
|
|
#include "renderbackend.h"
|
|
|
|
class AudioRenderBackend : public RenderBackend
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
AudioRenderBackend(QObject* parent = nullptr);
|
|
|
|
/**
|
|
* @brief Set parameters of the Renderer
|
|
*
|
|
* The Renderer owns the buffers that are used in the rendering process and this function sets the kind of buffers
|
|
* to use. The Renderer must be stopped when calling this function.
|
|
*/
|
|
void SetParameters(const AudioRenderingParams ¶ms);
|
|
|
|
virtual QIODevice* GetAudioPullDevice() = 0;
|
|
|
|
const AudioRenderingParams& params();
|
|
|
|
public slots:
|
|
virtual void InvalidateCache(const rational &start_range, const rational &end_range) override;
|
|
|
|
protected:
|
|
virtual void ConnectViewer(ViewerOutput* node) override;
|
|
|
|
virtual void DisconnectViewer(ViewerOutput* node) override;
|
|
|
|
/**
|
|
* @brief Internal function for generating the cache ID
|
|
*/
|
|
virtual bool GenerateCacheIDInternal(QCryptographicHash& hash) override;
|
|
|
|
virtual NodeInput* GetDependentInput() override;
|
|
|
|
QString CachePathName();
|
|
|
|
virtual bool CanRender() override;
|
|
|
|
private:
|
|
void ValidateRanges();
|
|
|
|
AudioRenderingParams params_;
|
|
|
|
};
|
|
|
|
#endif // AUDIORENDERBACKEND_H
|