libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
codec.h
Go to the documentation of this file.
1
9#pragma once
10
12#include <promeki/proav/image.h>
13
15
24class Codec {
25 public:
27 class Instance {
28 public:
33 Instance(Codec *codec) : _codec(codec) {};
34
36 virtual ~Instance() {};
37
44 return Image();
45 }
46
47 private:
48 Codec *_codec = nullptr;
49 };
50
52 Codec() {};
53
55 virtual ~Codec() {};
56
65 return false;
66 }
67
73 return nullptr;
74 }
75};
76
78
Represents an active codec instance used for performing conversions.
Definition codec.h:27
virtual ~Instance()
Destructor.
Definition codec.h:36
Instance(Codec *codec)
Constructs a codec instance associated with the given codec.
Definition codec.h:33
Image convert(const Image &input)
Converts the given input image and returns the result.
Definition codec.h:43
Abstract base class for image codecs.
Definition codec.h:24
bool canConvert(const ImageDesc &inDesc, PixelFormat::ID outID, const Metadata &outMeta) const
Returns whether this codec can convert the given input to the specified output format.
Definition codec.h:64
virtual ~Codec()
Destructor.
Definition codec.h:55
Instance * createInstance()
Creates and returns a new codec instance.
Definition codec.h:72
Codec()
Default constructor.
Definition codec.h:52
Describes the format and layout of a single image.
Definition imagedesc.h:33
Raster image with pixel format, planes, and metadata.
Definition image.h:48
Dynamic array container wrapping std::vector.
Definition list.h:40
Key-value metadata container using typed Variant values.
Definition metadata.h:68
ID
The ID of the unique packing format for the pixel.
Definition pixelformat.h:46
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19