56 lines
1.8 KiB
C++
56 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include "VideoIOTypes.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
class HealthTelemetry;
|
|
class OpenGLVideoIOBridge;
|
|
class RenderEngine;
|
|
class VideoIODevice;
|
|
|
|
class VideoBackend
|
|
{
|
|
public:
|
|
VideoBackend(RenderEngine& renderEngine, HealthTelemetry& healthTelemetry);
|
|
~VideoBackend();
|
|
|
|
void ReleaseResources();
|
|
bool DiscoverDevicesAndModes(const VideoFormatSelection& videoModes, std::string& error);
|
|
bool SelectPreferredFormats(const VideoFormatSelection& videoModes, bool outputAlphaRequired, std::string& error);
|
|
bool ConfigureInput(const VideoFormat& inputVideoMode, std::string& error);
|
|
bool ConfigureOutput(const VideoFormat& outputVideoMode, bool externalKeyingEnabled, std::string& error);
|
|
bool Start();
|
|
bool Stop();
|
|
|
|
const VideoIOState& State() const;
|
|
VideoIOState& MutableState();
|
|
bool BeginOutputFrame(VideoIOOutputFrame& frame);
|
|
void EndOutputFrame(VideoIOOutputFrame& frame);
|
|
bool ScheduleOutputFrame(const VideoIOOutputFrame& frame);
|
|
void AccountForCompletionResult(VideoIOCompletionResult result);
|
|
|
|
bool HasInputDevice() const;
|
|
bool HasInputSource() const;
|
|
unsigned InputFrameWidth() const;
|
|
unsigned InputFrameHeight() const;
|
|
unsigned OutputFrameWidth() const;
|
|
unsigned OutputFrameHeight() const;
|
|
unsigned CaptureTextureWidth() const;
|
|
unsigned OutputPackTextureWidth() const;
|
|
VideoIOPixelFormat InputPixelFormat() const;
|
|
const std::string& InputDisplayModeName() const;
|
|
const std::string& OutputModelName() const;
|
|
bool SupportsInternalKeying() const;
|
|
bool SupportsExternalKeying() const;
|
|
bool KeyerInterfaceAvailable() const;
|
|
bool ExternalKeyingActive() const;
|
|
const std::string& StatusMessage() const;
|
|
void SetStatusMessage(const std::string& message);
|
|
|
|
private:
|
|
std::unique_ptr<VideoIODevice> mVideoIODevice;
|
|
std::unique_ptr<OpenGLVideoIOBridge> mBridge;
|
|
};
|