I play out SD or HD 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 also show how to embed timecode into an SDI output signal using AutoCirculate during playout.
More...
#include <ntv2player.h>
|
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...
|
|
I play out SD or HD 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 also show how to embed timecode into an SDI output signal using AutoCirculate during playout.
Definition at line 24 of file ntv2player.h.
◆ NTV2Player()
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] | inConfig | Specifies all configuration parameters. |
Definition at line 58 of file ntv2player.cpp.
◆ ~NTV2Player()
NTV2Player::~NTV2Player |
( |
void |
| ) |
|
|
virtual |
◆ AddTone()
Inserts audio tone (based on my current tone frequency) into the given NTV2FrameData's audio buffer.
- Parameters
-
inFrameData | The NTV2FrameData object having the audio buffer to be filled. |
- Returns
- Total number of bytes written into the buffer.
Definition at line 794 of file ntv2player.cpp.
◆ ConsumeFrames()
void NTV2Player::ConsumeFrames |
( |
void |
| ) |
|
|
protectedvirtual |
My consumer thread that repeatedly plays frames using AutoCirculate (until quit).
Definition at line 520 of file ntv2player.cpp.
◆ ConsumerThreadStatic()
void NTV2Player::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] | pThread | A valid pointer to the consumer thread's AJAThread instance. |
[in] | pContext | Context information to pass to the thread (the NTV2Player instance). |
Definition at line 506 of file ntv2player.cpp.
◆ DisableRP188Bypass()
Disables the given SDI output's RP188 bypass.
- Parameters
-
[in] | inOutputDest | Specifies the NTV2OutputDestination of interest. |
Definition at line 870 of file ntv2player.cpp.
◆ GetACStatus()
Provides status information about my output (playout) process.
- Parameters
-
Definition at line 830 of file ntv2player.cpp.
◆ Init()
Initializes me and prepares me to Run.
Definition at line 111 of file ntv2player.cpp.
◆ OutputDestHasRP188BypassEnabled()
- Returns
- True if the given output destination's RP188 bypass is enabled; otherwise false.
- Parameters
-
[in] | inOutputDest | Specifies the NTV2OutputDestination of interest. |
Definition at line 854 of file ntv2player.cpp.
◆ ProduceFrames()
void NTV2Player::ProduceFrames |
( |
void |
| ) |
|
|
protectedvirtual |
My producer thread that repeatedly produces video frames.
Definition at line 715 of file ntv2player.cpp.
◆ ProducerThreadStatic()
void NTV2Player::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] | pThread | A valid pointer to the producer thread's AJAThread instance. |
[in] | pContext | Context information to pass to the thread (the NTV2Player instance). |
Definition at line 706 of file ntv2player.cpp.
◆ Quit()
void NTV2Player::Quit |
( |
void |
| ) |
|
|
virtual |
◆ RouteOutputSignal()
bool NTV2Player::RouteOutputSignal |
( |
void |
| ) |
|
|
protectedvirtual |
Performs all widget/signal routing for playout.
Definition at line 400 of file ntv2player.cpp.
◆ Run()
Runs me.
- Note
- Do not call this method without first calling my Init method.
Definition at line 481 of file ntv2player.cpp.
◆ SetUpAudio()
◆ SetUpHostBuffers()
AJAStatus NTV2Player::SetUpHostBuffers |
( |
void |
| ) |
|
|
protectedvirtual |
Sets up my host video & audio buffers.
Definition at line 304 of file ntv2player.cpp.
◆ SetUpTestPatternBuffers()
AJAStatus NTV2Player::SetUpTestPatternBuffers |
( |
void |
| ) |
|
|
protectedvirtual |
◆ SetUpVideo()
◆ StartConsumerThread()
void NTV2Player::StartConsumerThread |
( |
void |
| ) |
|
|
protectedvirtual |
◆ StartProducerThread()
void NTV2Player::StartProducerThread |
( |
void |
| ) |
|
|
protectedvirtual |
The documentation for this class was generated from the following files:
- /home/tcbuilder/buildAgent/work/df8e8cce5bebfd58/libajantv2/demos/ntv2player/ntv2player.h
- /home/tcbuilder/buildAgent/work/df8e8cce5bebfd58/libajantv2/demos/ntv2player/ntv2player.cpp