Panda3D
ffmpegVideo.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 ffmpegVideo.h
10 * @author jyelon
11 * @date 2007-08-01
12 */
13
14#ifndef FFMPEGVIDEO_H
15#define FFMPEGVIDEO_H
16
17#include "pandabase.h"
18
19#include "movieVideo.h"
20
22class FactoryParams;
23class BamWriter;
24class BamReader;
25
26/**
27 *
28 */
29class EXPCL_FFMPEG FfmpegVideo : public MovieVideo {
30PUBLISHED:
31 FfmpegVideo(const Filename &name);
32 FfmpegVideo(const SubfileInfo &info);
33
34 virtual ~FfmpegVideo();
35 virtual PT(MovieVideoCursor) open();
36
37 static PT(MovieVideo) make(const Filename &name);
38
39public:
40 static void register_with_read_factory();
41 virtual void write_datagram(BamWriter *manager, Datagram &dg);
42
43protected:
44 static TypedWritable *make_from_bam(const FactoryParams &params);
45 void fillin(DatagramIterator &scan, BamReader *manager);
46
47public:
48 static TypeHandle get_class_type() {
49 return _type_handle;
50 }
51 static void init_type() {
52 MovieVideo::init_type();
53 register_type(_type_handle, "FfmpegVideo",
54 MovieVideo::get_class_type());
55 }
56 virtual TypeHandle get_type() const {
57 return get_class_type();
58 }
59 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
60
61private:
62 static TypeHandle _type_handle;
63
64 friend class FfmpegVideoCursor;
65};
66
67#include "ffmpegVideo.I"
68
69#endif // FFMPEGVIDEO_H
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...
Definition: factoryParams.h:36
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
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
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:65
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
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:35
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(),...
Definition: register_type.I:22