#include <ffmpeg.h>
Public Member Functions | |
FfmpegVideo (const std::string filename, const std::string fmtout="RGB24", const std::string codec_hint="", bool dump_info=false, int user_video_stream=-1) | |
bool | GrabNewest (unsigned char *image, bool wait=true) |
bool | GrabNext (unsigned char *image, bool wait=true) |
unsigned | Height () const |
std::string | PixFormat () const |
size_t | SizeBytes () const |
void | Start () |
Implement VideoSource::Start() | |
void | Stop () |
Implement VideoSource::Stop() | |
unsigned | Width () const |
~FfmpegVideo () | |
Protected Member Functions | |
void | InitUrl (const std::string filename, const std::string fmtout="RGB24", const std::string codec_hint="", bool dump_info=false, int user_video_stream=-1) |
Protected Attributes | |
int | audioStream |
uint8_t * | buffer |
PixelFormat | fmtout |
SwsContext * | img_convert_ctx |
int | numBytesOut |
AVPacket | packet |
AVCodec * | pAudCodec |
AVCodecContext * | pAudCodecCtx |
AVFormatContext * | pFormatCtx |
AVFrame * | pFrame |
AVFrame * | pFrameOut |
AVCodec * | pVidCodec |
AVCodecContext * | pVidCodecCtx |
int | videoStream |
pangolin::FfmpegVideo::FfmpegVideo | ( | const std::string | filename, |
const std::string | fmtout = "RGB24" , |
||
const std::string | codec_hint = "" , |
||
bool | dump_info = false , |
||
int | user_video_stream = -1 |
||
) |
Definition at line 124 of file ffmpeg.cpp.
Definition at line 262 of file ffmpeg.cpp.
bool pangolin::FfmpegVideo::GrabNewest | ( | unsigned char * | image, |
bool | wait = true |
||
) | [virtual] |
Copy the newest frame from the camera to image discarding all older frames. Optionally wait for a frame if one isn't ready Returns true iff image was copied
Implements pangolin::VideoInterface.
Definition at line 342 of file ffmpeg.cpp.
bool pangolin::FfmpegVideo::GrabNext | ( | unsigned char * | image, |
bool | wait = true |
||
) | [virtual] |
Copy the next frame from the camera to image. Optionally wait for a frame if one isn't ready Returns true iff image was copied
Implements pangolin::VideoInterface.
Definition at line 315 of file ffmpeg.cpp.
unsigned pangolin::FfmpegVideo::Height | ( | ) | const [virtual] |
Implements pangolin::VideoInterface.
Definition at line 292 of file ffmpeg.cpp.
void pangolin::FfmpegVideo::InitUrl | ( | const std::string | filename, |
const std::string | fmtout = "RGB24" , |
||
const std::string | codec_hint = "" , |
||
bool | dump_info = false , |
||
int | user_video_stream = -1 |
||
) | [protected] |
Definition at line 130 of file ffmpeg.cpp.
std::string pangolin::FfmpegVideo::PixFormat | ( | ) | const [virtual] |
Implements pangolin::VideoInterface.
Definition at line 302 of file ffmpeg.cpp.
size_t pangolin::FfmpegVideo::SizeBytes | ( | ) | const [virtual] |
Implements pangolin::VideoInterface.
Definition at line 297 of file ffmpeg.cpp.
void pangolin::FfmpegVideo::Start | ( | ) | [virtual] |
Implement VideoSource::Start()
Implements pangolin::VideoInterface.
Definition at line 307 of file ffmpeg.cpp.
void pangolin::FfmpegVideo::Stop | ( | ) | [virtual] |
Implement VideoSource::Stop()
Implements pangolin::VideoInterface.
Definition at line 311 of file ffmpeg.cpp.
unsigned pangolin::FfmpegVideo::Width | ( | ) | const [virtual] |
Implements pangolin::VideoInterface.
Definition at line 287 of file ffmpeg.cpp.
int pangolin::FfmpegVideo::audioStream [protected] |
uint8_t* pangolin::FfmpegVideo::buffer [protected] |
PixelFormat pangolin::FfmpegVideo::fmtout [protected] |
SwsContext* pangolin::FfmpegVideo::img_convert_ctx [protected] |
int pangolin::FfmpegVideo::numBytesOut [protected] |
AVPacket pangolin::FfmpegVideo::packet [protected] |
AVCodec* pangolin::FfmpegVideo::pAudCodec [protected] |
AVCodecContext* pangolin::FfmpegVideo::pAudCodecCtx [protected] |
AVFormatContext* pangolin::FfmpegVideo::pFormatCtx [protected] |
AVFrame* pangolin::FfmpegVideo::pFrame [protected] |
AVFrame* pangolin::FfmpegVideo::pFrameOut [protected] |
AVCodec* pangolin::FfmpegVideo::pVidCodec [protected] |
AVCodecContext* pangolin::FfmpegVideo::pVidCodecCtx [protected] |
int pangolin::FfmpegVideo::videoStream [protected] |