Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
bebop_driver::VideoDecoder Class Reference

#include <bebop_video_decoder.h>

Public Member Functions

bool Decode (const ARCONTROLLER_Frame_t *bebop_frame_ptr_)
 
uint32_t GetFrameHeight () const
 
const uint8_t * GetFrameRGBRawCstPtr () const
 
uint32_t GetFrameWidth () const
 
bool SetH264Params (uint8_t *sps_buffer_ptr, uint32_t sps_buffer_size, uint8_t *pps_buffer_ptr, uint32_t pps_buffer_size)
 
 VideoDecoder ()
 
 ~VideoDecoder ()
 

Private Member Functions

void CleanupBuffers ()
 
void ConvertFrameToRGB ()
 
bool InitCodec ()
 
bool ReallocateBuffers ()
 
void Reset ()
 

Static Private Member Functions

static void ThrowOnCondition (const bool cond, const std::string &message)
 

Private Attributes

AVCodecContext * codec_ctx_ptr_
 
std::vector< uint8_t > codec_data_
 
bool codec_initialized_
 
AVCodec * codec_ptr_
 
bool first_iframe_recv_
 
AVFormatContext * format_ctx_ptr_
 
AVFrame * frame_ptr_
 
AVFrame * frame_rgb_ptr_
 
uint8_t * frame_rgb_raw_ptr_
 
SwsContext * img_convert_ctx_ptr_
 
AVInputFormat * input_format_ptr_
 
AVPacket packet_
 
bool update_codec_params_
 

Static Private Attributes

static const char * LOG_TAG = "Decoder"
 

Detailed Description

Definition at line 60 of file bebop_video_decoder.h.

Constructor & Destructor Documentation

bebop_driver::VideoDecoder::VideoDecoder ( )

Definition at line 50 of file bebop_video_decoder.cpp.

bebop_driver::VideoDecoder::~VideoDecoder ( )

Definition at line 203 of file bebop_video_decoder.cpp.

Member Function Documentation

void bebop_driver::VideoDecoder::CleanupBuffers ( )
private

Definition at line 164 of file bebop_video_decoder.cpp.

void bebop_driver::VideoDecoder::ConvertFrameToRGB ( )
private

Definition at line 209 of file bebop_video_decoder.cpp.

bool bebop_driver::VideoDecoder::Decode ( const ARCONTROLLER_Frame_t *  bebop_frame_ptr_)

Definition at line 240 of file bebop_video_decoder.cpp.

uint32_t bebop_driver::VideoDecoder::GetFrameHeight ( ) const
inline

Definition at line 96 of file bebop_video_decoder.h.

const uint8_t* bebop_driver::VideoDecoder::GetFrameRGBRawCstPtr ( ) const
inline

Definition at line 98 of file bebop_video_decoder.h.

uint32_t bebop_driver::VideoDecoder::GetFrameWidth ( ) const
inline

Definition at line 95 of file bebop_video_decoder.h.

bool bebop_driver::VideoDecoder::InitCodec ( )
private

Definition at line 64 of file bebop_video_decoder.cpp.

bool bebop_driver::VideoDecoder::ReallocateBuffers ( )
private

Definition at line 121 of file bebop_video_decoder.cpp.

void bebop_driver::VideoDecoder::Reset ( )
private

Definition at line 184 of file bebop_video_decoder.cpp.

bool bebop_driver::VideoDecoder::SetH264Params ( uint8_t *  sps_buffer_ptr,
uint32_t  sps_buffer_size,
uint8_t *  pps_buffer_ptr,
uint32_t  pps_buffer_size 
)

Definition at line 216 of file bebop_video_decoder.cpp.

void bebop_driver::VideoDecoder::ThrowOnCondition ( const bool  cond,
const std::string &  message 
)
staticprivate

Definition at line 44 of file bebop_video_decoder.cpp.

Member Data Documentation

AVCodecContext* bebop_driver::VideoDecoder::codec_ctx_ptr_
private

Definition at line 68 of file bebop_video_decoder.h.

std::vector<uint8_t> bebop_driver::VideoDecoder::codec_data_
private

Definition at line 78 of file bebop_video_decoder.h.

bool bebop_driver::VideoDecoder::codec_initialized_
private

Definition at line 65 of file bebop_video_decoder.h.

AVCodec* bebop_driver::VideoDecoder::codec_ptr_
private

Definition at line 69 of file bebop_video_decoder.h.

bool bebop_driver::VideoDecoder::first_iframe_recv_
private

Definition at line 66 of file bebop_video_decoder.h.

AVFormatContext* bebop_driver::VideoDecoder::format_ctx_ptr_
private

Definition at line 67 of file bebop_video_decoder.h.

AVFrame* bebop_driver::VideoDecoder::frame_ptr_
private

Definition at line 70 of file bebop_video_decoder.h.

AVFrame* bebop_driver::VideoDecoder::frame_rgb_ptr_
private

Definition at line 71 of file bebop_video_decoder.h.

uint8_t* bebop_driver::VideoDecoder::frame_rgb_raw_ptr_
private

Definition at line 75 of file bebop_video_decoder.h.

SwsContext* bebop_driver::VideoDecoder::img_convert_ctx_ptr_
private

Definition at line 73 of file bebop_video_decoder.h.

AVInputFormat* bebop_driver::VideoDecoder::input_format_ptr_
private

Definition at line 74 of file bebop_video_decoder.h.

const char * bebop_driver::VideoDecoder::LOG_TAG = "Decoder"
staticprivate

Definition at line 63 of file bebop_video_decoder.h.

AVPacket bebop_driver::VideoDecoder::packet_
private

Definition at line 72 of file bebop_video_decoder.h.

bool bebop_driver::VideoDecoder::update_codec_params_
private

Definition at line 77 of file bebop_video_decoder.h.


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


bebop_driver
Author(s): Mani Monajjemi
autogenerated on Mon Jun 10 2019 12:58:57