14#ifndef MOVIEVIDEOCURSOR_H
15#define MOVIEVIDEOCURSOR_H
41class EXPCL_PANDA_MOVIES MovieVideoCursor :
public TypedWritableReferenceCount {
46 virtual ~MovieVideoCursor();
48 INLINE
int size_x()
const;
49 INLINE
int size_y()
const;
50 INLINE
int get_num_components()
const;
51 INLINE
double length()
const;
52 INLINE
bool can_seek()
const;
53 INLINE
bool can_seek_fast()
const;
54 INLINE
bool aborted()
const;
56 INLINE
bool ready()
const;
57 INLINE
bool streaming()
const;
60 virtual bool set_time(
double timestamp,
int loop_count);
62 class EXPCL_PANDA_MOVIES Buffer :
public TypedReferenceCount {
64 ALLOC_DELETED_CHAIN(Buffer);
65 Buffer(
size_t block_size);
74 unsigned char *_block;
84 static void init_type() {
85 TypedReferenceCount::init_type();
87 TypedReferenceCount::get_class_type());
90 return get_class_type();
92 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
97 virtual PT(
Buffer) fetch_buffer();
104 Buffer *get_standard_buffer();
105 virtual PT(
Buffer) make_new_buffer();
119 PT(
Buffer) _standard_buffer;
136 static void init_type() {
137 TypedWritableReferenceCount::init_type();
139 TypedWritableReferenceCount::get_class_type());
142 virtual TypeHandle get_type()
const {
143 return get_class_type();
145 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
148 static TypeHandle _type_handle;
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This template class can be used to provide faster allocation/deallocation for many Panda objects.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual double get_timestamp() const
Returns the nearest timestamp value of this particular buffer.
virtual int compare_timestamp(const Buffer *other) const
Used to sort different buffers to ensure they correspond to the same source frame,...
virtual void apply_to_texture(const Buffer *buffer, Texture *t, int page)
Stores this buffer's contents in the indicated texture.
virtual bool set_time(double timestamp, int loop_count)
Updates the cursor to the indicated time.
void setup_texture(Texture *tex) const
Set up the specified Texture object to contain content from this movie.
virtual void apply_to_texture_alpha(const Buffer *buffer, Texture *t, int page, int alpha_src)
Copies this buffer's contents into the alpha channel of the supplied texture.
virtual void apply_to_texture_rgb(const Buffer *buffer, Texture *t, int page)
Copies this buffer's contents into the RGB channels of the supplied texture.
A MovieVideo is actually any source that provides a sequence of video frames.
A lightweight class that represents a single element that may be timed and/or counted via stats.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
TypeHandle is the identifier used to differentiate C++ class types.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.