9 #ifndef _NTV2CCGRABBER_H 10 #define _NTV2CCGRABBER_H 42 #define IS_VALID_OutputMode(_x_) ((_x_) >= kOutputMode_CaptionStream && (_x_) < kOutputMode_INVALID) 56 #define IS_VALID_CaptionDataSrc(_x_) ((_x_) >= kCaptionDataSrc_Default && (_x_) < kCaptionDataSrc_INVALID) 147 virtual void Quit (
void);
176 virtual inline void ToggleHUD (
void) {mHeadUpDisplayOn = !mHeadUpDisplayOn;}
318 std::string mLastOutStr;
319 uint32_t mFirstOutFrame;
320 uint32_t mLastOutFrame;
339 bool mHeadUpDisplayOn;
348 #endif // _NTV2CCGRABBER_H
virtual bool IsPlayThreadRunning(void) const
Returns true if my play thread is currently running.
virtual void SetCaptionDisplayChannel(const NTV2Line21Channel inNewChannel)
Changes the caption channel I'm displaying.
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Declares common types used in the ajabase library.
virtual bool RouteOutputSignal(const NTV2VideoFormat inVideoFormat)
This class is used to respond to dynamic events that occur during CEA-608 caption decoding...
CaptionDataSrc fCaptionSrc
Caption data source (Line21? 608 VANC? 608 Anc? etc)
I interrogate and control an AJA video/audio capture/playout device.
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
Declares the CNTV2VPID class. See SMPTE 352 standard for details.
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
bool fUseVanc
If true, use Vanc, even if the device supports Anc insertion.
static void Caption608ChangedStatic(void *pInstance, const NTV2Caption608ChangeInfo &inChangeInfo)
This static function gets called whenever 608 captioning changes.
virtual NTV2VideoFormat WaitForStableInputSignal(void)
Wait for a stable input signal, and return it.
std::vector< AJALabelValuePair > AJALabelValuePairs
An ordered sequence of label/value pairs.
Declares the AJATime class.
bool fWithAnc
If true, also capture Anc.
bool fBurnCaptions
If true, burn-in captions on 2nd channel.
CCGrabberConfig(const std::string &inDeviceSpecifier="0")
Constructs a default CCPlayer configuration.
static void CaptureThreadStatic(AJAThread *pThread, void *pContext)
This is the capture thread's static callback function that gets called when the capture thread runs...
I can decode captions from frames captured from an AJA device in real time. I can optionally play the...
virtual bool IsCaptureThreadRunning(void) const
Returns true if my capture thread is currently running.
virtual AJAStatus Run(void)
Runs me.
This class is used to configure an NTV2CCGrabber instance.
Declares the AJATimeCodeBurn class.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
virtual void ToggleVANC(void)
Toggles the use of VANC. (Debug, experimental)
virtual void PlayFrames(void)
Repeatedly updates captions (until global quit flag set).
unsigned GetNumSourceSpecs(void) const
bool fWithAudio
If true, also capture Audio.
static void PlayThreadStatic(AJAThread *pThread, void *pContext)
This is the playout thread's static callback function that gets called when the playout thread runs...
NTV2Channel fInputChannel
The device channel to use.
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
std::ostream & operator<<(std::ostream &ioStrm, const CCGrabberConfig &inObj)
virtual AJAStatus SetupInputVideo(void)
Sets up everything I need for capturing video.
virtual AJAStatus SetupAudio(void)
Sets up audio for capture (and playout, if burning captions).
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Enumerations for controlling NTV2 devices.
This class is used to configure an NTV2Capture instance.
Declares the AJAThread class.
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Declares the CNTV2CaptionDecoder708 class.
NTV2CCGrabber(const CCGrabberConfig &inConfigData)
Constructs me using the given configuration settings.
virtual void Switch608Source(void)
Switches/rotates –608src.
NTV2Line21Channel fCaptionChannel
Caption channel to monitor (defaults to CC1)
Caption channel 1, the primary caption channel.
virtual void SwitchPixelFormat(void)
Switches/rotates –pixelFormat.
virtual AJAStatus SetupOutputVideo(const NTV2VideoFormat inVideoFormat)
Sets up everything I need for capturing video.
virtual void ReleaseHostBuffers(void)
Releases my circular buffers.
static std::string OutputModeToString(const OutputMode inMode)
Declares the CNTV2DeviceScanner class.
enum _CaptionDataSrc CaptionDataSrc
#define NTV2_IS_VALID_CHANNEL(__x__)
virtual void CaptureFrames(void)
Repeatedly captures frames using AutoCirculate (until global quit flag set).
Declares the AJAProcess class.
virtual AJAStatus StartCaptureThread(void)
Starts my capture thread.
Declares the CNTV2Task class (deprecated).
std::vector< NTV2FrameData > NTV2FrameDataArray
A vector of NTV2FrameData elements.
virtual void SetOutputStandards(const NTV2VideoFormat inVideoFormat)
Sets the device output standard based on the given video format.
Declaration of AJACircularBuffer template class.
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
virtual AJAStatus SetupHostBuffers(const NTV2VideoFormat inVideoFormat)
Sets up my circular buffers.
Declares the AJATimeCode class.
NTV2InputSource fInputSource
The device input connector to use.
virtual void DoCCOutput(const uint32_t inFrameNum, const CaptionData &inCCData, const NTV2VideoFormat inVideoFormat)
Outputs CC data.
virtual AJAStatus StartPlayThread(void)
Starts my playout thread.
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
#define NTV2_IS_VALID_INPUT_SOURCE(_inpSrc_)
virtual void SwitchOutput(void)
Switches/rotates –output mode.
Declares numerous NTV2 utility functions.
virtual bool RouteInputSignal(const NTV2VideoFormat inVideoFormat)
Declares the AJASystemInfo class.
This structure encapsulates all possible CEA-608 caption data bytes that may be associated with a giv...
NTV2VANCMode
These enum values identify the available VANC modes.
static CaptionDataSrc StringToCaptionDataSrc(const std::string &inDataSrcStr)
static OutputMode StringToOutputMode(const std::string &inModeStr)
A convenience class that simplifies encoding or decoding the 4-byte VPID payload that can be read or ...
enum _OutputMode OutputMode
static std::string GetLegalCaptionDataSources(void)
This file contains some structures, constants, classes and functions that are used in some of the dem...
virtual void Quit(void)
Gracefully stops me from running.
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 stand...
NTV2TCIndex fTimecodeSource
Timecode source to use (if any)
virtual void ToggleHUD(void)
Toggles the Head-Up-Display.
AJALabelValuePairs Get(const bool inCompact=(0)) const
NTV2Line21Mode
The CEA-608 modes: pop-on, roll-up (2, 3 and 4-line), and paint-on.
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
OutputMode fOutputMode
Desired output (captionStream, Screen etc)
static std::string GetLegalOutputModes(void)
Declares the CNTV2CaptionDecoder608 class.
NTV2Line21Channel
The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.
Declares the enumeration constants used in the ajabase library.
virtual void CaptioningChanged(const NTV2Caption608ChangeInfo &inChangeInfo)
This function gets called whenever caption changes occur.
I am a circular frame buffer that simplifies implementing a type-safe producer/consumer model for pro...
static std::string GetLine21ChannelNames(std::string inDelimiter=", ")
Returns a string containing a concatenation of human-readable names of every available NTV2Line21Chan...
Declares device capability functions.
CCGrabberConfig CCGrabberConfig
This class is used to configure an NTV2CCGrabber instance.
static std::string CaptionDataSrcToString(const CaptionDataSrc inDataSrc)