2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
\r
4 * This file is part of CasparCG (www.casparcg.com).
\r
6 * CasparCG is free software: you can redistribute it and/or modify
\r
7 * it under the terms of the GNU General Public License as published by
\r
8 * the Free Software Foundation, either version 3 of the License, or
\r
9 * (at your option) any later version.
\r
11 * CasparCG is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License
\r
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
\r
19 * Author: Robert Nagy, ronag89@gmail.com
\r
24 #include <common/enum_class.h>
\r
29 namespace caspar { namespace core {
\r
31 CASPAR_BEGIN_ENUM_CLASS
\r
52 CASPAR_END_ENUM_CLASS(video_format);
\r
54 CASPAR_BEGIN_ENUM_CLASS
\r
59 progressive = 3, // NOTE: progressive == lower | upper;
\r
61 CASPAR_END_ENUM_CLASS(field_mode);
\r
63 struct video_format_desc sealed
\r
65 video_format format; // video output format
\r
67 int width; // output frame width
\r
68 int height; // output frame height
\r
71 field_mode field_mode; // progressive, interlaced upper field first, interlaced lower field first
\r
72 double fps; // actual framerate, e.g. i50 = 25 fps, p50 = 50 fps
\r
76 int size; // output frame size in bytes
\r
77 std::wstring name; // name of output format
\r
79 int audio_sample_rate;
\r
81 std::vector<int> audio_cadence;
\r
83 video_format_desc(video_format format,
\r
88 core::field_mode field_mode,
\r
91 const std::wstring& name,
\r
92 const std::vector<int>& audio_cadence);
\r
94 video_format_desc(video_format format = video_format::invalid);
\r
95 video_format_desc(const std::wstring& name);
\r
98 bool operator==(const video_format_desc& rhs, const video_format_desc& lhs);
\r
99 bool operator!=(const video_format_desc& rhs, const video_format_desc& lhs);
\r
101 std::wostream& operator<<(std::wostream& out, const video_format_desc& format_desc);
\r