OpenCV  4.1.0
Open Source Computer Vision
Public Types | Public Member Functions | List of all members
cv::cudacodec::EncoderCallBack Class Referenceabstract

Callbacks for CUDA video encoder. More...

#include <opencv2/cudacodec.hpp>

Public Types

enum  PicType {
  IFRAME = 1,
  PFRAME = 2,
  BFRAME = 3
}
 

Public Member Functions

virtual ~EncoderCallBack ()
 
virtual ucharacquireBitStream (int *bufferSize)=0
 Callback function to signal the start of bitstream that is to be encoded.
 
virtual void onBeginFrame (int frameNumber, EncoderCallBack::PicType picType)=0
 Callback function to signal that the encoding operation on the frame has started.
 
virtual void onEndFrame (int frameNumber, EncoderCallBack::PicType picType)=0
 Callback function signals that the encoding operation on the frame has finished.
 
virtual void releaseBitStream (unsigned char *data, int size)=0
 Callback function to signal that the encoded bitstream is ready to be written to file.
 

Detailed Description

Callbacks for CUDA video encoder.

Member Enumeration Documentation

Enumerator
IFRAME 
PFRAME 
BFRAME 

Constructor & Destructor Documentation

virtual cv::cudacodec::EncoderCallBack::~EncoderCallBack ( )
inlinevirtual

Member Function Documentation

virtual uchar* cv::cudacodec::EncoderCallBack::acquireBitStream ( int *  bufferSize)
pure virtual

Callback function to signal the start of bitstream that is to be encoded.

Callback must allocate buffer for CUDA encoder and return pointer to it and it's size.

virtual void cv::cudacodec::EncoderCallBack::onBeginFrame ( int  frameNumber,
EncoderCallBack::PicType  picType 
)
pure virtual

Callback function to signal that the encoding operation on the frame has started.

Parameters
frameNumber
picTypeSpecify frame type (I-Frame, P-Frame or B-Frame).
virtual void cv::cudacodec::EncoderCallBack::onEndFrame ( int  frameNumber,
EncoderCallBack::PicType  picType 
)
pure virtual

Callback function signals that the encoding operation on the frame has finished.

Parameters
frameNumber
picTypeSpecify frame type (I-Frame, P-Frame or B-Frame).
virtual void cv::cudacodec::EncoderCallBack::releaseBitStream ( unsigned char *  data,
int  size 
)
pure virtual

Callback function to signal that the encoded bitstream is ready to be written to file.


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