+/*\r
+* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+*\r
+* This file is part of CasparCG.\r
+*\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
+*\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+* GNU General Public License for more details.\r
+\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
+*\r
+*/\r
+\r
#pragma once\r
\r
#include <string>\r
enum type\r
{\r
pal = 0,\r
- //ntsc,\r
- //x576p2500,\r
+ ntsc,\r
+ x576p2500,\r
x720p2500,\r
x720p5000,\r
- //x720p5994,\r
- //x720p6000,\r
- //x1080p2397,\r
- //x1080p2400,\r
+ x720p5994,\r
+ x720p6000,\r
+ x1080p2397,\r
+ x1080p2400,\r
x1080i5000,\r
- //x1080i5994,\r
- //x1080i6000,\r
+ x1080i5994,\r
+ x1080i6000,\r
x1080p2500,\r
- //x1080p2997,\r
- //x1080p3000,\r
- count,\r
- invalid\r
+ x1080p2997,\r
+ x1080p3000,\r
+ x1080p5000,\r
+ invalid,\r
+ count\r
};\r
};\r
\r
-struct video_mode \r
+struct field_mode \r
{ \r
enum type\r
{\r
- progressive,\r
- lower,\r
- upper,\r
- count,\r
- invalid\r
+ empty = 0,\r
+ lower = 1,\r
+ upper = 2,\r
+ progressive = 3 // NOTE: progressive == lower | upper;\r
};\r
+\r
+ static std::wstring print(field_mode::type value)\r
+ {\r
+ switch(value)\r
+ {\r
+ case progressive:\r
+ return L"progressive"; \r
+ case lower:\r
+ return L"lower";\r
+ case upper:\r
+ return L"upper";\r
+ default:\r
+ return L"invalid";\r
+ }\r
+ }\r
};\r
\r
struct video_format_desc\r
\r
size_t width; // output frame width\r
size_t height; // output frame height\r
- video_mode::type mode; // progressive, interlaced upper field first, interlaced lower field first\r
+ field_mode::type field_mode; // progressive, interlaced upper field first, interlaced lower field first\r
double fps; // actual framerate, e.g. i50 = 25 fps, p50 = 50 fps\r
- double interval; // time between frames\r
+ size_t time_scale;\r
+ size_t duration;\r
+ size_t field_count;\r
size_t size; // output frame size in bytes \r
std::wstring name; // name of output format\r
\r
+ size_t audio_bytes_per_sample;\r
+ size_t audio_sample_rate;\r
+ size_t audio_channels;\r
+ size_t audio_samples_per_frame;\r
+\r
static const video_format_desc& get(video_format::type format);\r
static const video_format_desc& get(const std::wstring& name);\r
};\r