Panda3D
ffmpegVideo.h
1 // Filename: ffmpegVideo.h
2 // Created by: jyelon (01Aug2007)
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 FFMPEGVIDEO_H
16 #define FFMPEGVIDEO_H
17 
18 #include "pandabase.h"
19 
20 #include "movieVideo.h"
21 
22 class FfmpegVideoCursor;
23 class FactoryParams;
24 class BamWriter;
25 class BamReader;
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : FfmpegVideo
29 // Description :
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_FFMPEG FfmpegVideo : public MovieVideo {
32 PUBLISHED:
33  FfmpegVideo(const Filename &name);
34  FfmpegVideo(const SubfileInfo &info);
35 
36  virtual ~FfmpegVideo();
37  virtual PT(MovieVideoCursor) open();
38 
39  static PT(MovieVideo) make(const Filename &name);
40 
41 public:
42  static void register_with_read_factory();
43  virtual void write_datagram(BamWriter *manager, Datagram &dg);
44 
45 protected:
46  static TypedWritable *make_from_bam(const FactoryParams &params);
47  void fillin(DatagramIterator &scan, BamReader *manager);
48 
49 public:
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  MovieVideo::init_type();
55  register_type(_type_handle, "FfmpegVideo",
56  MovieVideo::get_class_type());
57  }
58  virtual TypeHandle get_type() const {
59  return get_class_type();
60  }
61  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
62 
63 private:
64  static TypeHandle _type_handle;
65 
66  friend class FfmpegVideoCursor;
67 };
68 
69 #include "ffmpegVideo.I"
70 
71 #endif // FFMPEGVIDEO_H
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition: bamReader.h:122
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:37
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition: bamWriter.h:73
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
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
Definition: movieVideo.cxx:77
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