AJA NTV2 SDK  17.6.0.1664
NTV2 SDK 17.6.0.1664
NTV2Player8K Class Reference

I am an object that can play out an 8K or UHD2 test pattern (with timecode) to 4 x 12G SDI outputs of an AJA device with or without audio tone in real time. I make use of the AJACircularBuffer, to implement a producer/consumer model, in which a "producer" thread generates the test pattern frames, and a "consumer" thread (i.e., the "play" thread) sends those frames to the AJA device. I show how to configure for two-sample interleave or "squares" (quadrants). More...

#include <ntv2player8k.h>

Public Member Functions

 NTV2Player8K (const PlayerConfig &inConfig)
 Constructs me using the given configuration settings. More...
 
virtual ~NTV2Player8K (void)
 
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 GetACStatus (AUTOCIRCULATE_STATUS &outStatus)
 Provides status information about my output (playout) process. More...
 

Protected Member Functions

virtual AJAStatus SetUpVideo (void)
 Performs all video setup. More...
 
virtual AJAStatus SetUpAudio (void)
 Performs all audio setup. More...
 
virtual bool RouteOutputSignal (void)
 Performs all widget/signal routing for playout. More...
 
virtual AJAStatus SetUpHostBuffers (void)
 Sets up my host video & audio buffers. More...
 
virtual AJAStatus SetUpTestPatternBuffers (void)
 Creates my test pattern buffers. More...
 
virtual void StartConsumerThread (void)
 Starts my consumer thread. More...
 
virtual void ConsumeFrames (void)
 My consumer thread that repeatedly plays frames using AutoCirculate (until quit). More...
 
virtual void StartProducerThread (void)
 Starts my producer thread. More...
 
virtual void ProduceFrames (void)
 My producer thread that repeatedly produces video frames. More...
 
virtual uint32_t AddTone (ULWord *audioBuffer)
 Inserts audio tone (based on my current tone frequency) into the given audio buffer. More...
 

Static Protected Member Functions

static void ConsumerThreadStatic (AJAThread *pThread, void *pContext)
 This is the consumer thread's static callback function that gets called when the consumer thread starts. This function gets "Attached" to the consumer thread's AJAThread instance. More...
 
static void ProducerThreadStatic (AJAThread *pThread, void *pContext)
 This is the producer thread's static callback function that gets called when the producer thread starts. This function gets "Attached" to the producer thread's AJAThread instance. More...
 

Detailed Description

I am an object that can play out an 8K or UHD2 test pattern (with timecode) to 4 x 12G SDI outputs of an AJA device with or without audio tone in real time. I make use of the AJACircularBuffer, to implement a producer/consumer model, in which a "producer" thread generates the test pattern frames, and a "consumer" thread (i.e., the "play" thread) sends those frames to the AJA device. I show how to configure for two-sample interleave or "squares" (quadrants).

Definition at line 24 of file ntv2player8k.h.

Constructor & Destructor Documentation

◆ NTV2Player8K()

NTV2Player8K::NTV2Player8K ( const PlayerConfig inConfig)

Constructs me using the given configuration settings.

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

Definition at line 48 of file ntv2player8k.cpp.

◆ ~NTV2Player8K()

NTV2Player8K::~NTV2Player8K ( void  )
virtual

Definition at line 69 of file ntv2player8k.cpp.

Member Function Documentation

◆ AddTone()

uint32_t NTV2Player8K::AddTone ( ULWord audioBuffer)
protectedvirtual

Inserts audio tone (based on my current tone frequency) into the given audio buffer.

Parameters
[out]audioBufferSpecifies a valid, non-NULL pointer to the buffer that is to receive the audio tone data.
Returns
Total number of bytes written into the buffer.

Definition at line 812 of file ntv2player8k.cpp.

◆ ConsumeFrames()

void NTV2Player8K::ConsumeFrames ( void  )
protectedvirtual

My consumer thread that repeatedly plays frames using AutoCirculate (until quit).

Definition at line 630 of file ntv2player8k.cpp.

◆ ConsumerThreadStatic()

void NTV2Player8K::ConsumerThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

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

Parameters
[in]pThreadA valid pointer to the consumer thread's AJAThread instance.
[in]pContextContext information to pass to the thread (the NTV2Player8K instance).

Definition at line 619 of file ntv2player8k.cpp.

◆ GetACStatus()

void NTV2Player8K::GetACStatus ( AUTOCIRCULATE_STATUS outStatus)
virtual

Provides status information about my output (playout) process.

Parameters
[out]outStatusReceives the AUTOCIRCULATE_STATUS information.

Definition at line 848 of file ntv2player8k.cpp.

◆ Init()

AJAStatus NTV2Player8K::Init ( void  )
virtual

Initializes me and prepares me to Run.

Definition at line 101 of file ntv2player8k.cpp.

◆ ProduceFrames()

void NTV2Player8K::ProduceFrames ( void  )
protectedvirtual

My producer thread that repeatedly produces video frames.

Definition at line 763 of file ntv2player8k.cpp.

◆ ProducerThreadStatic()

void NTV2Player8K::ProducerThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

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

Parameters
[in]pThreadA valid pointer to the producer thread's AJAThread instance.
[in]pContextContext information to pass to the thread (the NTV2Player8K instance).

Definition at line 753 of file ntv2player8k.cpp.

◆ Quit()

void NTV2Player8K::Quit ( void  )
virtual

Gracefully stops me from running.

Definition at line 78 of file ntv2player8k.cpp.

◆ RouteOutputSignal()

bool NTV2Player8K::RouteOutputSignal ( void  )
protectedvirtual

Performs all widget/signal routing for playout.

Definition at line 411 of file ntv2player8k.cpp.

◆ Run()

AJAStatus NTV2Player8K::Run ( void  )
virtual

Runs me.

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

Definition at line 594 of file ntv2player8k.cpp.

◆ SetUpAudio()

AJAStatus NTV2Player8K::SetUpAudio ( void  )
protectedvirtual

Performs all audio setup.

Definition at line 254 of file ntv2player8k.cpp.

◆ SetUpHostBuffers()

AJAStatus NTV2Player8K::SetUpHostBuffers ( void  )
protectedvirtual

Sets up my host video & audio buffers.

Definition at line 305 of file ntv2player8k.cpp.

◆ SetUpTestPatternBuffers()

AJAStatus NTV2Player8K::SetUpTestPatternBuffers ( void  )
protectedvirtual

Creates my test pattern buffers.

Definition at line 351 of file ntv2player8k.cpp.

◆ SetUpVideo()

AJAStatus NTV2Player8K::SetUpVideo ( void  )
protectedvirtual

Performs all video setup.

Definition at line 182 of file ntv2player8k.cpp.

◆ StartConsumerThread()

void NTV2Player8K::StartConsumerThread ( void  )
protectedvirtual

Starts my consumer thread.

Definition at line 608 of file ntv2player8k.cpp.

◆ StartProducerThread()

void NTV2Player8K::StartProducerThread ( void  )
protectedvirtual

Starts my producer thread.

Definition at line 743 of file ntv2player8k.cpp.


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