libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
videoformatdetails.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_PROAV
13#include <cstdint>
14#include <promeki/namespace.h>
15#include <promeki/videoformat.h>
16
17PROMEKI_NAMESPACE_BEGIN
18
58class VideoFormatDetails {
59 public:
61 VideoFormatDetails() = default;
62
73 explicit VideoFormatDetails(const VideoFormat &fmt);
74
84 explicit VideoFormatDetails(VideoFormat::WellKnownRaster raster);
85
94 bool isValid() const { return _totalLines > 0; }
95
97 const VideoFormat &format() const { return _format; }
98
115 int totalLines() const { return _totalLines; }
116
127 int activeLines() const { return _activeLines; }
128
138 static int totalLinesForRaster(VideoFormat::WellKnownRaster raster);
139
140 private:
141 void lookupFromRaster(VideoFormat::WellKnownRaster raster);
142
143 VideoFormat _format;
144 int _totalLines = 0;
145 int _activeLines = 0;
146};
147
148PROMEKI_NAMESPACE_END
149
150#endif // PROMEKI_ENABLE_PROAV