AJA NTV2 SDK  18.0.0.2717
NTV2 SDK 18.0.0.2717
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  bool IsInputSignalRGB (void);
41  void RouteInputSignal (void);
42  void RouteOverlaySignal (void);
43  void RouteOutputSignal (void);
44  void StartOutputThread (void);
45  void OutputThread (void);
46  void StartInputThread (void);
47  void InputThread (void);
48  inline UWord MixerNum (void) {return mConfig.fInputChannel / 2;}
49 
50  // Protected Class Methods
51  protected:
52  static void OutputThreadStatic (AJAThread * pThread, void * pInstance);
53  static void InputThreadStatic (AJAThread * pThread, void * pInstance);
54 
55  // Private Member Data
56  private:
57  OverlayConfig mConfig;
58  AJAThread mPlayThread;
59  AJAThread mCaptureThread;
60  CNTV2Card mDevice;
61  NTV2VideoFormat mVideoFormat;
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
NTV2Overlay::SetupVideo
AJAStatus SetupVideo(void)
Performs all video setup.
Definition: ntv2overlay.cpp:127
NTV2TaskMode
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
Definition: ntv2publicinterface.h:4462
NTV2Overlay::ReleaseCaptureBuffers
void ReleaseCaptureBuffers(void)
Frees capture buffers & ring.
Definition: ntv2overlay.cpp:252
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:6216
NTV2Overlay::InputThreadStatic
static void InputThreadStatic(AJAThread *pThread, void *pInstance)
Static output/playout thread function.
Definition: ntv2overlay.cpp:518
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:215
NTV2Overlay::SetupCaptureBuffers
AJAStatus SetupCaptureBuffers(void)
Allocates capture buffers & ring.
Definition: ntv2overlay.cpp:229
NTV2Overlay::RouteOutputSignal
void RouteOutputSignal(void)
Performs output routing.
Definition: ntv2overlay.cpp:207
NTV2Overlay::NTV2Overlay
NTV2Overlay(const OverlayConfig &inConfig)
Construct from OverlayConfig.
Definition: ntv2overlay.cpp:24
NTV2Overlay::OutputThread
void OutputThread(void)
The output/playout thread function.
Definition: ntv2overlay.cpp:411
NTV2Overlay::~NTV2Overlay
virtual ~NTV2Overlay()
My destructor.
Definition: ntv2overlay.cpp:38
AJAThread
Definition: thread.h:69
NTV2Overlay::Run
AJAStatus Run(void)
Runs me (only after Init called)
Definition: ntv2overlay.cpp:370
AJAStatus
AJAStatus
Definition: types.h:378
ntv2card.h
Declares the CNTV2Card class.
UWord
uint16_t UWord
Definition: ajatypes.h:274
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:68
NTV2Overlay::RouteInputSignal
void RouteInputSignal(void)
Performs input routing.
Definition: ntv2overlay.cpp:168
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:198
NTV2Overlay::SetupOverlayBug
AJAStatus SetupOverlayBug(void)
Sets up overlay "bug".
Definition: ntv2overlay.cpp:290
NTV2Overlay::SetupAudio
AJAStatus SetupAudio(void)
Performs all audio setup.
Definition: ntv2overlay.cpp:215
NTV2Overlay::IsInputSignalRGB
bool IsInputSignalRGB(void)
Definition: ntv2overlay.cpp:157
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:538
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
NTV2Overlay::StartInputThread
void StartInputThread(void)
Starts input thread.
Definition: ntv2overlay.cpp:509
NTV2Overlay::OutputThreadStatic
static void OutputThreadStatic(AJAThread *pThread, void *pInstance)
Definition: ntv2overlay.cpp:390
NTV2Overlay::StartOutputThread
void StartOutputThread(void)
Starts output thread.
Definition: ntv2overlay.cpp:381
NTV2Overlay::WaitForStableInputSignal
NTV2VideoFormat WaitForStableInputSignal(void)
Waits for stable input signal.
Definition: ntv2overlay.cpp:321
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:48
AJACircularBuffer< NTV2FrameData * >