Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
H264DecoderNvCodecHelper Class Reference

#include <H264DecoderNvCodecHelper.h>

Inheritance diagram for H264DecoderNvCodecHelper:
Inheritance graph
Collaboration diagram for H264DecoderNvCodecHelper:
Collaboration graph

Public Member Functions

 H264DecoderNvCodecHelper (int mWidth, int mHieght)
 
 H264DecoderNvCodecHelper ()
 
 ~H264DecoderNvCodecHelper ()
 
bool init (std::function< void(frame_sp &)> send, std::function< frame_sp()> makeFrame)
 
void ConvertToPlanar (uint8_t *pHostFrame, int nWidth, int nHeight, int nBitDepth)
 
void process (void *inputFrameBuffer, size_t inputFrameSize, uint64_t inputFrameTS)
 
- Public Member Functions inherited from NvDecoder
 NvDecoder (CUcontext cuContext, int nWidth, int nHeight, bool bUseDeviceFrame, cudaVideoCodec eCodec, std::mutex *pMutex=NULL, bool bLowLatency=false, bool bDeviceFramePitched=false, const Rect *pCropRect=NULL, const Dim *pResizeDim=NULL, int maxWidth=0, int maxHeight=0)
 This function is used to initialize the decoder session. Application must call this function to initialize the decoder, before starting to decode any frames.
 
 NvDecoder ()
 
 ~NvDecoder ()
 
CUcontext GetContext ()
 This function is used to get the current CUDA context.
 
int GetWidth ()
 This function is used to get the current decode width.
 
int GetHeight ()
 This function is used to get the current decode height.
 
int GetFrameSize ()
 This function is used to get the current frame size based on pixel format.
 
int GetDeviceFramePitch ()
 This function is used to get the pitch of the device buffer holding the decoded frame.
 
int GetBitDepth ()
 This function is used to get the bit depth associated with the pixel format.
 
CUVIDEOFORMAT GetVideoFormatInfo ()
 This function is used to get information about the video stream (codec, display parameters etc)
 
std::string GetVideoInfo () const
 This function is used to print information about the video stream.
 
bool Decode (const uint8_t *pData, int nSize, uint8_t ***pppFrame, int *pnFrameReturned, uint32_t flags=0, int64_t **ppTimestamp=NULL, int64_t timestamp=0, CUstream stream=0)
 This function decodes a frame and returns frames that are available for display. The frames should be used or buffered before making subsequent calls to the Decode function again.
 
bool DecodeLockFrame (const uint8_t *pData, int nSize, uint8_t ***pppFrame, int *pnFrameReturned, uint32_t flags=0, int64_t **ppTimestamp=NULL, int64_t timestamp=0, CUstream stream=0)
 This function decodes a frame and returns the locked frame buffers This makes the buffers available for use by the application without the buffers getting overwritten, even if subsequent decode calls are made. The frame buffers remain locked, until UnlockFrame() is called.
 
void UnlockFrame (uint8_t **ppFrame, int nFrame)
 This function unlocks the frame buffer and makes the frame buffers available for write again.
 
int setReconfigParams (const Rect *pCropRect, const Dim *pResizeDim)
 This function allow app to set decoder reconfig params.
 

Public Attributes

std::function< void(frame_sp &)> send
 
std::function< frame_sp()> makeFrame
 

Private Attributes

boost::shared_ptr< NvDecoderhelper
 
std::queue< uint64_t > framesTimestampEntry
 

Constructor & Destructor Documentation

◆ H264DecoderNvCodecHelper() [1/2]

H264DecoderNvCodecHelper::H264DecoderNvCodecHelper ( int mWidth,
int mHieght )
Here is the call graph for this function:

◆ H264DecoderNvCodecHelper() [2/2]

H264DecoderNvCodecHelper::H264DecoderNvCodecHelper ( )
inline

◆ ~H264DecoderNvCodecHelper()

H264DecoderNvCodecHelper::~H264DecoderNvCodecHelper ( )
inline

Member Function Documentation

◆ ConvertToPlanar()

void H264DecoderNvCodecHelper::ConvertToPlanar ( uint8_t * pHostFrame,
int nWidth,
int nHeight,
int nBitDepth )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

bool H264DecoderNvCodecHelper::init ( std::function< void(frame_sp &)> send,
std::function< frame_sp()> makeFrame )

◆ process()

void H264DecoderNvCodecHelper::process ( void * inputFrameBuffer,
size_t inputFrameSize,
uint64_t inputFrameTS )
Here is the call graph for this function:

Member Data Documentation

◆ framesTimestampEntry

std::queue<uint64_t> H264DecoderNvCodecHelper::framesTimestampEntry
private

◆ helper

boost::shared_ptr<NvDecoder> H264DecoderNvCodecHelper::helper
private

◆ makeFrame

std::function<frame_sp()> H264DecoderNvCodecHelper::makeFrame

◆ send

std::function<void( frame_sp&)> H264DecoderNvCodecHelper::send

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