AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
ntv2burn.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef _NTV2BURN_H
9 #define _NTV2BURN_H
10 
11 #include "ntv2card.h"
12 #include "ntv2formatdescriptor.h"
13 #include "ntv2democommon.h"
14 #include "ajabase/common/types.h"
16 #include "ajabase/system/thread.h"
18 
19 
30 class NTV2Burn
31 {
32  // Public Instance Methods
33  public:
39  NTV2Burn (const BurnConfig & inConfig);
40  virtual ~NTV2Burn ();
41 
45  virtual AJAStatus Init (void);
46 
51  virtual AJAStatus Run (void);
52 
56  virtual void Quit (void);
57 
63  virtual void GetStatus (AUTOCIRCULATE_STATUS & outInputStatus, AUTOCIRCULATE_STATUS & outOutputStatus);
64 
65 
66  // Protected Instance Methods
67  protected:
71  virtual AJAStatus SetupVideo (void);
72 
76  virtual AJAStatus SetupAudio (void);
77 
81  virtual void RouteInputSignal (void);
82 
86  virtual void RouteOutputSignal (void);
87 
91  virtual AJAStatus SetupHostBuffers (void);
92 
96  virtual void StartPlayThread (void);
97 
101  virtual void PlayFrames (void);
102 
106  virtual void StartCaptureThread (void);
107 
111  virtual void CaptureFrames (void);
112 
113 
117  virtual bool InputSignalHasTimecode (void);
118 
119 
123  virtual bool AnalogLTCInputHasTimecode (void);
124 
125 
126  // Protected Class Methods
127  protected:
135  static void PlayThreadStatic (AJAThread * pThread, void * pContext);
136 
144  static void CaptureThreadStatic (AJAThread * pThread, void * pContext);
145 
146  // Private Member Data
147  private:
149  BurnConfig mConfig;
150  AJAThread mPlayThread;
151  AJAThread mCaptureThread;
152  CNTV2Card mDevice;
153  NTV2DeviceID mDeviceID;
154  NTV2VideoFormat mVideoFormat;
155  NTV2FormatDesc mFormatDesc;
156  NTV2TaskMode mSavedTaskMode;
157  NTV2AudioSystem mAudioSystem;
158  AJATimeCodeBurn mTCBurner;
159  NTV2TCIndexes mTCOutputs;
160  NTV2FrameDataArray mHostBuffers;
161  CircularBuffer mFrameDataRing;
162  bool mGlobalQuit;
163 
164 }; // NTV2Burn
165 
166 #endif // _NTV2BURN_H
virtual AJAStatus SetupAudio(void)
Sets up everything I need for capturing and playing audio.
Definition: ntv2burn.cpp:343
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Definition: ntv2enums.h:3895
std::set< NTV2TCIndex > NTV2TCIndexes
static void CaptureThreadStatic(AJAThread *pThread, void *pContext)
This is the capture thread&#39;s static callback function that gets called when the capture thread runs...
Definition: ntv2burn.cpp:681
Declares common types used in the ajabase library.
virtual void StartCaptureThread(void)
Starts my capture thread.
Definition: ntv2burn.cpp:668
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
AJAStatus
Definition: types.h:380
virtual ~NTV2Burn()
Definition: ntv2burn.cpp:45
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
virtual void StartPlayThread(void)
Starts my playout thread.
Definition: ntv2burn.cpp:560
NTV2Burn(const BurnConfig &inConfig)
Constructs me using the given configuration settings.
Definition: ntv2burn.cpp:32
Declares the AJATimeCodeBurn class.
static void PlayThreadStatic(AJAThread *pThread, void *pContext)
This is the playout thread&#39;s static callback function that gets called when the playout thread runs...
Definition: ntv2burn.cpp:571
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false...
Definition: ntv2burn.cpp:863
Declares the AJAThread class.
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2burn.cpp:52
Describes a video frame for a given video standard or format and pixel format, including the total nu...
virtual void CaptureFrames(void)
Repeatedly captures frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn.cpp:693
Configures an NTV2Burn or NTV2FieldBurn instance.
virtual void GetStatus(AUTOCIRCULATE_STATUS &outInputStatus, AUTOCIRCULATE_STATUS &outOutputStatus)
Provides status information about my input (capture) and output (playout) processes.
Definition: ntv2burn.cpp:837
virtual void RouteInputSignal(void)
Sets up board routing for capture.
Definition: ntv2burn.cpp:460
std::vector< NTV2FrameData > NTV2FrameDataArray
A vector of NTV2FrameData elements.
Declaration of AJACircularBuffer template class.
I capture frames from a video signal provided to an AJA device&#39;s video input. I burn timecode into th...
Definition: ntv2burn.h:30
virtual AJAStatus Run(void)
Runs me.
Definition: ntv2burn.cpp:546
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Declares the NTV2FormatDescriptor class.
Declares the CNTV2Card class.
This file contains some structures, constants, classes and functions that are used in some of the dem...
virtual AJAStatus SetupVideo(void)
Sets up everything I need for capturing and playing video.
Definition: ntv2burn.cpp:159
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2burn.cpp:72
virtual void PlayFrames(void)
Repeatedly plays out frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn.cpp:581
virtual bool AnalogLTCInputHasTimecode(void)
Returns true if there is a valid LTC signal on my device&#39;s primary analog LTC input port; otherwise r...
Definition: ntv2burn.cpp:874
virtual void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2burn.cpp:483
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2burn.cpp:388