Panda3D

ffmpegVideo.h

00001 // Filename: ffmpegVideo.h
00002 // Created by: jyelon (01Aug2007)
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 FFMPEGVIDEO_H
00016 #define FFMPEGVIDEO_H
00017 
00018 #include "pandabase.h"
00019 
00020 #ifdef HAVE_FFMPEG
00021 
00022 #include "movieVideo.h"
00023 
00024 class FfmpegVideoCursor;
00025 class FactoryParams;
00026 class BamWriter;
00027 class BamReader;
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //       Class : FfmpegVideo
00031 // Description : 
00032 ////////////////////////////////////////////////////////////////////
00033 class EXPCL_PANDA_MOVIES FfmpegVideo : public MovieVideo {
00034 
00035 PUBLISHED:
00036   FfmpegVideo(const Filename &name);
00037   FfmpegVideo(const SubfileInfo &info);
00038 
00039   virtual ~FfmpegVideo();
00040   virtual PT(MovieVideoCursor) open();
00041   
00042 public:
00043   static void register_with_read_factory();
00044   virtual void write_datagram(BamWriter *manager, Datagram &dg);
00045 
00046 protected:
00047   static TypedWritable *make_from_bam(const FactoryParams &params);
00048   void fillin(DatagramIterator &scan, BamReader *manager);
00049   
00050 public:
00051   static TypeHandle get_class_type() {
00052     return _type_handle;
00053   }
00054   static void init_type() {
00055     MovieVideo::init_type();
00056     register_type(_type_handle, "FfmpegVideo",
00057                   MovieVideo::get_class_type());
00058   }
00059   virtual TypeHandle get_type() const {
00060     return get_class_type();
00061   }
00062   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00063 
00064 private:
00065   static TypeHandle _type_handle;
00066 
00067   friend class FfmpegVideoCursor;
00068 };
00069 
00070 #include "ffmpegVideo.I"
00071 
00072 #endif // HAVE_FFMPEG
00073 #endif // FFMPEGVIDEO_H
 All Classes Functions Variables Enumerations