AJA NTV2 SDK  17.5.0.1658
NTV2 SDK 17.5.0.1658
ntv2overlay.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef _NTV2OVERLAY_H
9 #define _NTV2OVERLAY_H
10 
11 #include "ntv2card.h"
12 #include "ntv2formatdescriptor.h"
13 #include "ntv2democommon.h"
14 #include "ajabase/system/thread.h"
15 
17 
18 
23 {
24  // Public Instance Methods
25  public:
26  NTV2Overlay (const OverlayConfig & inConfig);
27  virtual ~NTV2Overlay ();
28  AJAStatus Init (void);
29  AJAStatus Run (void);
30  void Quit (void);
31 
32  // Protected Instance Methods
33  protected:
34  AJAStatus SetupVideo (void);
35  AJAStatus SetupAudio (void);
37  void ReleaseCaptureBuffers (void);
38  AJAStatus SetupOverlayBug (void);
40  void RouteInputSignal (void);
41  void RouteOverlaySignal (void);
42  void RouteOutputSignal (void);
43  void StartOutputThread (void);
44  void OutputThread (void);
45  void StartInputThread (void);
46  void InputThread (void);
47  inline UWord MixerNum (void) {return mConfig.fInputChannel / 2;}
48 
49  // Protected Class Methods
50  protected:
51  static void OutputThreadStatic (AJAThread * pThread, void * pInstance);
52  static void InputThreadStatic (AJAThread * pThread, void * pInstance);
53 
54  // Private Member Data
55  private:
56  OverlayConfig mConfig;
57  AJAThread mPlayThread;
58  AJAThread mCaptureThread;
59  CNTV2Card mDevice;
60  NTV2VideoFormat mVideoFormat;
61  NTV2LHIHDMIColorSpace mHDMIColorSpace;
62  NTV2Buffer mBug;
63  NTV2RasterInfo mBugRasterInfo;
64  NTV2TaskMode mSavedTaskMode;
65  NTV2FrameDataArray mBuffers;
66  FrameDataRingBuffer mAVCircularBuffer;
67  const NTV2PixelFormat mInputPixFormat;
68  const NTV2PixelFormat mOutputPixFormat;
69  bool mGlobalQuit;
70 
71 }; // NTV2Overlay
72 
73 #endif // _NTV2OVERLAY_H
NTV2TaskMode
enum NTV2EveryFrameTaskMode NTV2TaskMode
NTV2Overlay::SetupVideo
AJAStatus SetupVideo(void)
Performs all video setup.
Definition: ntv2overlay.cpp:133
NTV2Overlay::ReleaseCaptureBuffers
void ReleaseCaptureBuffers(void)
Frees capture buffers & ring.
Definition: ntv2overlay.cpp:227
NTV2LHIHDMIColorSpace
NTV2LHIHDMIColorSpace
Definition: ntv2enums.h:3648
NTV2FormatDescriptor
Describes a video frame for a given video standard or format and pixel format, including the total nu...
Definition: ntv2formatdescriptor.h:41
NTV2Buffer
Describes a user-space buffer on the host computer. I have an address and a length,...
Definition: ntv2publicinterface.h:6141
NTV2Overlay::InputThreadStatic
static void InputThreadStatic(AJAThread *pThread, void *pInstance)
Static output/playout thread function.
Definition: ntv2overlay.cpp:492
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:210
NTV2Overlay::SetupCaptureBuffers
AJAStatus SetupCaptureBuffers(void)
Allocates capture buffers & ring.
Definition: ntv2overlay.cpp:204
NTV2Overlay::RouteOutputSignal
void RouteOutputSignal(void)
Performs output routing.
Definition: ntv2overlay.cpp:182
NTV2Overlay::NTV2Overlay
NTV2Overlay(const OverlayConfig &inConfig)
Construct from OverlayConfig.
Definition: ntv2overlay.cpp:29
NTV2Overlay::OutputThread
void OutputThread(void)
The output/playout thread function.
Definition: ntv2overlay.cpp:386
NTV2Overlay::~NTV2Overlay
virtual ~NTV2Overlay()
My destructor.
Definition: ntv2overlay.cpp:44
AJAThread
Definition: thread.h:69
NTV2Overlay::Run
AJAStatus Run(void)
Runs me (only after Init called)
Definition: ntv2overlay.cpp:345
AJAStatus
AJAStatus
Definition: types.h:378
ntv2card.h
Declares the CNTV2Card class.
UWord
uint16_t UWord
Definition: ajatypes.h:253
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2Overlay::Init
AJAStatus Init(void)
Prepares me to Run()
Definition: ntv2overlay.cpp:74
NTV2Overlay::RouteInputSignal
void RouteInputSignal(void)
Performs input routing.
Definition: ntv2overlay.cpp:165
NTV2FrameDataArray
std::vector< NTV2FrameData > NTV2FrameDataArray
A vector of NTV2FrameData elements.
Definition: ntv2democommon.h:152
OverlayConfig
BurnConfig OverlayConfig
Definition: ntv2overlay.h:16
BurnConfig::fInputChannel
NTV2Channel fInputChannel
The input channel to use.
Definition: ntv2democommon.h:388
NTV2Overlay::RouteOverlaySignal
void RouteOverlaySignal(void)
Performs overlay routing.
Definition: ntv2overlay.cpp:173
NTV2Overlay::SetupOverlayBug
AJAStatus SetupOverlayBug(void)
Sets up overlay "bug".
Definition: ntv2overlay.cpp:265
NTV2Overlay::SetupAudio
AJAStatus SetupAudio(void)
Performs all audio setup.
Definition: ntv2overlay.cpp:190
ntv2formatdescriptor.h
Declares the NTV2FormatDescriptor class.
ntv2democommon.h
This file contains some structures, constants, classes and functions that are used in some of the dem...
NTV2Overlay::InputThread
void InputThread(void)
The input/capture thread function.
Definition: ntv2overlay.cpp:512
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
NTV2Overlay::StartInputThread
void StartInputThread(void)
Starts input thread.
Definition: ntv2overlay.cpp:483
NTV2Overlay::OutputThreadStatic
static void OutputThreadStatic(AJAThread *pThread, void *pInstance)
Definition: ntv2overlay.cpp:365
NTV2Overlay::StartOutputThread
void StartOutputThread(void)
Starts output thread.
Definition: ntv2overlay.cpp:356
NTV2Overlay::WaitForStableInputSignal
NTV2VideoFormat WaitForStableInputSignal(void)
Waits for stable input signal.
Definition: ntv2overlay.cpp:296
BurnConfig
Configures an NTV2Burn or NTV2FieldBurn instance.
Definition: ntv2democommon.h:383
thread.h
Declares the AJAThread class.
NTV2Overlay
Outputs live input video overlaid with image having transparency.
Definition: ntv2overlay.h:22
NTV2Overlay::Quit
void Quit(void)
Gracefully stops me.
Definition: ntv2overlay.cpp:54
AJACircularBuffer< NTV2FrameData * >