#include <videofilebuffer.h>
Public Member Functions | |
std::string | codec_name () |
What codec is being used to decode this video? | |
std::string | file_name () |
What is the path to the video file? | |
bool | frame_pending () |
Is there a frame waiting in the buffer? This function does not block. | |
double | frames_per_second () |
What is the (expected) frame rate of this video buffer, in frames per second? | |
void * | get_frame () |
Returns the next frame from the buffer. This function blocks until a frame is ready. | |
void | on_end_of_buffer (VideoBufferFlags::OnEndOfBuffer behaviour) |
void | put_frame (void *f) |
RawVideoFileBuffer (const std::string &file, bool is_rgb) | |
void | seek_to (double t) |
ImageRef | size () |
The size of the VideoFrames returned by this buffer. | |
~RawVideoFileBuffer () | |
Private Member Functions | |
bool | read_next_frame () |
Private Attributes | |
VideoBufferFlags::OnEndOfBuffer | end_of_buffer_behaviour |
bool | frame_ready |
double | frame_time |
SwsContext * | img_convert_ctx |
bool | is_rgb |
ImageRef | my_size |
CVD::Image< CVD::byte > | next_frame |
CVD::Image< CVD::Rgb< byte > > | next_frame_rgb |
AVCodecContext * | pCodecContext |
AVFormatContext * | pFormatContext |
AVFrame * | pFrame |
AVFrame * | pFrameRGB |
double | start_time |
int | video_stream |
Internal (non type-safe) class used by VideoFileBuffer This does the real interfacing with the ffmpeg library
Definition at line 113 of file videofilebuffer.h.
CVD::VFB::RawVideoFileBuffer::RawVideoFileBuffer | ( | const std::string & | file, | |
bool | is_rgb | |||
) |
Construct a video buffer to play this file
file | The path to the video file | |
is_rgb | Is RGB data wanted? |
CVD::VFB::RawVideoFileBuffer::~RawVideoFileBuffer | ( | ) |
std::string CVD::VFB::RawVideoFileBuffer::codec_name | ( | ) | [inline] |
What codec is being used to decode this video?
Definition at line 168 of file videofilebuffer.h.
std::string CVD::VFB::RawVideoFileBuffer::file_name | ( | ) | [inline] |
What is the path to the video file?
Definition at line 162 of file videofilebuffer.h.
bool CVD::VFB::RawVideoFileBuffer::frame_pending | ( | ) | [inline] |
Is there a frame waiting in the buffer? This function does not block.
Definition at line 135 of file videofilebuffer.h.
double CVD::VFB::RawVideoFileBuffer::frames_per_second | ( | ) | [inline] |
What is the (expected) frame rate of this video buffer, in frames per second?
Definition at line 152 of file videofilebuffer.h.
void* CVD::VFB::RawVideoFileBuffer::get_frame | ( | ) |
Returns the next frame from the buffer. This function blocks until a frame is ready.
void CVD::VFB::RawVideoFileBuffer::on_end_of_buffer | ( | VideoBufferFlags::OnEndOfBuffer | behaviour | ) | [inline] |
What should the buffer do when it reaches the end of the list of files?
behaviour | The desired behaviour |
Definition at line 146 of file videofilebuffer.h.
void CVD::VFB::RawVideoFileBuffer::put_frame | ( | void * | f | ) |
Tell the buffer that you are finished with this frame.
f | The frame that you are finished with. |
bool CVD::VFB::RawVideoFileBuffer::read_next_frame | ( | ) | [private] |
void CVD::VFB::RawVideoFileBuffer::seek_to | ( | double | t | ) |
Go to a particular point in the video buffer (only implemented in buffers of recorded video)
t | The frame time in seconds |
ImageRef CVD::VFB::RawVideoFileBuffer::size | ( | ) | [inline] |
The size of the VideoFrames returned by this buffer.
Definition at line 123 of file videofilebuffer.h.
Definition at line 178 of file videofilebuffer.h.
bool CVD::VFB::RawVideoFileBuffer::frame_ready [private] |
Definition at line 180 of file videofilebuffer.h.
double CVD::VFB::RawVideoFileBuffer::frame_time [private] |
Definition at line 192 of file videofilebuffer.h.
SwsContext* CVD::VFB::RawVideoFileBuffer::img_convert_ctx [private] |
Definition at line 187 of file videofilebuffer.h.
bool CVD::VFB::RawVideoFileBuffer::is_rgb [private] |
Definition at line 193 of file videofilebuffer.h.
Definition at line 177 of file videofilebuffer.h.
Definition at line 190 of file videofilebuffer.h.
Definition at line 189 of file videofilebuffer.h.
AVCodecContext* CVD::VFB::RawVideoFileBuffer::pCodecContext [private] |
Definition at line 184 of file videofilebuffer.h.
AVFormatContext* CVD::VFB::RawVideoFileBuffer::pFormatContext [private] |
Definition at line 182 of file videofilebuffer.h.
AVFrame* CVD::VFB::RawVideoFileBuffer::pFrame [private] |
Definition at line 185 of file videofilebuffer.h.
AVFrame* CVD::VFB::RawVideoFileBuffer::pFrameRGB [private] |
Definition at line 186 of file videofilebuffer.h.
double CVD::VFB::RawVideoFileBuffer::start_time [private] |
Definition at line 179 of file videofilebuffer.h.
int CVD::VFB::RawVideoFileBuffer::video_stream [private] |
Definition at line 183 of file videofilebuffer.h.