Panda3D
Public Member Functions | Static Public Member Functions | List of all members
FfmpegVirtualFile Class Reference

Enables ffmpeg to access panda's VFS. More...

#include "ffmpegVirtualFile.h"

Public Member Functions

 FfmpegVirtualFile (const FfmpegVirtualFile &copy)=delete
 
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...
 
FfmpegVirtualFileoperator= (const FfmpegVirtualFile &copy)=delete
 

Static Public Member Functions

static void register_protocol ()
 Should be called at startup to attach the appropriate hooks between Panda and FFMpeg. More...
 

Detailed Description

Enables ffmpeg to access panda's VFS.

Create an instance of the FfmpegVirtualFile for each ffmpeg stream you wish to open.

Definition at line 34 of file ffmpegVirtualFile.h.

Member Function Documentation

◆ close()

void FfmpegVirtualFile::close ( )

Explicitly closes the opened file.

This is also called implicitly by the destructor if necessary.

Definition at line 159 of file ffmpegVirtualFile.cxx.

◆ get_format_context()

AVFormatContext * FfmpegVirtualFile::get_format_context ( ) const
inline

Returns a pointer to the opened ffmpeg context, or NULL if the file was not successfully opened.

Definition at line 27 of file ffmpegVirtualFile.I.

Referenced by FfmpegAudioCursor::FfmpegAudioCursor().

◆ is_open()

bool FfmpegVirtualFile::is_open ( ) const
inline

Returns true if the stream is successfully opened, false otherwise.

Definition at line 18 of file ffmpegVirtualFile.I.

◆ open_subfile()

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 112 of file ffmpegVirtualFile.cxx.

◆ open_vfs()

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 59 of file ffmpegVirtualFile.cxx.

Referenced by FfmpegAudioCursor::FfmpegAudioCursor().

◆ register_protocol()

void FfmpegVirtualFile::register_protocol ( )
static

Should be called at startup to attach the appropriate hooks between Panda and FFMpeg.

Definition at line 185 of file ffmpegVirtualFile.cxx.

Referenced by init_libffmpeg().


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