AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
NTV2EncodeHEVC Class Reference

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

#include <ntv2encodehevc.h>

Public Member Functions

 NTV2EncodeHEVC (const std::string inDeviceSpecifier="0", const NTV2Channel inChannel=NTV2_CHANNEL1, const M31VideoPreset inM31Preset=M31_FILE_1280X720_420_8_5994p, const NTV2FrameBufferFormat inPixelFormat=NTV2_FBF_10BIT_YCBCR_420PL2, const bool inQuadMode=(0), const uint32_t inAudioChannels=0, const bool inTimeCodeBurn=(0), const bool inInfoMode=(0), const bool inTsiMode=(0), const uint32_t inMaxFrames=0xffffffff)
 Constructs me using the given settings. More...
 
virtual ~NTV2EncodeHEVC ()
 
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 GetStatus (AVHevcStatus &outStatus)
 Provides status information about my input (capture) process. More...
 
virtual M31VideoPreset GetCodecPreset (void)
 Get the codec preset. 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 void RouteInputSignal (void)
 Sets up device routing for capture. More...
 
virtual void SetupHostBuffers (void)
 Sets up my circular buffers. More...
 
virtual void SetupAutoCirculate (void)
 Initializes AutoCirculate. More...
 
virtual void StartVideoInputThread (void)
 Start the video input thread. More...
 
virtual void StartVideoProcessThread (void)
 Start the video process thread.
More...
 
virtual void StartCodecRawThread (void)
 Start the codec raw thread.
More...
 
virtual void StartCodecHevcThread (void)
 Start the codec hevc thread.
More...
 
virtual void StartVideoFileThread (void)
 Start the video file writer thread. More...
 
virtual void StartAudioFileThread (void)
 Start the audio file writer thread. More...
 
virtual void VideoInputWorker (void)
 Repeatedly captures video frames using AutoCirculate and add them to the video input ring. More...
 
virtual void VideoProcessWorker (void)
 Repeatedly removes video frames from the video input ring, calls a custom video process method and adds the result to the raw video ring. More...
 
virtual void CodecRawWorker (void)
 Repeatedly removes video frames from the raw video ring and transfers them to the codec. More...
 
virtual void CodecHevcWorker (void)
 Repeatedly transfers hevc frames from the codec and adds them to the hevc ring. More...
 
virtual void VideoFileWorker (void)
 Repeatedly removes hevc frame from the hevc ring and writes them to the hevc output file. More...
 
virtual void AudioFileWorker (void)
 Repeatedly removes audio samples from the audio input ring and writes them to the audio output file. More...
 
virtual AJAStatus ProcessVideoFrame (AVHevcDataBuffer *pSrcFrame, AVHevcDataBuffer *pDstFrame, uint32_t frameNumber)
 Default do-nothing function for processing the captured frames. More...
 

Static Protected Member Functions

static void VideoInputThreadStatic (AJAThread *pThread, void *pContext)
 This is the video input thread's static callback function that gets called when the thread starts. This function gets "Attached" to the AJAThread instance. More...
 
static void VideoProcessThreadStatic (AJAThread *pThread, void *pContext)
 This is the video process thread's static callback function that gets called when the thread starts. This function gets "Attached" to the consumer thread's AJAThread instance. More...
 
static void CodecRawThreadStatic (AJAThread *pThread, void *pContext)
 This is the codec raw thread's static callback function that gets called when the thread starts. This function gets "Attached" to the consumer thread's AJAThread instance. More...
 
static void CodecHevcThreadStatic (AJAThread *pThread, void *pContext)
 This is the codec hevc thread's static callback function that gets called when the thread starts. This function gets "Attached" to the consumer thread's AJAThread instance. More...
 
static void VideoFileThreadStatic (AJAThread *pThread, void *pContext)
 This is the video file writer thread's static callback function that gets called when the thread starts. This function gets "Attached" to the consumer thread's AJAThread instance. More...
 
static void AudioFileThreadStatic (AJAThread *pThread, void *pContext)
 This is the audio file writer thread's static callback function that gets called when the thread starts. This function gets "Attached" to the consumer thread's 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 37 of file ntv2encodehevc.h.

Constructor & Destructor Documentation

◆ NTV2EncodeHEVC()

NTV2EncodeHEVC::NTV2EncodeHEVC ( const std::string  inDeviceSpecifier = "0",
const NTV2Channel  inChannel = NTV2_CHANNEL1,
const M31VideoPreset  inM31Preset = M31_FILE_1280X720_420_8_5994p,
const NTV2FrameBufferFormat  inPixelFormat = NTV2_FBF_10BIT_YCBCR_420PL2,
const bool  inQuadMode = (0),
const uint32_t  inAudioChannels = 0,
const bool  inTimeCodeBurn = (0),
const bool  inInfoMode = (0),
const bool  inTsiMode = (0),
const uint32_t  inMaxFrames = 0xffffffff 
)

Constructs me using the given settings.

Note
I'm not completely initialized and ready to use until after my Init method has been called.
Parameters
[in]inDeviceSpecifierSpecifies the AJA device to use. Defaults to "0" (first device found).
[in]inChannelSpecifies the channel to use. Defaults to NTV2_CHANNEL1.
[in]inM31PresetSpecifies the m31 preset to use. Defaults to 8-bit 1280x720 5994p.
[in]inPixelFormatSpecifies the pixel format to use. Defaults to NTV2_FBF_10BIT_YCBCR_420PL2.
[in]inQuadModeSpecifies UHD mode. Defaults to HD mode.
[in]inAudioChannelsSpecifies number of audio channels to write to AIFF file. Defaults to 2 channels.
[in]inTimeCodeBurnAdd timecode burn. Defaults to no timecode burn.
[in]inInfoModeUse picture and encoded information. Defaults to no info data.
[in]inTsiModeUse two sample interleave mode for UHD/4K. Defaults to square division mode.
[in]inMaxFramesSpecifies the maximum number of frames to capture. Defaults to 0xFFFFFFFF (unlimited).

Definition at line 21 of file ntv2encodehevc.cpp.

◆ ~NTV2EncodeHEVC()

NTV2EncodeHEVC::~NTV2EncodeHEVC ( )
virtual

Definition at line 84 of file ntv2encodehevc.cpp.

Member Function Documentation

◆ AudioFileThreadStatic()

void NTV2EncodeHEVC::AudioFileThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the audio file writer thread's static callback function that gets called when the thread starts. 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.

Definition at line 1347 of file ntv2encodehevc.cpp.

◆ AudioFileWorker()

void NTV2EncodeHEVC::AudioFileWorker ( void  )
protectedvirtual

Repeatedly removes audio samples from the audio input ring and writes them to the audio output file.

Definition at line 1357 of file ntv2encodehevc.cpp.

◆ CodecHevcThreadStatic()

void NTV2EncodeHEVC::CodecHevcThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the codec hevc thread's static callback function that gets called when the thread starts. 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.

Definition at line 1150 of file ntv2encodehevc.cpp.

◆ CodecHevcWorker()

void NTV2EncodeHEVC::CodecHevcWorker ( void  )
protectedvirtual

Repeatedly transfers hevc frames from the codec and adds them to the hevc ring.

Definition at line 1160 of file ntv2encodehevc.cpp.

◆ CodecRawThreadStatic()

void NTV2EncodeHEVC::CodecRawThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the codec raw thread's static callback function that gets called when the thread starts. 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.

Definition at line 1018 of file ntv2encodehevc.cpp.

◆ CodecRawWorker()

void NTV2EncodeHEVC::CodecRawWorker ( void  )
protectedvirtual

Repeatedly removes video frames from the raw video ring and transfers them to the codec.

Definition at line 1028 of file ntv2encodehevc.cpp.

◆ GetCodecPreset()

M31VideoPreset NTV2EncodeHEVC::GetCodecPreset ( void  )
virtual

Get the codec preset.

Definition at line 408 of file ntv2encodehevc.cpp.

◆ GetStatus()

void NTV2EncodeHEVC::GetStatus ( AVHevcStatus outStatus)
virtual

Provides status information about my input (capture) process.

Parameters
[out]outStatusReceives status information about my input (capture) process.

Definition at line 1390 of file ntv2encodehevc.cpp.

◆ Init()

AJAStatus NTV2EncodeHEVC::Init ( void  )
virtual

Initializes me and prepares me to Run.

Definition at line 259 of file ntv2encodehevc.cpp.

◆ ProcessVideoFrame()

AJAStatus NTV2EncodeHEVC::ProcessVideoFrame ( AVHevcDataBuffer pSrcFrame,
AVHevcDataBuffer pDstFrame,
uint32_t  frameNumber 
)
protectedvirtual

Default do-nothing function for processing the captured frames.

Definition at line 1401 of file ntv2encodehevc.cpp.

◆ Quit()

void NTV2EncodeHEVC::Quit ( void  )
virtual

Gracefully stops me from running.

Definition at line 181 of file ntv2encodehevc.cpp.

◆ RouteInputSignal()

void NTV2EncodeHEVC::RouteInputSignal ( void  )
protectedvirtual

Sets up device routing for capture.

Definition at line 653 of file ntv2encodehevc.cpp.

◆ Run()

AJAStatus NTV2EncodeHEVC::Run ( void  )
virtual

Runs me.

Note
Do not call this method without first calling my Init method.

Definition at line 772 of file ntv2encodehevc.cpp.

◆ SetupAudio()

AJAStatus NTV2EncodeHEVC::SetupAudio ( void  )
protectedvirtual

Sets up everything I need for capturing audio.

Definition at line 559 of file ntv2encodehevc.cpp.

◆ SetupAutoCirculate()

void NTV2EncodeHEVC::SetupAutoCirculate ( void  )
protectedvirtual

Initializes AutoCirculate.

Definition at line 756 of file ntv2encodehevc.cpp.

◆ SetupHostBuffers()

void NTV2EncodeHEVC::SetupHostBuffers ( void  )
protectedvirtual

Sets up my circular buffers.

Definition at line 581 of file ntv2encodehevc.cpp.

◆ SetupVideo()

AJAStatus NTV2EncodeHEVC::SetupVideo ( void  )
protectedvirtual

Sets up everything I need for capturing video.

Definition at line 414 of file ntv2encodehevc.cpp.

◆ StartAudioFileThread()

void NTV2EncodeHEVC::StartAudioFileThread ( void  )
protectedvirtual

Start the audio file writer thread.

Definition at line 1337 of file ntv2encodehevc.cpp.

◆ StartCodecHevcThread()

void NTV2EncodeHEVC::StartCodecHevcThread ( void  )
protectedvirtual

Start the codec hevc thread.

Definition at line 1140 of file ntv2encodehevc.cpp.

◆ StartCodecRawThread()

void NTV2EncodeHEVC::StartCodecRawThread ( void  )
protectedvirtual

Start the codec raw thread.

Definition at line 1008 of file ntv2encodehevc.cpp.

◆ StartVideoFileThread()

void NTV2EncodeHEVC::StartVideoFileThread ( void  )
protectedvirtual

Start the video file writer thread.

Definition at line 1278 of file ntv2encodehevc.cpp.

◆ StartVideoInputThread()

void NTV2EncodeHEVC::StartVideoInputThread ( void  )
protectedvirtual

Start the video input thread.

Definition at line 794 of file ntv2encodehevc.cpp.

◆ StartVideoProcessThread()

void NTV2EncodeHEVC::StartVideoProcessThread ( void  )
protectedvirtual

Start the video process thread.

Definition at line 957 of file ntv2encodehevc.cpp.

◆ VideoFileThreadStatic()

void NTV2EncodeHEVC::VideoFileThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the video file writer thread's static callback function that gets called when the thread starts. 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.

Definition at line 1288 of file ntv2encodehevc.cpp.

◆ VideoFileWorker()

void NTV2EncodeHEVC::VideoFileWorker ( void  )
protectedvirtual

Repeatedly removes hevc frame from the hevc ring and writes them to the hevc output file.

Definition at line 1298 of file ntv2encodehevc.cpp.

◆ VideoInputThreadStatic()

void NTV2EncodeHEVC::VideoInputThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the video input thread's static callback function that gets called when the thread starts. This function gets "Attached" to the AJAThread instance.

Parameters
[in]pThreadPoints to the AJAThread instance.
[in]pContextContext information to pass to the thread.

Definition at line 804 of file ntv2encodehevc.cpp.

◆ VideoInputWorker()

void NTV2EncodeHEVC::VideoInputWorker ( void  )
protectedvirtual

Repeatedly captures video frames using AutoCirculate and add them to the video input ring.

Definition at line 814 of file ntv2encodehevc.cpp.

◆ VideoProcessThreadStatic()

void NTV2EncodeHEVC::VideoProcessThreadStatic ( AJAThread pThread,
void *  pContext 
)
staticprotected

This is the video process thread's static callback function that gets called when the thread starts. 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.

Definition at line 967 of file ntv2encodehevc.cpp.

◆ VideoProcessWorker()

void NTV2EncodeHEVC::VideoProcessWorker ( void  )
protectedvirtual

Repeatedly removes video frames from the video input ring, calls a custom video process method and adds the result to the raw video ring.

Definition at line 977 of file ntv2encodehevc.cpp.


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