AJA NTV2 SDK  18.1.0.2439
NTV2 SDK 18.1.0.2439
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  NTV2VideoFormat mVideoFormat;
154  NTV2FormatDesc mFormatDesc;
155  NTV2TaskMode mSavedTaskMode;
156  NTV2AudioSystem mAudioSystem;
157  AJATimeCodeBurn mTCBurner;
158  NTV2TCIndexes mTCOutputs;
159  NTV2FrameDataArray mHostBuffers;
160  CircularBuffer mFrameDataRing;
161  bool mGlobalQuit;
162 
163 }; // NTV2Burn
164 
165 #endif // _NTV2BURN_H
virtual AJAStatus SetupAudio(void)
Sets up everything I need for capturing and playing audio.
Definition: ntv2burn.cpp:337
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Definition: ntv2enums.h:3901
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:676
Declares common types used in the ajabase library.
virtual void StartCaptureThread(void)
Starts my capture thread.
Definition: ntv2burn.cpp:663
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2TaskMode
Describes the task mode state. See also: NTV2 Device Sharing.
AJAStatus
Definition: types.h:380
virtual ~NTV2Burn()
Definition: ntv2burn.cpp:44
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
virtual void StartPlayThread(void)
Starts my playout thread.
Definition: ntv2burn.cpp:551
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:562
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false...
Definition: ntv2burn.cpp:858
Declares the AJAThread class.
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2burn.cpp:51
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:688
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:832
virtual void RouteInputSignal(void)
Sets up board routing for capture.
Definition: ntv2burn.cpp:454
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:537
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:155
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2burn.cpp:71
virtual void PlayFrames(void)
Repeatedly plays out frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn.cpp:572
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:869
virtual void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2burn.cpp:477
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2burn.cpp:382