AJA NTV2 SDK  17.5.0.1658
NTV2 SDK 17.5.0.1658
NTV2Player4K Class Reference

I am an object that can play out a 4K or UHD test pattern (with timecode) to an output of an AJA device with or without audio tone in real time. I make use of the AJACircularBuffer, which simplifies implementing 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 12G-capable devices, or for two-sample-interleave or "squares" (quadrants). More...

#include <ntv2player4k.h>

Public Member Functions

 NTV2Player4K (const PlayerConfig &inConfig)
 Constructs me using the given configuration settings. More...
 
virtual ~NTV2Player4K (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...
 
virtual void SetupSDITransmitters (const NTV2Channel inFirstSDI, const UWord inNumSDIs)
 Sets up bi-directional SDI transmitters. More...
 
virtual bool Route4KDownConverter (void)
 Sets up board routing for the 4K DownConverter to SDI Monitor (if available). More...
 
virtual bool RouteHDMIOutput (void)
 Sets up board routing output via the HDMI (if available). More...
 
virtual bool RouteFsToDLOut (void)
 Sets up board routing from the Frame Stores to the Dual Link out. More...
 
virtual bool RouteFsToCsc (void)
 Sets up board routing from the Frame Stores to the Color Space Converters. More...
 
virtual bool RouteFsToSDIOut (void)
 Sets up board routing from the Frame Stores to the SDI outputs. More...
 
virtual bool RouteFsToTsiMux (void)
 Sets up board routing from the Frame Stores to the Two Sample Interleave muxes. More...
 
virtual bool RouteDLOutToSDIOut (void)
 Sets up board routing from the Dual Link outputs to the SDI outputs. More...
 
virtual bool RouteCscTo2xSDIOut (void)
 Sets up board routing from the Color Space Converters to the 2xSDI outputs. More...
 
virtual bool RouteCscTo4xSDIOut (void)
 Sets up board routing from the Color Space Converters to the 4xSDI outputs. More...
 
virtual bool RouteCscToDLOut (void)
 Sets up board routing from the Color Space Converters to the Dual Link outputs. More...
 
virtual bool RouteTsiMuxToDLOut (void)
 Sets up board routing from the Two Sample Interleave muxes to the Dual Link outputs. More...
 
virtual bool RouteTsiMuxToCsc (void)
 Sets up board routing from the Two Sample Interleave muxes to the color Space Converters. More...
 
virtual bool RouteTsiMuxTo2xSDIOut (void)
 Sets up board routing from the Two Sample Interleave muxes to the 2xSDI outputs. More...
 
virtual bool RouteTsiMuxTo4xSDIOut (void)
 Sets up board routing from the Two Sample Interleave muxes to the 4xSDI outputs. 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 a 4K or UHD test pattern (with timecode) to an output of an AJA device with or without audio tone in real time. I make use of the AJACircularBuffer, which simplifies implementing 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 12G-capable devices, or for two-sample-interleave or "squares" (quadrants).

Definition at line 24 of file ntv2player4k.h.

Constructor & Destructor Documentation

◆ NTV2Player4K()

NTV2Player4K::NTV2Player4K ( 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 54 of file ntv2player4k.cpp.

◆ ~NTV2Player4K()

NTV2Player4K::~NTV2Player4K ( void  )
virtual

Definition at line 75 of file ntv2player4k.cpp.

Member Function Documentation

◆ AddTone()

uint32_t NTV2Player4K::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 1425 of file ntv2player4k.cpp.

◆ ConsumeFrames()

void NTV2Player4K::ConsumeFrames ( void  )
protectedvirtual

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

Definition at line 1220 of file ntv2player4k.cpp.

◆ ConsumerThreadStatic()

void NTV2Player4K::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 NTV2Player4K instance).

Definition at line 1209 of file ntv2player4k.cpp.

◆ GetACStatus()

void NTV2Player4K::GetACStatus ( AUTOCIRCULATE_STATUS outStatus)
virtual

Provides status information about my output (playout) process.

Parameters
[out]outStatusReceives the AUTOCIRCULATE_STATUS information.

Definition at line 1461 of file ntv2player4k.cpp.

◆ Init()

AJAStatus NTV2Player4K::Init ( void  )
virtual

Initializes me and prepares me to Run.

Definition at line 107 of file ntv2player4k.cpp.

◆ ProduceFrames()

void NTV2Player4K::ProduceFrames ( void  )
protectedvirtual

My producer thread that repeatedly produces video frames.

Definition at line 1376 of file ntv2player4k.cpp.

◆ ProducerThreadStatic()

void NTV2Player4K::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 NTV2Player4K instance).

Definition at line 1366 of file ntv2player4k.cpp.

◆ Quit()

void NTV2Player4K::Quit ( void  )
virtual

Gracefully stops me from running.

Definition at line 84 of file ntv2player4k.cpp.

◆ Route4KDownConverter()

bool NTV2Player4K::Route4KDownConverter ( void  )
protectedvirtual

Sets up board routing for the 4K DownConverter to SDI Monitor (if available).

Definition at line 605 of file ntv2player4k.cpp.

◆ RouteCscTo2xSDIOut()

bool NTV2Player4K::RouteCscTo2xSDIOut ( void  )
protectedvirtual

Sets up board routing from the Color Space Converters to the 2xSDI outputs.

Definition at line 972 of file ntv2player4k.cpp.

◆ RouteCscTo4xSDIOut()

bool NTV2Player4K::RouteCscTo4xSDIOut ( void  )
protectedvirtual

Sets up board routing from the Color Space Converters to the 4xSDI outputs.

Definition at line 994 of file ntv2player4k.cpp.

◆ RouteCscToDLOut()

bool NTV2Player4K::RouteCscToDLOut ( void  )
protectedvirtual

Sets up board routing from the Color Space Converters to the Dual Link outputs.

Definition at line 1016 of file ntv2player4k.cpp.

◆ RouteDLOutToSDIOut()

bool NTV2Player4K::RouteDLOutToSDIOut ( void  )
protectedvirtual

Sets up board routing from the Dual Link outputs to the SDI outputs.

Definition at line 942 of file ntv2player4k.cpp.

◆ RouteFsToCsc()

bool NTV2Player4K::RouteFsToCsc ( void  )
protectedvirtual

Sets up board routing from the Frame Stores to the Color Space Converters.

Definition at line 809 of file ntv2player4k.cpp.

◆ RouteFsToDLOut()

bool NTV2Player4K::RouteFsToDLOut ( void  )
protectedvirtual

Sets up board routing from the Frame Stores to the Dual Link out.

Definition at line 787 of file ntv2player4k.cpp.

◆ RouteFsToSDIOut()

bool NTV2Player4K::RouteFsToSDIOut ( void  )
protectedvirtual

Sets up board routing from the Frame Stores to the SDI outputs.

Definition at line 851 of file ntv2player4k.cpp.

◆ RouteFsToTsiMux()

bool NTV2Player4K::RouteFsToTsiMux ( void  )
protectedvirtual

Sets up board routing from the Frame Stores to the Two Sample Interleave muxes.

Definition at line 883 of file ntv2player4k.cpp.

◆ RouteHDMIOutput()

bool NTV2Player4K::RouteHDMIOutput ( void  )
protectedvirtual

Sets up board routing output via the HDMI (if available).

Definition at line 665 of file ntv2player4k.cpp.

◆ RouteOutputSignal()

bool NTV2Player4K::RouteOutputSignal ( void  )
protectedvirtual

Performs all widget/signal routing for playout.

Definition at line 437 of file ntv2player4k.cpp.

◆ RouteTsiMuxTo2xSDIOut()

bool NTV2Player4K::RouteTsiMuxTo2xSDIOut ( void  )
protectedvirtual

Sets up board routing from the Two Sample Interleave muxes to the 2xSDI outputs.

Definition at line 1126 of file ntv2player4k.cpp.

◆ RouteTsiMuxTo4xSDIOut()

bool NTV2Player4K::RouteTsiMuxTo4xSDIOut ( void  )
protectedvirtual

Sets up board routing from the Two Sample Interleave muxes to the 4xSDI outputs.

Definition at line 1155 of file ntv2player4k.cpp.

◆ RouteTsiMuxToCsc()

bool NTV2Player4K::RouteTsiMuxToCsc ( void  )
protectedvirtual

Sets up board routing from the Two Sample Interleave muxes to the color Space Converters.

Definition at line 1067 of file ntv2player4k.cpp.

◆ RouteTsiMuxToDLOut()

bool NTV2Player4K::RouteTsiMuxToDLOut ( void  )
protectedvirtual

Sets up board routing from the Two Sample Interleave muxes to the Dual Link outputs.

Definition at line 1038 of file ntv2player4k.cpp.

◆ Run()

AJAStatus NTV2Player4K::Run ( void  )
virtual

Runs me.

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

Definition at line 1184 of file ntv2player4k.cpp.

◆ SetUpAudio()

AJAStatus NTV2Player4K::SetUpAudio ( void  )
protectedvirtual

Performs all audio setup.

Definition at line 275 of file ntv2player4k.cpp.

◆ SetUpHostBuffers()

AJAStatus NTV2Player4K::SetUpHostBuffers ( void  )
protectedvirtual

Sets up my host video & audio buffers.

Definition at line 331 of file ntv2player4k.cpp.

◆ SetupSDITransmitters()

void NTV2Player4K::SetupSDITransmitters ( const NTV2Channel  inFirstSDI,
const UWord  inNumSDIs 
)
protectedvirtual

Sets up bi-directional SDI transmitters.

Parameters
[in]inFirstSDISpecifies the first SDI connector of a possible group, expressed as an NTV2Channel (a zero-based index number).
[in]inNumSDIsSpecifies the number of SDI connectors to set up.

Definition at line 597 of file ntv2player4k.cpp.

◆ SetUpTestPatternBuffers()

AJAStatus NTV2Player4K::SetUpTestPatternBuffers ( void  )
protectedvirtual

Creates my test pattern buffers.

Definition at line 378 of file ntv2player4k.cpp.

◆ SetUpVideo()

AJAStatus NTV2Player4K::SetUpVideo ( void  )
protectedvirtual

Performs all video setup.

Definition at line 203 of file ntv2player4k.cpp.

◆ StartConsumerThread()

void NTV2Player4K::StartConsumerThread ( void  )
protectedvirtual

Starts my consumer thread.

Definition at line 1198 of file ntv2player4k.cpp.

◆ StartProducerThread()

void NTV2Player4K::StartProducerThread ( void  )
protectedvirtual

Starts my producer thread.

Definition at line 1356 of file ntv2player4k.cpp.


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