replace direct ownership
This commit is contained in:
@@ -52,6 +52,13 @@ struct VideoOutputEdgeMetrics
|
||||
uint64_t scheduleRealignmentCount = 0;
|
||||
};
|
||||
|
||||
struct VideoOutputEdgeConfig
|
||||
{
|
||||
VideoFormat outputVideoMode;
|
||||
bool externalKeyingEnabled = false;
|
||||
bool outputAlphaRequired = false;
|
||||
};
|
||||
|
||||
class IVideoOutputEdge
|
||||
{
|
||||
public:
|
||||
@@ -59,6 +66,7 @@ public:
|
||||
|
||||
virtual ~IVideoOutputEdge() = default;
|
||||
|
||||
virtual bool Initialize(const VideoOutputEdgeConfig& config, CompletionCallback completionCallback, std::string& error) = 0;
|
||||
virtual bool StartScheduledPlayback(std::string& error) = 0;
|
||||
virtual bool ScheduleFrame(const VideoIOOutputFrame& frame) = 0;
|
||||
virtual void Stop() = 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ DeckLinkOutput::~DeckLinkOutput()
|
||||
ReleaseResources();
|
||||
}
|
||||
|
||||
bool DeckLinkOutput::Initialize(const DeckLinkOutputConfig& config, CompletionCallback completionCallback, std::string& error)
|
||||
bool DeckLinkOutput::Initialize(const VideoOutputEdgeConfig& config, CompletionCallback completionCallback, std::string& error)
|
||||
{
|
||||
mConfig = config;
|
||||
mCompletionCallback = completionCallback;
|
||||
|
||||
@@ -12,13 +12,7 @@
|
||||
|
||||
namespace RenderCadenceCompositor
|
||||
{
|
||||
struct DeckLinkOutputConfig
|
||||
{
|
||||
VideoFormat outputVideoMode;
|
||||
bool externalKeyingEnabled = false;
|
||||
bool outputAlphaRequired = false;
|
||||
};
|
||||
|
||||
using DeckLinkOutputConfig = VideoOutputEdgeConfig;
|
||||
using DeckLinkOutputMetrics = VideoOutputEdgeMetrics;
|
||||
|
||||
class DeckLinkOutput : public IVideoOutputEdge
|
||||
@@ -31,7 +25,7 @@ public:
|
||||
DeckLinkOutput& operator=(const DeckLinkOutput&) = delete;
|
||||
~DeckLinkOutput();
|
||||
|
||||
bool Initialize(const DeckLinkOutputConfig& config, CompletionCallback completionCallback, std::string& error);
|
||||
bool Initialize(const VideoOutputEdgeConfig& config, CompletionCallback completionCallback, std::string& error) override;
|
||||
bool StartScheduledPlayback(std::string& error) override;
|
||||
bool ScheduleFrame(const VideoIOOutputFrame& frame) override;
|
||||
void Stop() override;
|
||||
@@ -44,7 +38,7 @@ private:
|
||||
void HandleCompletion(const VideoIOCompletion& completion);
|
||||
|
||||
DeckLinkSession mSession;
|
||||
DeckLinkOutputConfig mConfig;
|
||||
VideoOutputEdgeConfig mConfig;
|
||||
CompletionCallback mCompletionCallback;
|
||||
std::atomic<uint64_t> mCompletions{ 0 };
|
||||
std::atomic<uint64_t> mDisplayedLate{ 0 };
|
||||
|
||||
Reference in New Issue
Block a user