libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
videodesc.h
Go to the documentation of this file.
1
9#pragma once
10
13#include <promeki/core/list.h>
18
20
25class VideoDesc {
27 public:
30
33
36
38 VideoDesc() = default;
39
41 bool isValid() const { return _frameRate.isValid() && (_imageList.size() > 0 || _audioList.size() > 0); }
42
44 const FrameRate &frameRate() const { return _frameRate; }
47 void setFrameRate(const FrameRate &val) { _frameRate = val; }
48
50 const ImageDescList &imageList() const { return _imageList; }
52 ImageDescList &imageList() { return _imageList; }
53
55 const AudioDescList &audioList() const { return _audioList; }
57 AudioDescList &audioList() { return _audioList; }
58
60 const Metadata &metadata() const { return _metadata; }
62 Metadata &metadata() { return _metadata; }
63
64 private:
65 FrameRate _frameRate;
66 ImageDescList _imageList;
67 AudioDescList _audioList;
68 Metadata _metadata;
69};
70
72
Represents a video frame rate as a rational number.
Definition framerate.h:36
bool isValid() const
Returns true if this frame rate is valid (numerator > 0).
Definition framerate.h:68
Dynamic array container wrapping std::vector.
Definition list.h:40
size_t size() const noexcept
Returns the number of elements in the list.
Definition list.h:301
Key-value metadata container using typed Variant values.
Definition metadata.h:68
Describes a video format including frame rate, image layers, audio channels, and metadata.
Definition videodesc.h:25
void setFrameRate(const FrameRate &val)
Sets the frame rate.
Definition videodesc.h:47
List< ImageDesc > ImageDescList
List of ImageDesc values describing each image layer.
Definition videodesc.h:32
AudioDescList & audioList()
Returns a mutable reference to the list of audio descriptions.
Definition videodesc.h:57
Metadata & metadata()
Returns a mutable reference to the metadata.
Definition videodesc.h:62
const ImageDescList & imageList() const
Returns a const reference to the list of image descriptions.
Definition videodesc.h:50
const FrameRate & frameRate() const
Returns the frame rate.
Definition videodesc.h:44
const AudioDescList & audioList() const
Returns a const reference to the list of audio descriptions.
Definition videodesc.h:55
List< AudioDesc > AudioDescList
List of AudioDesc values describing each audio channel group.
Definition videodesc.h:35
bool isValid() const
Returns true if the video description is valid (has a valid frame rate and at least one image or audi...
Definition videodesc.h:41
VideoDesc()=default
Constructs a default (invalid) video description.
ImageDescList & imageList()
Returns a mutable reference to the list of image descriptions.
Definition videodesc.h:52
const Metadata & metadata() const
Returns a const reference to the metadata.
Definition videodesc.h:60
#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
#define PROMEKI_SHARED_FINAL(TYPE)
Macro for non-polymorphic native shared objects.
Definition sharedptr.h:88