Panda3D
Loading...
Searching...
No Matches
movieVideo.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file movieVideo.h
10 * @author jyelon
11 * @date 2007-07-02
12 */
13
14#ifndef MOVIEVIDEO_H
15#define MOVIEVIDEO_H
16
17#include "pandabase.h"
18#include "namable.h"
19#include "pointerTo.h"
21#include "subfileInfo.h"
22#include "filename.h"
23
25class FactoryParams;
26class BamWriter;
27class BamReader;
28
29/**
30 * A MovieVideo is actually any source that provides a sequence of video
31 * frames. That could include an AVI file, a digital camera, or an internet
32 * TV station.
33 *
34 * The difference between a MovieVideo and a MovieVideoCursor is like the
35 * difference between a filename and a file handle. The MovieVideo just
36 * indicates a particular movie. The MovieVideoCursor is what allows access.
37 */
38class EXPCL_PANDA_MOVIES MovieVideo : public TypedWritableReferenceCount, public Namable {
39PUBLISHED:
40 MovieVideo(const std::string &name = "Blank Video");
41 virtual ~MovieVideo();
42 virtual PT(MovieVideoCursor) open();
43 static PT(MovieVideo) get(const Filename &name);
44
45 INLINE const Filename &get_filename() const;
46 INLINE const SubfileInfo &get_subfile_info() const;
47 MAKE_PROPERTY(filename, get_filename);
48 MAKE_PROPERTY(subfile_info, get_subfile_info);
49
50protected:
51 Filename _filename;
52 SubfileInfo _subfile_info;
53
54public:
55 virtual void write_datagram(BamWriter *manager, Datagram &dg);
56
57protected:
58 void fillin(DatagramIterator &scan, BamReader *manager);
59
60public:
61 static TypeHandle get_class_type() {
62 return _type_handle;
63 }
64 static void init_type() {
65 TypedWritableReferenceCount::init_type();
66 register_type(_type_handle, "MovieVideo",
67 TypedWritableReferenceCount::get_class_type());
68 }
69 virtual TypeHandle get_type() const {
70 return get_class_type();
71 }
72 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
73
74private:
75 static TypeHandle _type_handle;
76};
77
78#include "movieVideo.I"
79
80#endif
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition bamReader.h:110
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition bamWriter.h:63
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 ...
Definition datagram.h:38
An instance of this class is passed to the Factory when requesting it to do its business and construc...
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
A MovieVideo is actually any source that provides a sequence of video frames.
A MovieVideo is actually any source that provides a sequence of video frames.
Definition movieVideo.h:38
A base class for all things which can have a name.
Definition namable.h:26
This class records a particular byte sub-range within an existing file on disk.
Definition subfileInfo.h:26
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
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.
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.