Panda3D
|
A MovieVideo is actually any source that provides a sequence of video frames. More...
#include "movieVideo.h"
Public Member Functions | |
MovieVideo (const string &name="Blank Video") | |
This constructor returns a null video stream --- a stream of plain blue and white frames that last one second each. | |
virtual TypeHandle | force_init_type () |
const Filename & | get_filename () const |
Returns the movie's filename. | |
const SubfileInfo & | get_subfile_info () const |
If the movie is to be loaded from a subfile on disk, this returns the subfile info. | |
virtual TypeHandle | get_type () const |
virtual | PT (MovieVideoCursor) open() |
virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
static | PT (MovieVideo) get(const Filename &name) |
Protected Member Functions | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new MovieVideo. | |
Protected Attributes | |
Filename | _filename |
SubfileInfo | _subfile_info |
A MovieVideo is actually any source that provides a sequence of video frames.
That could include an AVI file, a digital camera, or an internet TV station.
The difference between a MovieVideo and a MovieVideoCursor is like the difference between a filename and a file handle. The MovieVideo just indicates a particular movie. The MovieVideoCursor is what allows access.
Definition at line 42 of file movieVideo.h.
MovieVideo::MovieVideo | ( | const string & | name = "Blank Video" | ) |
This constructor returns a null video stream --- a stream of plain blue and white frames that last one second each.
To get more interesting video, you need to construct a subclass of this class.
Definition at line 32 of file movieVideo.cxx.
void MovieVideo::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new MovieVideo.
Reimplemented from TypedWritable.
Definition at line 118 of file movieVideo.cxx.
References DatagramIterator::get_bool(), DatagramIterator::get_string(), and BamReader::read_file_data().
const Filename & MovieVideo::get_filename | ( | ) | const [inline] |
Returns the movie's filename.
A movie is not guaranteed to have a filename, if not, then this function returns an empty filename.
Definition at line 24 of file movieVideo.I.
const SubfileInfo & MovieVideo::get_subfile_info | ( | ) | const [inline] |
If the movie is to be loaded from a subfile on disk, this returns the subfile info.
Check info.is_empty() to see if this is valid data.
Definition at line 36 of file movieVideo.I.
void MovieVideo::write_datagram | ( | BamWriter * | manager, |
Datagram & | dg | ||
) | [virtual] |
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from TypedWritable.
Definition at line 81 of file movieVideo.cxx.
References Datagram::add_bool(), Datagram::add_string(), SubfileInfo::is_empty(), and BamWriter::write_file_data().