AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
NTV2Burn Class Reference

I capture frames from a video signal provided to an AJA device's video input. I burn timecode into those frames, then deliver them to an output of the same AJA device with a 7-frame latency (by default). I make use of the AJACircularBuffer, which simplifies implementing a producer/consumer model, in which a "consumer" thread delivers burned-in frames to the AJA device output, and a "producer" thread captures raw frames from the AJA device input. I also demonstrate how to detect if an SDI input has embedded timecode, and if so, how AutoCirculate makes it available. I also show how to embed timecode into an SDI output signal using AutoCirculate during playout. More...

#include <ntv2burn.h>

Public Member Functions

 NTV2Burn (const BurnConfig &inConfig)
 Constructs me using the given configuration settings. More...
 
virtual ~NTV2Burn ()
 
virtual AJAStatus Init (void)
 Initializes me and prepares me to Run. More...
 
virtual AJAStatus Run (void)
 Runs me. More...
 
virtual void Quit (void)
 Gracefully stops me from running. More...
 
virtual void GetStatus (AUTOCIRCULATE_STATUS &outInputStatus, AUTOCIRCULATE_STATUS &outOutputStatus)
 Provides status information about my input (capture) and output (playout) processes. More...
 

Protected Member Functions

virtual AJAStatus SetupVideo (void)
 Sets up everything I need for capturing and playing video. More...
 
virtual AJAStatus SetupAudio (void)
 Sets up everything I need for capturing and playing audio. More...
 
virtual void RouteInputSignal (void)
 Sets up board routing for capture. More...
 
virtual void RouteOutputSignal (void)
 Sets up board routing for playout. More...
 
virtual AJAStatus SetupHostBuffers (void)
 Sets up my circular buffers. More...
 
virtual void StartPlayThread (void)
 Starts my playout thread. More...
 
virtual void PlayFrames (void)
 Repeatedly plays out frames using AutoCirculate (until global quit flag set). More...
 
virtual void StartCaptureThread (void)
 Starts my capture thread. More...
 
virtual void CaptureFrames (void)
 Repeatedly captures frames using AutoCirculate (until global quit flag set). More...
 
virtual bool InputSignalHasTimecode (void)
 Returns true if the current input signal has timecode embedded in it; otherwise returns false. More...
 
virtual bool AnalogLTCInputHasTimecode (void)
 Returns true if there is a valid LTC signal on my device's primary analog LTC input port; otherwise returns false. More...
 

Static Protected Member Functions

static void PlayThreadStatic (AJAThread *pThread, void *pContext)
 This is the playout thread's static callback function that gets called when the playout thread runs. This function gets "Attached" to the playout thread's AJAThread instance. More...
 
static void CaptureThreadStatic (AJAThread *pThread, void *pContext)
 This is the capture thread's static callback function that gets called when the capture thread runs. This function gets "Attached" to the AJAThread instance. More...
 

Detailed Description

I capture frames from a video signal provided to an AJA device's video input. I burn timecode into those frames, then deliver them to an output of the same AJA device with a 7-frame latency (by default). I make use of the AJACircularBuffer, which simplifies implementing a producer/consumer model, in which a "consumer" thread delivers burned-in frames to the AJA device output, and a "producer" thread captures raw frames from the AJA device input. I also demonstrate how to detect if an SDI input has embedded timecode, and if so, how AutoCirculate makes it available. I also show how to embed timecode into an SDI output signal using AutoCirculate during playout.

Definition at line 30 of file ntv2burn.h.

Constructor & Destructor Documentation

◆ NTV2Burn()

NTV2Burn::NTV2Burn ( const BurnConfig inConfig)

Constructs me using the given configuration settings.

Parameters
[in]inConfigSpecifies the configuration parameters.
Note
I'm not completely initialized and ready for use until after my Init method has been called.

Definition at line 26 of file ntv2burn.cpp.

◆ ~NTV2Burn()

NTV2Burn::~NTV2Burn ( )
virtual

Definition at line 40 of file ntv2burn.cpp.

Member Function Documentation

◆ AnalogLTCInputHasTimecode()

bool NTV2Burn::AnalogLTCInputHasTimecode ( void  )
protectedvirtual

Returns true if there is a valid LTC signal on my device's primary analog LTC input port; otherwise returns false.

Definition at line 826 of file ntv2burn.cpp.

◆ CaptureFrames()

void NTV2Burn::CaptureFrames ( void  )
protectedvirtual

Repeatedly captures frames using AutoCirculate (until global quit flag set).

Definition at line 663 of file ntv2burn.cpp.

◆ CaptureThreadStatic()

void NTV2Burn::CaptureThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the capture thread's static callback function that gets called when the capture thread runs. This function gets "Attached" to the AJAThread instance.

Parameters
[in]pThreadPoints to the AJAThread instance.
[in]pContextContext information to pass to the thread. (For this application, this will be set to point to the NTV2Burn instance.)

Definition at line 651 of file ntv2burn.cpp.

◆ GetStatus()

void NTV2Burn::GetStatus ( AUTOCIRCULATE_STATUS outInputStatus,
AUTOCIRCULATE_STATUS outOutputStatus 
)
virtual

Provides status information about my input (capture) and output (playout) processes.

Parameters
[out]outInputStatusReceives the input status.
[out]outOutputStatusReceives the output status.

Definition at line 789 of file ntv2burn.cpp.

◆ Init()

AJAStatus NTV2Burn::Init ( void  )
virtual

Initializes me and prepares me to Run.

Definition at line 67 of file ntv2burn.cpp.

◆ InputSignalHasTimecode()

bool NTV2Burn::InputSignalHasTimecode ( void  )
protectedvirtual

Returns true if the current input signal has timecode embedded in it; otherwise returns false.

Definition at line 815 of file ntv2burn.cpp.

◆ PlayFrames()

void NTV2Burn::PlayFrames ( void  )
protectedvirtual

Repeatedly plays out frames using AutoCirculate (until global quit flag set).

Definition at line 551 of file ntv2burn.cpp.

◆ PlayThreadStatic()

void NTV2Burn::PlayThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the playout thread's static callback function that gets called when the playout thread runs. This function gets "Attached" to the playout thread's AJAThread instance.

Parameters
[in]pThreadA valid pointer to the playout thread's AJAThread instance.
[in]pContextContext information to pass to the thread. (For this application, this will be set to point to the NTV2Burn instance.)

Definition at line 541 of file ntv2burn.cpp.

◆ Quit()

void NTV2Burn::Quit ( void  )
virtual

Gracefully stops me from running.

Definition at line 47 of file ntv2burn.cpp.

◆ RouteInputSignal()

void NTV2Burn::RouteInputSignal ( void  )
protectedvirtual

Sets up board routing for capture.

Definition at line 430 of file ntv2burn.cpp.

◆ RouteOutputSignal()

void NTV2Burn::RouteOutputSignal ( void  )
protectedvirtual

Sets up board routing for playout.

Definition at line 453 of file ntv2burn.cpp.

◆ Run()

AJAStatus NTV2Burn::Run ( void  )
virtual

Runs me.

Note
Do not call this method without first calling my Init method.

Definition at line 516 of file ntv2burn.cpp.

◆ SetupAudio()

AJAStatus NTV2Burn::SetupAudio ( void  )
protectedvirtual

Sets up everything I need for capturing and playing audio.

Definition at line 313 of file ntv2burn.cpp.

◆ SetupHostBuffers()

AJAStatus NTV2Burn::SetupHostBuffers ( void  )
protectedvirtual

Sets up my circular buffers.

Definition at line 358 of file ntv2burn.cpp.

◆ SetupVideo()

AJAStatus NTV2Burn::SetupVideo ( void  )
protectedvirtual

Sets up everything I need for capturing and playing video.

Definition at line 154 of file ntv2burn.cpp.

◆ StartCaptureThread()

void NTV2Burn::StartCaptureThread ( void  )
protectedvirtual

Starts my capture thread.

Definition at line 638 of file ntv2burn.cpp.

◆ StartPlayThread()

void NTV2Burn::StartPlayThread ( void  )
protectedvirtual

Starts my playout thread.

Definition at line 530 of file ntv2burn.cpp.


The documentation for this class was generated from the following files: