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