Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ Also note that support for other *current* operating systems (typically, other L

See [THIRD-PARTY.md](THIRD-PARTY.md) for license information about portions of Open RV that have been imported from other projects.

## Random change to test CI

Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,20 @@
#include <GL/glu.h>
#endif

#if defined(PLATFORM_DARWIN)
#include <TwkGLF/GL.h>
#endif

#include <TwkGLF/GLFBO.h>
#include <TwkGLF/GLFence.h>
#include <iostream>
#include <stl_ext/thread_group.h>
#include <deque>
#include <BlackMagicDevices/HDRVideoFrame.h>
#include <BlackMagicDevices/StereoVideoFrame.h>

namespace BlackMagicDevices
{
class BlackMagicModule;
class PinnedMemoryAllocator;

typedef boost::mutex::scoped_lock ScopedLock;
typedef boost::mutex Mutex;
typedef boost::condition_variable Condition;
using ScopedLock = boost::mutex::scoped_lock;
using Mutex = boost::mutex;
using Condition = boost::condition_variable;

struct DeckLinkDataFormat
{
Expand Down Expand Up @@ -78,8 +72,8 @@ namespace BlackMagicDevices
const char* desc{nullptr};
};

typedef std::vector<DeckLinkVideoFormat> DeckLinkVideoFormatVector;
typedef std::vector<DeckLinkDataFormat> DeckLinkDataFormatVector;
using DeckLinkVideoFormatVector = std::vector<DeckLinkVideoFormat>;
using DeckLinkDataFormatVector = std::vector<DeckLinkDataFormat>;

struct DeckLinkVideo4KTransport
{
Expand All @@ -99,15 +93,16 @@ namespace BlackMagicDevices
// Types
//

typedef TwkUtil::Timer Timer;
typedef TwkGLF::GLFence GLFence;
typedef TwkGLF::GLFBO GLFBO;
typedef std::vector<unsigned char*> BufferVector;
typedef stl_ext::thread_group ThreadGroup;
typedef std::vector<int> AudioBuffer;
typedef std::map<void*, StereoVideoFrame*> StereoFrameMap;
typedef std::map<void*, HDRVideoFrame*> HDRVideoFrameMap;
typedef std::deque<IDeckLinkMutableVideoFrame*> DLVideoFrameDeque;
using Timer = TwkUtil::Timer;
using GLFence = TwkGLF::GLFence;
using GLFBO = TwkGLF::GLFBO;
using BufferVector = std::vector<unsigned char*>;
using ThreadGroup = stl_ext::thread_group;
using AudioBuffer = std::vector<int>;
using StereoFrameMap =
std::map<IDeckLinkMutableVideoFrame*,
std::unique_ptr<StereoVideoFrame::Provider>>;
using DLVideoFrameDeque = std::deque<IDeckLinkMutableVideoFrame*>;

struct PBOData
{
Expand All @@ -119,7 +114,7 @@ namespace BlackMagicDevices
Ready
};

PBOData(GLuint g);
explicit PBOData(GLuint g);
~PBOData();

void lockData();
Expand Down Expand Up @@ -152,7 +147,29 @@ namespace BlackMagicDevices
IDeckLinkVideoFrame* videoFrame{nullptr};
};

typedef std::deque<PBOData*> PBOQueue;
struct ChromaticityCoordinates
{
double RedX{0.0};
double RedY{0.0};
double GreenX{0.0};
double GreenY{0.0};
double BlueX{0.0};
double BlueY{0.0};
double WhiteX{0.0};
double WhiteY{0.0};
};

struct HDRMetadata
{
ChromaticityCoordinates referencePrimaries;
double minDisplayMasteringLuminance{0.0};
double maxDisplayMasteringLuminance{0.0};
double maxContentLightLevel{0.0};
double maxFrameAverageLightLevel{0.0};
int64_t electroOpticalTransferFunction{0};
};

using PBOQueue = std::deque<PBOData*>;

//
// Constructors
Expand Down Expand Up @@ -259,24 +276,27 @@ namespace BlackMagicDevices
IDeckLinkMutableVideoFrame*,
IDeckLinkMutableVideoFrame*) const;
void ScheduleFrame() const;
size_t bytesPerRow(BMDPixelFormat bmdFormat, size_t width) const;

std::string dumpHDRMetadata() const;
bool parseHDRMetadata(const std::string& data);
void setHDRMetadataOnFrame(IDeckLinkVideoFrame* frame) const;

private:
DeckLinkVideoFormatVector m_decklinkVideoFormats;
DeckLinkDataFormatVector m_decklinkDataFormats;
bool m_supportsStereo;
mutable size_t m_firstThreeCounter;
mutable IDeckLinkMutableVideoFrame* m_readyFrame;
mutable StereoVideoFrame* m_readyStereoFrame;
mutable StereoVideoFrame::Provider* m_readyStereoFrame;
mutable DLVideoFrameDeque m_DLOutputVideoFrameQueue;
mutable DLVideoFrameDeque
m_DLReadbackVideoFrameQueue; // only rgb formats
mutable bool m_needsFrameConverter;
mutable bool m_hasAudio;
mutable StereoFrameMap
m_rightEyeToStereoFrameMap; // indexed by the left eye
mutable HDRVideoFrameMap m_FrameToHDRFrameMap;
mutable PBOQueue m_pboQueue;
HDRMetadata s_hdrMetadata;
IDeckLinkOutput* m_outputAPI;
IDeckLink* m_deviceAPI;
IDeckLinkConfiguration* m_configuration;
Expand Down

This file was deleted.

Loading
Loading