AJA NTV2 SDK  18.0.0.2717
NTV2 SDK 18.0.0.2717
NTV2Capture4K Class Reference

Instances of me capture frames in real time from a video signal provided to an input of an AJA device. More...

#include <ntv2capture4k.h>

Public Member Functions

 NTV2Capture4K (const CaptureConfig &inConfig)
 Constructs me using the given settings. More...
 
virtual ~NTV2Capture4K ()
 
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 (ULWord &outGoodFrames, ULWord &outDroppedFrames, ULWord &outBufferLevel)
 Provides status information about my input (capture) process. More...
 

Protected Member Functions

virtual AJAStatus SetupVideo (void)
 Sets up everything I need for capturing video. More...
 
virtual AJAStatus SetupAudio (void)
 Sets up everything I need for capturing audio. More...
 
virtual bool RouteInputSignal (void)
 Sets up device routing for capture. More...
 
virtual void SetupHostBuffers (void)
 Sets up my circular buffers. More...
 
virtual void StartProducerThread (void)
 Starts my capture thread. More...
 
virtual void CaptureFrames (void)
 Repeatedly captures frames using AutoCirculate (until global quit flag set). More...
 
virtual void StartConsumerThread (void)
 Starts my frame consumer thread. More...
 
virtual void ConsumeFrames (void)
 Repeatedly consumes frames from the circular buffer (until global quit flag set). 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 runs. This function gets "Attached" to the consumer thread's AJAThread instance. More...
 
static void ProducerThreadStatic (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...
 

Detailed Description

Instances of me capture frames in real time from a video signal provided to an input of an AJA device.

Definition at line 19 of file ntv2capture4k.h.

Constructor & Destructor Documentation

◆ NTV2Capture4K()

NTV2Capture4K::NTV2Capture4K ( const CaptureConfig inConfig)

Constructs me using the given settings.

Parameters
[in]inConfigSpecifies how to configure capture.
Note
I'm not completely initialized and ready to use until after my Init method has been called.

Definition at line 22 of file ntv2capture4k.cpp.

◆ ~NTV2Capture4K()

NTV2Capture4K::~NTV2Capture4K ( )
virtual

Definition at line 38 of file ntv2capture4k.cpp.

Member Function Documentation

◆ CaptureFrames()

void NTV2Capture4K::CaptureFrames ( void  )
protectedvirtual

Repeatedly captures frames using AutoCirculate (until global quit flag set).

Definition at line 404 of file ntv2capture4k.cpp.

◆ ConsumeFrames()

void NTV2Capture4K::ConsumeFrames ( void  )
protectedvirtual

Repeatedly consumes frames from the circular buffer (until global quit flag set).

Definition at line 350 of file ntv2capture4k.cpp.

◆ ConsumerThreadStatic()

void NTV2Capture4K::ConsumerThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the consumer thread's static callback function that gets called when the consumer thread runs. 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. (For this application, this will point to the NTV2Capture instance.)

Definition at line 338 of file ntv2capture4k.cpp.

◆ GetACStatus()

void NTV2Capture4K::GetACStatus ( ULWord outGoodFrames,
ULWord outDroppedFrames,
ULWord outBufferLevel 
)
virtual

Provides status information about my input (capture) process.

Parameters
[out]outGoodFramesReceives the number of successfully captured frames.
[out]outDroppedFramesReceives the number of dropped frames.
[out]outBufferLevelReceives the buffer level (number of captured frames ready to be transferred to the host).

Definition at line 476 of file ntv2capture4k.cpp.

◆ Init()

AJAStatus NTV2Capture4K::Init ( void  )
virtual

Initializes me and prepares me to Run.

Definition at line 71 of file ntv2capture4k.cpp.

◆ ProducerThreadStatic()

void NTV2Capture4K::ProducerThreadStatic ( AJAThread pThread,
void *  pContext 
)
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.

Parameters
[in]pThreadPoints to the AJAThread instance.
[in]pContextContext information to pass to the thread. (For this application, this will point to the NTV2Capture instance.)

Definition at line 392 of file ntv2capture4k.cpp.

◆ Quit()

void NTV2Capture4K::Quit ( void  )
virtual

Gracefully stops me from running.

Definition at line 50 of file ntv2capture4k.cpp.

◆ RouteInputSignal()

bool NTV2Capture4K::RouteInputSignal ( void  )
protectedvirtual

Sets up device routing for capture.

Definition at line 299 of file ntv2capture4k.cpp.

◆ Run()

AJAStatus NTV2Capture4K::Run ( void  )
virtual

Runs me.

Note
Call this method only after calling Init and it returned AJA_STATUS_SUCCESS.

Definition at line 314 of file ntv2capture4k.cpp.

◆ SetupAudio()

AJAStatus NTV2Capture4K::SetupAudio ( void  )
protectedvirtual

Sets up everything I need for capturing audio.

Definition at line 227 of file ntv2capture4k.cpp.

◆ SetupHostBuffers()

void NTV2Capture4K::SetupHostBuffers ( void  )
protectedvirtual

Sets up my circular buffers.

Definition at line 256 of file ntv2capture4k.cpp.

◆ SetupVideo()

AJAStatus NTV2Capture4K::SetupVideo ( void  )
protectedvirtual

Sets up everything I need for capturing video.

Definition at line 183 of file ntv2capture4k.cpp.

◆ StartConsumerThread()

void NTV2Capture4K::StartConsumerThread ( void  )
protectedvirtual

Starts my frame consumer thread.

Definition at line 327 of file ntv2capture4k.cpp.

◆ StartProducerThread()

void NTV2Capture4K::StartProducerThread ( void  )
protectedvirtual

Starts my capture thread.

Definition at line 381 of file ntv2capture4k.cpp.


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