AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
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
void StartInputThread(void)
Starts input thread.
NTV2VideoFormat WaitForStableInputSignal(void)
Waits for stable input signal.
void RouteInputSignal(void)
Performs input routing.
static void InputThreadStatic(AJAThread *pThread, void *pInstance)
Static output/playout thread function.
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
Definition: ntv2enums.h:219
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
AJAStatus
Definition: types.h:380
void ReleaseCaptureBuffers(void)
Frees capture buffers & ring.
void Quit(void)
Gracefully stops me.
Definition: ntv2overlay.cpp:48
UWord MixerNum(void)
Definition: ntv2overlay.h:48
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
AJAStatus SetupCaptureBuffers(void)
Allocates capture buffers & ring.
BurnConfig OverlayConfig
Definition: ntv2overlay.h:16
void RouteOutputSignal(void)
Performs output routing.
void OutputThread(void)
The output/playout thread function.
NTV2Overlay(const OverlayConfig &inConfig)
Construct from OverlayConfig.
Definition: ntv2overlay.cpp:24
AJAStatus SetupAudio(void)
Performs all audio setup.
AJAStatus Run(void)
Runs me (only after Init called)
Declares the AJAThread class.
Describes a video frame for a given video standard or format and pixel format, including the total nu...
virtual ~NTV2Overlay()
My destructor.
Definition: ntv2overlay.cpp:38
AJAStatus SetupVideo(void)
Performs all video setup.
Configures an NTV2Burn or NTV2FieldBurn instance.
static void OutputThreadStatic(AJAThread *pThread, void *pInstance)
AJAStatus Init(void)
Prepares me to Run()
Definition: ntv2overlay.cpp:68
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
std::vector< NTV2FrameData > NTV2FrameDataArray
A vector of NTV2FrameData elements.
uint16_t UWord
Definition: ajatypes.h:221
AJAStatus SetupOverlayBug(void)
Sets up overlay "bug".
Declares the NTV2FormatDescriptor class.
Declares the CNTV2Card class.
NTV2Channel fInputChannel
The input channel to use.
This file contains some structures, constants, classes and functions that are used in some of the dem...
Outputs live input video overlaid with image having transparency.
Definition: ntv2overlay.h:22
I am a circular frame buffer that simplifies implementing a type-safe producer/consumer model for pro...
void InputThread(void)
The input/capture thread function.
bool IsInputSignalRGB(void)
void RouteOverlaySignal(void)
Performs overlay routing.
void StartOutputThread(void)
Starts output thread.