Enables ffmpeg to access panda's VFS. More...
#include "ffmpegVirtualFile.h"
Public Member Functions | |
void | close () |
Explicitly closes the opened file. More... | |
AVFormatContext * | get_format_context () const |
Returns a pointer to the opened ffmpeg context, or NULL if the file was not successfully opened. More... | |
bool | is_open () const |
Returns true if the stream is successfully opened, false otherwise. More... | |
bool | open_subfile (const SubfileInfo &info) |
Opens the movie file directly from a file on disk (does not go through the VFS). More... | |
bool | open_vfs (const Filename &filename) |
Opens the movie file via Panda's VFS. More... | |
Static Public Member Functions | |
static void | register_protocol () |
Should be called at startup to attach the appropriate hooks between Panda and FFMpeg. More... | |
Enables ffmpeg to access panda's VFS.
Create an instance of the FfmpegVirtualFile for each ffmpeg stream you wish to open.
Definition at line 37 of file ffmpegVirtualFile.h.
void FfmpegVirtualFile::close | ( | ) |
Explicitly closes the opened file.
This is also called implicitly by the destructor if necessary.
Definition at line 194 of file ffmpegVirtualFile.cxx.
References VirtualFileSystem::close_read_file().
|
inline |
Returns a pointer to the opened ffmpeg context, or NULL if the file was not successfully opened.
Definition at line 34 of file ffmpegVirtualFile.I.
Referenced by FfmpegAudioCursor::FfmpegAudioCursor().
|
inline |
Returns true if the stream is successfully opened, false otherwise.
Definition at line 23 of file ffmpegVirtualFile.I.
bool FfmpegVirtualFile::open_subfile | ( | const SubfileInfo & | info | ) |
Opens the movie file directly from a file on disk (does not go through the VFS).
Returns true on success, false on failure. If successful, use get_format_context() to get the open file handle.
Definition at line 142 of file ffmpegVirtualFile.cxx.
References SubfileInfo::get_filename(), SubfileInfo::get_size(), SubfileInfo::get_start(), Filename::open_read(), and Filename::set_binary().
bool FfmpegVirtualFile::open_vfs | ( | const Filename & | filename | ) |
Opens the movie file via Panda's VFS.
Returns true on success, false on failure. If successful, use get_format_context() to get the open file handle.
Definition at line 83 of file ffmpegVirtualFile.cxx.
References VirtualFileSystem::get_file(), VirtualFileSystem::get_global_ptr(), and Filename::set_binary().
Referenced by FfmpegAudioCursor::FfmpegAudioCursor().
|
static |
Should be called at startup to attach the appropriate hooks between Panda and FFMpeg.
Definition at line 227 of file ffmpegVirtualFile.cxx.