I am an object that can inject text captions into an SDI output of an AJA device in real time. I'm capable of simultaneously generating and injecting text into more than one NTV2Line21Channel, at independent rates, and NTV2Line21Modes. Each caption channel's configuration is specified by a CCGeneratorConfig struct. I make use of the AJACircularBuffer, which simplifies implementing a producer/consumer model, in which a "producer" thread produces the background video frames, and a "consumer" thread (i.e., the "play" thread) sends those frames to the AJA device. I demonstrate how to use the "AJA CC LIB" caption library to embed captions into an SDI output signal.
More...
#include <ntv2ccplayer.h>
|
| NTV2CCPlayer (const CCPlayerConfig &inConfigData) |
| Constructs me using the given configuration settings. More...
|
|
virtual | ~NTV2CCPlayer (void) |
|
virtual AJAStatus | Init (void) |
| Initializes me and prepares me to Run. More...
|
|
virtual AJAStatus | Run (void) |
| Runs me. More...
|
|
virtual void | Quit (const bool inQuitImmediately=(0)) |
| Stops me. More...
|
|
virtual void | GetStatus (size_t &outMessagesQueued, size_t &outBytesQueued, size_t &outTotMsgsEnq, size_t &outTotBytesEnq, size_t &outTotMsgsDeq, size_t &outTotBytesDeq, size_t &outMaxQueDepth, size_t &outDroppedFrames) const |
| Returns status information from my caption encoder. More...
|
|
|
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 | CaptionGeneratorThreadStatic (AJAThread *pThread, void *pContext) |
| This is the caption generator thread's static callback function that gets called when the caption generator thread runs. This function gets "Attached" to the generator thread's AJAThread instance. More...
|
|
I am an object that can inject text captions into an SDI output of an AJA device in real time. I'm capable of simultaneously generating and injecting text into more than one NTV2Line21Channel, at independent rates, and NTV2Line21Modes. Each caption channel's configuration is specified by a CCGeneratorConfig struct. I make use of the AJACircularBuffer, which simplifies implementing a producer/consumer model, in which a "producer" thread produces the background video frames, and a "consumer" thread (i.e., the "play" thread) sends those frames to the AJA device. I demonstrate how to use the "AJA CC LIB" caption library to embed captions into an SDI output signal.
Definition at line 125 of file ntv2ccplayer.h.
◆ AJAThreadList
◆ AJAThreadListConstIter
◆ NTV2CCPlayer()
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] | inConfigData | Specifies the player configuration. |
Definition at line 859 of file ntv2ccplayer.cpp.
◆ ~NTV2CCPlayer()
NTV2CCPlayer::~NTV2CCPlayer |
( |
void |
| ) |
|
|
virtual |
◆ CaptionGeneratorThreadStatic()
void NTV2CCPlayer::CaptionGeneratorThreadStatic |
( |
AJAThread * |
pThread, |
|
|
void * |
pContext |
|
) |
| |
|
staticprotected |
This is the caption generator thread's static callback function that gets called when the caption generator thread runs. This function gets "Attached" to the generator thread's AJAThread instance.
- Parameters
-
[in] | pThread | A valid pointer to the caption generator thread's AJAThread instance. |
[in] | pContext | Context information to pass to the thread. (For this application, this will be set to point to the NTV2CCPlayer instance.) |
Definition at line 1390 of file ntv2ccplayer.cpp.
◆ DeviceAncExtractorIsAvailable()
bool NTV2CCPlayer::DeviceAncExtractorIsAvailable |
( |
void |
| ) |
|
|
protectedvirtual |
- Returns
- True if the device supports ancillary data extraction, and the driver supports the new AutoCirculate calls.
Definition at line 930 of file ntv2ccplayer.cpp.
◆ GenerateCaptions()
This is the thread function that produces caption messages for a given caption channel.
- Parameters
-
[in] | inCCChannel | Specifies the caption channel to generate captions for. |
Definition at line 1407 of file ntv2ccplayer.cpp.
◆ GetStatus()
void NTV2CCPlayer::GetStatus |
( |
size_t & |
outMessagesQueued, |
|
|
size_t & |
outBytesQueued, |
|
|
size_t & |
outTotMsgsEnq, |
|
|
size_t & |
outTotBytesEnq, |
|
|
size_t & |
outTotMsgsDeq, |
|
|
size_t & |
outTotBytesDeq, |
|
|
size_t & |
outMaxQueDepth, |
|
|
size_t & |
outDroppedFrames |
|
) |
| const |
|
virtual |
Returns status information from my caption encoder.
- Parameters
-
[out] | outMessagesQueued | Receives the current number of messages currently enqueued in my caption encoder. |
[out] | outBytesQueued | Receives the current number of bytes currently enqueued in my caption encoder. |
[out] | outTotMsgsEnq | Receives the total number of messages ever enqueued by my caption encoder. |
[out] | outTotBytesEnq | Receives the total number of bytes ever enqueued by my caption encoder. |
[out] | outTotMsgsDeq | Receives the total number of messages ever dequeued by my caption encoder. |
[out] | outTotBytesDeq | Receives the total number of bytes ever dequeued by my caption encoder. |
[out] | outMaxQueDepth | Receives the encoder's highest queue depth. |
[out] | outDroppedFrames | Receives the dropped frame count. |
Definition at line 1825 of file ntv2ccplayer.cpp.
◆ Init()
◆ NTV2FrameRate2TimecodeFormat()
◆ PlayoutFrames()
void NTV2CCPlayer::PlayoutFrames |
( |
void |
| ) |
|
|
protectedvirtual |
◆ PlayThreadStatic()
void NTV2CCPlayer::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] | pThread | A valid pointer to the playout thread's AJAThread instance. |
[in] | pContext | Context information to pass to the thread. (For this application, this will be set to point to the NTV2CCPlayer instance.) |
Definition at line 1562 of file ntv2ccplayer.cpp.
◆ Quit()
void NTV2CCPlayer::Quit |
( |
const bool |
inQuitImmediately = (0) | ) |
|
|
virtual |
Stops me.
- Parameters
-
[in] | inQuitImmediately | If true, terminates the caption player immediately; otherwise, waits until all captions enqueued in the encoder have finished playing. Defaults to false; |
- Note
- This method will block until my caption generator and playout threads have terminated.
Definition at line 893 of file ntv2ccplayer.cpp.
◆ RouteOutputSignal()
AJAStatus NTV2CCPlayer::RouteOutputSignal |
( |
void |
| ) |
|
|
protectedvirtual |
◆ Run()
Runs me.
- Note
- Do not call this method without first calling my Init method.
Definition at line 1350 of file ntv2ccplayer.cpp.
◆ SetUpBackgroundPatternBuffer()
AJAStatus NTV2CCPlayer::SetUpBackgroundPatternBuffer |
( |
void |
| ) |
|
|
protectedvirtual |
◆ SetUpOutputVideo()
AJAStatus NTV2CCPlayer::SetUpOutputVideo |
( |
void |
| ) |
|
|
protectedvirtual |
◆ StartCaptionGeneratorThreads()
void NTV2CCPlayer::StartCaptionGeneratorThreads |
( |
void |
| ) |
|
|
protectedvirtual |
◆ StartPlayoutThread()
void NTV2CCPlayer::StartPlayoutThread |
( |
void |
| ) |
|
|
protectedvirtual |
The documentation for this class was generated from the following files:
- /home/tcbuilder/buildAgent/work/df8e8cce5bebfd58/libajantv2/demos/ntv2ccplayer/ntv2ccplayer.h
- /home/tcbuilder/buildAgent/work/df8e8cce5bebfd58/libajantv2/demos/ntv2ccplayer/ntv2ccplayer.cpp