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

#include <H264EncoderV4L2Helper.h>

Collaboration diagram for H264EncoderV4L2Helper:
Collaboration graph

Public Types

typedef std::function< void(frame_container &errorFrame)> SendFrameContainer
 

Public Member Functions

 H264EncoderV4L2Helper (enum v4l2_memory memType, uint32_t pixelFormat, uint32_t width, uint32_t height, uint32_t step, uint32_t bitrate, bool enableMotionVectors, int motionVectorThreshold, uint32_t fps, std::string h264FrameOutputPinId, std::string motionVectorFramePinId, framemetadata_sp h264Metadata, std::function< frame_sp(size_t size, string &pinId)> makeFrame, SendFrameContainer sendFrameContainer)
 
 ~H264EncoderV4L2Helper ()
 
void stop ()
 
bool process (frame_sp &frame)
 

Static Public Member Functions

static std::shared_ptr< H264EncoderV4L2Helpercreate (enum v4l2_memory memType, uint32_t pixelFormat, uint32_t width, uint32_t height, uint32_t step, uint32_t bitrate, bool enableMotionVectors, int motionVectorThreshold, uint32_t fps, std::string h264FrameOutputPinId, std::string motionVectorFramePinId, framemetadata_sp h264Metadata, std::function< frame_sp(size_t size, string &pinId)> makeFrame, SendFrameContainer sendFrameContainer)
 

Protected Attributes

std::queue< uint64_t > incomingTimeStamp
 

Private Member Functions

void setSelf (std::shared_ptr< H264EncoderV4L2Helper > &mother)
 
void initV4L2 ()
 
void termV4L2 ()
 
void setBitrate (uint32_t bitrate)
 
void setProfile ()
 
void setLevel ()
 
void setFrameRate (uint32_t framerate_num, uint32_t framerate_den)
 
int setExtControlsMV (v4l2_ext_controls &ctl)
 
int enableMotionVectorReporting ()
 
void initEncoderParams (uint32_t bitrate, uint32_t fps)
 
int setExtControls (v4l2_ext_control &control)
 
void capturePlaneDQCallback (AV4L2Buffer *buffer)
 
void reuseCatureBuffer (ExtFrame *pointer, uint32_t index, std::shared_ptr< H264EncoderV4L2Helper > self)
 
bool processEOS ()
 
int getExtControls (v4l2_ext_controls &ctl)
 
int getMotionVectors (uint32_t buffer_index, v4l2_ctrl_videoenc_outputbuf_metadata_MV &enc_mv_metadata)
 
void serializeMotionVectors (v4l2_ctrl_videoenc_outputbuf_metadata_MV enc_mv_metadata, frame_container &frames)
 

Private Attributes

std::shared_ptr< H264EncoderV4L2HelpermSelf
 
int mFD
 
std::unique_ptr< AV4L2ElementPlanemOutputPlane
 
std::unique_ptr< AV4L2ElementPlanemCapturePlane
 
boost::object_pool< ExtFrameframe_opool
 
SendFrameContainer mSendFrameContainer
 
int mWidth = 0
 
int mHeight = 0
 
bool enableMotionVectors
 
int motionVectorThreshold
 
std::string h264FrameOutputPinId
 
std::string motionVectorFramePinId
 
framemetadata_sp h264Metadata
 
std::function< frame_sp(size_t size, string &pinId)> makeFrame
 
std::unique_ptr< V4L2CUYUV420ConvertermConverter
 

Member Typedef Documentation

◆ SendFrameContainer

std::function<void(frame_container& errorFrame)> H264EncoderV4L2Helper::SendFrameContainer

Constructor & Destructor Documentation

◆ H264EncoderV4L2Helper()

H264EncoderV4L2Helper::H264EncoderV4L2Helper ( enum v4l2_memory memType,
uint32_t pixelFormat,
uint32_t width,
uint32_t height,
uint32_t step,
uint32_t bitrate,
bool enableMotionVectors,
int motionVectorThreshold,
uint32_t fps,
std::string h264FrameOutputPinId,
std::string motionVectorFramePinId,
framemetadata_sp h264Metadata,
std::function< frame_sp(size_t size, string &pinId)> makeFrame,
SendFrameContainer sendFrameContainer )
Here is the call graph for this function:

◆ ~H264EncoderV4L2Helper()

H264EncoderV4L2Helper::~H264EncoderV4L2Helper ( )
Here is the call graph for this function:

Member Function Documentation

◆ capturePlaneDQCallback()

void H264EncoderV4L2Helper::capturePlaneDQCallback ( AV4L2Buffer * buffer)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create()

std::shared_ptr< H264EncoderV4L2Helper > H264EncoderV4L2Helper::create ( enum v4l2_memory memType,
uint32_t pixelFormat,
uint32_t width,
uint32_t height,
uint32_t step,
uint32_t bitrate,
bool enableMotionVectors,
int motionVectorThreshold,
uint32_t fps,
std::string h264FrameOutputPinId,
std::string motionVectorFramePinId,
framemetadata_sp h264Metadata,
std::function< frame_sp(size_t size, string &pinId)> makeFrame,
SendFrameContainer sendFrameContainer )
static
Here is the caller graph for this function:

◆ enableMotionVectorReporting()

int H264EncoderV4L2Helper::enableMotionVectorReporting ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExtControls()

int H264EncoderV4L2Helper::getExtControls ( v4l2_ext_controls & ctl)
private
Here is the caller graph for this function:

◆ getMotionVectors()

int H264EncoderV4L2Helper::getMotionVectors ( uint32_t buffer_index,
v4l2_ctrl_videoenc_outputbuf_metadata_MV & enc_mv_metadata )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initEncoderParams()

void H264EncoderV4L2Helper::initEncoderParams ( uint32_t bitrate,
uint32_t fps )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initV4L2()

void H264EncoderV4L2Helper::initV4L2 ( )
private
Here is the caller graph for this function:

◆ process()

bool H264EncoderV4L2Helper::process ( frame_sp & frame)

◆ processEOS()

bool H264EncoderV4L2Helper::processEOS ( )
private
Here is the caller graph for this function:

◆ reuseCatureBuffer()

void H264EncoderV4L2Helper::reuseCatureBuffer ( ExtFrame * pointer,
uint32_t index,
std::shared_ptr< H264EncoderV4L2Helper > self )
private
Here is the caller graph for this function:

◆ serializeMotionVectors()

void H264EncoderV4L2Helper::serializeMotionVectors ( v4l2_ctrl_videoenc_outputbuf_metadata_MV enc_mv_metadata,
frame_container & frames )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBitrate()

void H264EncoderV4L2Helper::setBitrate ( uint32_t bitrate)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setExtControls()

int H264EncoderV4L2Helper::setExtControls ( v4l2_ext_control & control)
private
Here is the caller graph for this function:

◆ setExtControlsMV()

int H264EncoderV4L2Helper::setExtControlsMV ( v4l2_ext_controls & ctl)
private
Here is the caller graph for this function:

◆ setFrameRate()

void H264EncoderV4L2Helper::setFrameRate ( uint32_t framerate_num,
uint32_t framerate_den )
private
Here is the caller graph for this function:

◆ setLevel()

void H264EncoderV4L2Helper::setLevel ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setProfile()

void H264EncoderV4L2Helper::setProfile ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSelf()

void H264EncoderV4L2Helper::setSelf ( std::shared_ptr< H264EncoderV4L2Helper > & mother)
private

◆ stop()

void H264EncoderV4L2Helper::stop ( )

◆ termV4L2()

void H264EncoderV4L2Helper::termV4L2 ( )
private
Here is the caller graph for this function:

Member Data Documentation

◆ enableMotionVectors

bool H264EncoderV4L2Helper::enableMotionVectors
private

◆ frame_opool

boost::object_pool<ExtFrame> H264EncoderV4L2Helper::frame_opool
private

◆ h264FrameOutputPinId

std::string H264EncoderV4L2Helper::h264FrameOutputPinId
private

◆ h264Metadata

framemetadata_sp H264EncoderV4L2Helper::h264Metadata
private

◆ incomingTimeStamp

std::queue<uint64_t> H264EncoderV4L2Helper::incomingTimeStamp
protected

◆ makeFrame

std::function<frame_sp(size_t size, string& pinId)> H264EncoderV4L2Helper::makeFrame
private

◆ mCapturePlane

std::unique_ptr<AV4L2ElementPlane> H264EncoderV4L2Helper::mCapturePlane
private

◆ mConverter

std::unique_ptr<V4L2CUYUV420Converter> H264EncoderV4L2Helper::mConverter
private

◆ mFD

int H264EncoderV4L2Helper::mFD
private

◆ mHeight

int H264EncoderV4L2Helper::mHeight = 0
private

◆ motionVectorFramePinId

std::string H264EncoderV4L2Helper::motionVectorFramePinId
private

◆ motionVectorThreshold

int H264EncoderV4L2Helper::motionVectorThreshold
private

◆ mOutputPlane

std::unique_ptr<AV4L2ElementPlane> H264EncoderV4L2Helper::mOutputPlane
private

◆ mSelf

std::shared_ptr<H264EncoderV4L2Helper> H264EncoderV4L2Helper::mSelf
private

◆ mSendFrameContainer

SendFrameContainer H264EncoderV4L2Helper::mSendFrameContainer
private

◆ mWidth

int H264EncoderV4L2Helper::mWidth = 0
private

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