AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
NTV2DolbyCapture Class Reference

I capture HDMI Dolby audio from an HDMI input of an AJA device. More...

#include <ntv2dolbycapture.h>

Public Member Functions

 NTV2DolbyCapture (const DolbyCaptureConfig &inConfig)
 Constructs me using the given settings. More...
 
virtual ~NTV2DolbyCapture ()
 
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...
 
virtual uint32_t RecoverAudio (const NTV2Buffer &inAncBuffer, const uint32_t inAncSize, NTV2Buffer &outAudioBuffer)
 Recover audio from ancillary data. More...
 
virtual uint32_t RecoverDolby (const NTV2Buffer &inAudioBuffer, const uint32_t inAudioSize, NTV2Buffer &outDolbyBuffer)
 Recover Dolby data from the given audio data. 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

I capture HDMI Dolby audio from an HDMI input of an AJA device.

Definition at line 45 of file ntv2dolbycapture.h.

Constructor & Destructor Documentation

◆ NTV2DolbyCapture()

NTV2DolbyCapture::NTV2DolbyCapture ( const DolbyCaptureConfig 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 24 of file ntv2dolbycapture.cpp.

◆ ~NTV2DolbyCapture()

NTV2DolbyCapture::~NTV2DolbyCapture ( )
virtual

Definition at line 39 of file ntv2dolbycapture.cpp.

Member Function Documentation

◆ CaptureFrames()

void NTV2DolbyCapture::CaptureFrames ( void  )
protectedvirtual

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

Definition at line 430 of file ntv2dolbycapture.cpp.

◆ ConsumeFrames()

void NTV2DolbyCapture::ConsumeFrames ( void  )
protectedvirtual

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

mProgressive &&

mProgressive &&

mProgressive &&

mProgressive &&

Definition at line 302 of file ntv2dolbycapture.cpp.

◆ ConsumerThreadStatic()

void NTV2DolbyCapture::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 NTV2DolbyCapture instance.)

Definition at line 290 of file ntv2dolbycapture.cpp.

◆ GetACStatus()

void NTV2DolbyCapture::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 530 of file ntv2dolbycapture.cpp.

◆ Init()

AJAStatus NTV2DolbyCapture::Init ( void  )
virtual

Initializes me and prepares me to Run.

Definition at line 71 of file ntv2dolbycapture.cpp.

◆ ProducerThreadStatic()

void NTV2DolbyCapture::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 NTV2DolbyCapture instance.)

Definition at line 418 of file ntv2dolbycapture.cpp.

◆ Quit()

void NTV2DolbyCapture::Quit ( void  )
virtual

Gracefully stops me from running.

Definition at line 50 of file ntv2dolbycapture.cpp.

◆ RecoverAudio()

uint32_t NTV2DolbyCapture::RecoverAudio ( const NTV2Buffer inAncBuffer,
const uint32_t  inAncSize,
NTV2Buffer outAudioBuffer 
)
protectedvirtual

Recover audio from ancillary data.

Returns
The number of audio bytes copied into outAudioBuffer.

Definition at line 539 of file ntv2dolbycapture.cpp.

◆ RecoverDolby()

uint32_t NTV2DolbyCapture::RecoverDolby ( const NTV2Buffer inAudioBuffer,
const uint32_t  inAudioSize,
NTV2Buffer outDolbyBuffer 
)
protectedvirtual

Recover Dolby data from the given audio data.

Parameters
[in]inAudioBufferA valid buffer containing the captured audio data.
[in]inAudioSizeSpecifies the size of the given audio data buffer.
[out]inAudioSizeSpecifies the size of the given audio data buffer.
Returns
The number of 16-bit words copied into outDolbyBuffer.

Definition at line 644 of file ntv2dolbycapture.cpp.

◆ RouteInputSignal()

bool NTV2DolbyCapture::RouteInputSignal ( void  )
protectedvirtual

Sets up device routing for capture.

Definition at line 250 of file ntv2dolbycapture.cpp.

◆ Run()

AJAStatus NTV2DolbyCapture::Run ( void  )
virtual

Runs me.

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

Definition at line 266 of file ntv2dolbycapture.cpp.

◆ SetupAudio()

AJAStatus NTV2DolbyCapture::SetupAudio ( void  )
protectedvirtual

Sets up everything I need for capturing audio.

Definition at line 197 of file ntv2dolbycapture.cpp.

◆ SetupHostBuffers()

void NTV2DolbyCapture::SetupHostBuffers ( void  )
protectedvirtual

Sets up my circular buffers.

Definition at line 204 of file ntv2dolbycapture.cpp.

◆ SetupVideo()

AJAStatus NTV2DolbyCapture::SetupVideo ( void  )
protectedvirtual

Sets up everything I need for capturing video.

Definition at line 154 of file ntv2dolbycapture.cpp.

◆ StartConsumerThread()

void NTV2DolbyCapture::StartConsumerThread ( void  )
protectedvirtual

Starts my frame consumer thread.

Definition at line 279 of file ntv2dolbycapture.cpp.

◆ StartProducerThread()

void NTV2DolbyCapture::StartProducerThread ( void  )
protectedvirtual

Starts my capture thread.

Definition at line 407 of file ntv2dolbycapture.cpp.


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