Tag Parser
7.0.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
aspectratio.cpp
Go to the documentation of this file.
1
#include "
./aspectratio.h
"
2
3
using namespace
std
;
4
5
namespace
TagParser
{
6
15
AspectRatio::AspectRatio(byte aspectRatioType)
16
{
17
static
const
AspectRatio
predefinedPars[] = {
AspectRatio
(),
AspectRatio
(1, 1),
AspectRatio
(12, 11),
AspectRatio
(10, 11),
AspectRatio
(16, 11),
18
AspectRatio
(40, 33),
AspectRatio
(24, 11),
AspectRatio
(20, 11),
AspectRatio
(32, 11),
AspectRatio
(80, 33),
AspectRatio
(18, 11),
19
AspectRatio
(15, 11),
AspectRatio
(64, 33),
AspectRatio
(160, 99),
AspectRatio
(4, 3),
AspectRatio
(3, 2),
AspectRatio
(2, 1) };
20
if
(aspectRatioType < (
sizeof
(predefinedPars) /
sizeof
(
AspectRatio
))) {
21
*
this
= predefinedPars[aspectRatioType];
22
}
else
{
23
numerator = denominator = 0;
24
}
25
type = aspectRatioType;
26
}
27
28
}
// namespace TagParser
std
STL namespace.
aspectratio.h
TagParser
Definition:
aaccodebook.h:9
TagParser::AspectRatio
Definition:
aspectratio.h:10
Generated on Tue May 1 2018 14:32:28 for Tag Parser by
1.8.14