AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
I can decode captions from frames captured from an AJA device in real time. I can optionally play the captured video with captions "burned" in on-screen using the device's mixer. More...
#include <ntv2ccgrabber.h>
Public Member Functions | |
NTV2CCGrabber (const CCGrabberConfig &inConfigData) | |
Constructs me using the given configuration settings. More... | |
virtual | ~NTV2CCGrabber () |
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 | SetCaptionDisplayChannel (const NTV2Line21Channel inNewChannel) |
Changes the caption channel I'm displaying. More... | |
virtual bool | IsCaptureThreadRunning (void) const |
Returns true if my capture thread is currently running. More... | |
virtual bool | IsPlayThreadRunning (void) const |
Returns true if my play thread is currently running. More... | |
virtual AJAStatus | StartPlayThread (void) |
Starts my playout thread. More... | |
virtual void | ToggleHUD (void) |
Toggles the Head-Up-Display. More... | |
virtual void | ToggleVANC (void) |
Toggles the use of VANC. (Debug, experimental) More... | |
virtual void | SwitchOutput (void) |
Switches/rotates –output mode. More... | |
virtual void | Switch608Source (void) |
Switches/rotates –608src. More... | |
virtual void | SwitchPixelFormat (void) |
Switches/rotates –pixelFormat. More... | |
Static Public Member Functions | |
static std::string | GetLine21ChannelNames (std::string inDelimiter=", ") |
Returns a string containing a concatenation of human-readable names of every available NTV2Line21Channel value. More... | |
Protected Member Functions | |
virtual AJAStatus | SetupInputVideo (void) |
Sets up everything I need for capturing video. More... | |
virtual AJAStatus | SetupAudio (void) |
Sets up audio for capture (and playout, if burning captions). More... | |
virtual bool | RouteInputSignal (const NTV2VideoFormat inVideoFormat) |
virtual void | SetOutputStandards (const NTV2VideoFormat inVideoFormat) |
Sets the device output standard based on the given video format. More... | |
virtual AJAStatus | StartCaptureThread (void) |
Starts my capture thread. More... | |
virtual void | CaptureFrames (void) |
Repeatedly captures frames using AutoCirculate (until global quit flag set). More... | |
virtual NTV2VideoFormat | WaitForStableInputSignal (void) |
Wait for a stable input signal, and return it. More... | |
virtual AJAStatus | SetupHostBuffers (const NTV2VideoFormat inVideoFormat) |
Sets up my circular buffers. More... | |
virtual void | ReleaseHostBuffers (void) |
Releases my circular buffers. More... | |
virtual void | ExtractClosedCaptionData (const uint32_t inFrameCount, const NTV2VideoFormat inVideoFormat) |
Extracts closed-caption data, if present, and emits it on a character-by-character basis to the standard output stream. More... | |
virtual AJAStatus | SetupOutputVideo (const NTV2VideoFormat inVideoFormat) |
Sets up everything I need for capturing video. More... | |
virtual void | DoCCOutput (const uint32_t inFrameNum, const CaptionData &inCCData, const NTV2VideoFormat inVideoFormat) |
Outputs CC data. More... | |
virtual bool | RouteOutputSignal (const NTV2VideoFormat inVideoFormat) |
virtual void | PlayFrames (void) |
Repeatedly updates captions (until global quit flag set). More... | |
virtual void | CaptioningChanged (const NTV2Caption608ChangeInfo &inChangeInfo) |
This function gets called whenever caption changes occur. More... | |
Static Protected Member Functions | |
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... | |
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 | Caption608ChangedStatic (void *pInstance, const NTV2Caption608ChangeInfo &inChangeInfo) |
This static function gets called whenever 608 captioning changes. More... | |
I can decode captions from frames captured from an AJA device in real time. I can optionally play the captured video with captions "burned" in on-screen using the device's mixer.
This app demonstrates how to properly react to input signal changes using AutoCirculate, resuming the capture stream once a stable video signal is restored. It also shows how to use the CEA-608 and CEA-708 decoders provided in the 'ajacclib' caption library. It also shows how to use the mixer/keyer widget to superimpose graphics (with alpha transparency) over live video.
Definition at line 111 of file ntv2ccgrabber.h.
NTV2CCGrabber::NTV2CCGrabber | ( | const CCGrabberConfig & | inConfigData | ) |
Constructs me using the given configuration settings.
[in] | inConfigData | Specifies the grabber configuration. |
Definition at line 40 of file ntv2ccgrabber.cpp.
|
virtual |
Definition at line 80 of file ntv2ccgrabber.cpp.
|
staticprotected |
This static function gets called whenever 608 captioning changes.
[in] | pInstance | A valid pointer to the NTV2CCGrabber instance. |
[in] | inChangeInfo | The 608 captioning change. |
Definition at line 1555 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
This function gets called whenever caption changes occur.
[in] | inChangeInfo | The caption change that occurred. |
Definition at line 1549 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Repeatedly captures frames using AutoCirculate (until global quit flag set).
Definition at line 651 of file ntv2ccgrabber.cpp.
|
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.
[in] | pThread | Points to the AJAThread instance. |
[in] | pContext | Context information to pass to the thread. (For this application, this will be set to point to the NTV2Burn instance.) |
Definition at line 639 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Outputs CC data.
[in] | inFrameNum | Specifies the current frame number. |
[in] | inCCData | Specifies the current CC data. |
[in] | inVideoFormat | Specifies the current video format. |
Definition at line 1185 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Extracts closed-caption data, if present, and emits it on a character-by-character basis to the standard output stream.
[in] | inFrameCount | Specifies the current frame number of the captured video. |
[in] | inVideoFormat | Specifies the current video format of the captured video. |
Definition at line 979 of file ntv2ccgrabber.cpp.
|
static |
Returns a string containing a concatenation of human-readable names of every available NTV2Line21Channel value.
[in] | inDelimiter | The string to be used to separate each name. Defaults to ", ". |
Definition at line 1563 of file ntv2ccgrabber.cpp.
|
virtual |
Initializes me and prepares me to Run.
Definition at line 119 of file ntv2ccgrabber.cpp.
|
inlinevirtual |
Returns true if my capture thread is currently running.
Definition at line 159 of file ntv2ccgrabber.h.
|
inlinevirtual |
Returns true if my play thread is currently running.
Definition at line 165 of file ntv2ccgrabber.h.
|
protectedvirtual |
Repeatedly updates captions (until global quit flag set).
Definition at line 1420 of file ntv2ccgrabber.cpp.
|
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.
[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 NTV2CCGrabber instance.) |
Definition at line 1409 of file ntv2ccgrabber.cpp.
|
virtual |
Gracefully stops me from running.
Definition at line 102 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Releases my circular buffers.
Definition at line 240 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
[in] | inVideoFormat | Specifies the video format in use. |
Definition at line 389 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
[in] | inVideoFormat | Specifies the desired output video format. |
Definition at line 1314 of file ntv2ccgrabber.cpp.
|
virtual |
Runs me.
Definition at line 608 of file ntv2ccgrabber.cpp.
|
virtual |
Changes the caption channel I'm displaying.
inNewChannel | Specifies the new caption channel of interest. |
Definition at line 1533 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Sets the device output standard based on the given video format.
[in] | inVideoFormat | Specifies the video format. |
Definition at line 587 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Sets up audio for capture (and playout, if burning captions).
Definition at line 338 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Sets up my circular buffers.
[in] | inVideoFormat | Specifies the video format. |
Definition at line 200 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Sets up everything I need for capturing video.
Definition at line 257 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Sets up everything I need for capturing video.
[in] | inVideoFormat | Specifies the desired output video format. |
Definition at line 1288 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Starts my capture thread.
Definition at line 625 of file ntv2ccgrabber.cpp.
|
virtual |
Starts my playout thread.
Definition at line 1394 of file ntv2ccgrabber.cpp.
|
virtual |
Switches/rotates –608src.
Definition at line 954 of file ntv2ccgrabber.cpp.
|
virtual |
Switches/rotates –output mode.
Definition at line 943 of file ntv2ccgrabber.cpp.
|
virtual |
Switches/rotates –pixelFormat.
Definition at line 965 of file ntv2ccgrabber.cpp.
|
inlinevirtual |
Toggles the Head-Up-Display.
Definition at line 176 of file ntv2ccgrabber.h.
|
virtual |
Toggles the use of VANC. (Debug, experimental)
Definition at line 936 of file ntv2ccgrabber.cpp.
|
protectedvirtual |
Wait for a stable input signal, and return it.
Definition at line 827 of file ntv2ccgrabber.cpp.