Panda3D
|
00001 // Filename: movieVideo.h 00002 // Created by: jyelon (02Jul07) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef MOVIEVIDEO_H 00016 #define MOVIEVIDEO_H 00017 00018 #include "pandabase.h" 00019 #include "namable.h" 00020 #include "pointerTo.h" 00021 #include "typedWritableReferenceCount.h" 00022 #include "subfileInfo.h" 00023 #include "filename.h" 00024 00025 class MovieVideoCursor; 00026 class FactoryParams; 00027 class BamWriter; 00028 class BamReader; 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Class : MovieVideo 00032 // Description : A MovieVideo is actually any source that provides 00033 // a sequence of video frames. That could include an 00034 // AVI file, a digital camera, or an internet TV station. 00035 // 00036 // The difference between a MovieVideo and a 00037 // MovieVideoCursor is like the difference between a 00038 // filename and a file handle. The MovieVideo just 00039 // indicates a particular movie. The MovieVideoCursor 00040 // is what allows access. 00041 //////////////////////////////////////////////////////////////////// 00042 class EXPCL_PANDA_MOVIES MovieVideo : public TypedWritableReferenceCount, public Namable { 00043 00044 PUBLISHED: 00045 MovieVideo(const string &name = "Blank Video"); 00046 virtual ~MovieVideo(); 00047 virtual PT(MovieVideoCursor) open(); 00048 static PT(MovieVideo) get(const Filename &name); 00049 00050 INLINE const Filename &get_filename() const; 00051 INLINE const SubfileInfo &get_subfile_info() const; 00052 00053 protected: 00054 Filename _filename; 00055 SubfileInfo _subfile_info; 00056 00057 public: 00058 virtual void write_datagram(BamWriter *manager, Datagram &dg); 00059 00060 protected: 00061 void fillin(DatagramIterator &scan, BamReader *manager); 00062 00063 public: 00064 static TypeHandle get_class_type() { 00065 return _type_handle; 00066 } 00067 static void init_type() { 00068 TypedWritableReferenceCount::init_type(); 00069 register_type(_type_handle, "MovieVideo", 00070 TypedWritableReferenceCount::get_class_type()); 00071 } 00072 virtual TypeHandle get_type() const { 00073 return get_class_type(); 00074 } 00075 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00076 00077 private: 00078 static TypeHandle _type_handle; 00079 }; 00080 00081 /* okcircular */ 00082 #include "movieVideoCursor.h" 00083 00084 #include "movieVideo.I" 00085 00086 #endif