initial commit
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
#pragma once
|
||||
|
||||
#include "IVideoFeed.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
struct MxlInstanceHandle;
|
||||
|
||||
#if MXL_MULTIVIEWER_ENABLE_MXL_SDK
|
||||
|
||||
#include <mxl/flow.h>
|
||||
#include <mxl/mxl.h>
|
||||
#include <mxl/rational.h>
|
||||
#include <mxl/time.h>
|
||||
|
||||
#endif
|
||||
|
||||
class MxlSdkFeed : public IVideoFeed
|
||||
{
|
||||
public:
|
||||
MxlSdkFeed(
|
||||
const std::string& domain,
|
||||
const std::string& flowId,
|
||||
uint32_t outputWidth,
|
||||
uint32_t outputHeight,
|
||||
bool verbose = false);
|
||||
|
||||
~MxlSdkFeed() override;
|
||||
|
||||
MxlSdkFeed(const MxlSdkFeed&) = delete;
|
||||
MxlSdkFeed& operator=(const MxlSdkFeed&) = delete;
|
||||
|
||||
const VideoFrame& getFrame(uint32_t frameCounter) override;
|
||||
FeedRuntimeStatus status() const override;
|
||||
std::string displayName() const override;
|
||||
std::string sourceInfo() const override;
|
||||
uint64_t frameVersion() const override;
|
||||
bool hasGrainIndex() const override;
|
||||
uint64_t grainIndex() const override;
|
||||
|
||||
float srcAspectRatio() const override;
|
||||
|
||||
bool hasV210() const override;
|
||||
const uint8_t* v210Data() const override;
|
||||
uint32_t v210Width() const override;
|
||||
uint32_t v210Height() const override;
|
||||
uint32_t v210Stride() const override;
|
||||
|
||||
private:
|
||||
bool openFlow();
|
||||
void closeFlow();
|
||||
|
||||
std::string mDomain;
|
||||
std::string mFlowId;
|
||||
std::string mFlowName;
|
||||
|
||||
VideoFrame mFrame;
|
||||
|
||||
#if MXL_MULTIVIEWER_ENABLE_MXL_SDK
|
||||
MxlInstanceHandle* mInstanceHandle = nullptr;
|
||||
mxlFlowReader mReader = nullptr;
|
||||
mxlRational mGrainRate{};
|
||||
uint64_t mLastDisplayedIndex = 0;
|
||||
uint32_t mSourceWidth = 0;
|
||||
uint32_t mSourceHeight = 0;
|
||||
uint32_t mSourceStride = 0;
|
||||
uint64_t mFrameVersion = 0;
|
||||
int mOpenRetryCount = 0;
|
||||
bool mVerbose = false;
|
||||
bool mFlowOpened = false;
|
||||
bool mFlowInvalid = false;
|
||||
const uint8_t* mV210Payload = nullptr;
|
||||
#endif
|
||||
};
|
||||
Reference in New Issue
Block a user