]> git.sesse.net Git - casparcg/blobdiff - core/video_format.h
Made MIXER CROP work more as one might expect
[casparcg] / core / video_format.h
index fdbe1bd3ee49fff95159360fd029fa9a0d5eaaaa..27d3c7fecf155be8f91a5695f02f194c7d824464 100644 (file)
@@ -1,29 +1,29 @@
 /*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright 2013 Sveriges Television AB http://casparcg.com/\r
 *\r
-*  This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\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
+* 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
+* 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
+* Author: Robert Nagy, ronag89@gmail.com\r
 */\r
 \r
 #pragma once\r
 \r
+#include <vector>\r
 #include <string>\r
 \r
-#include <common/compiler/vs/disable_silly_warnings.h>\r
-\r
 namespace caspar { namespace core {\r
        \r
 struct video_format \r
@@ -35,9 +35,13 @@ struct video_format
                x576p2500,\r
                x720p2500,\r
                x720p5000,\r
+               x720p2398,\r
+               x720p2400,\r
+               x720p2997,\r
                x720p5994,\r
+               x720p3000,\r
                x720p6000,\r
-               x1080p2397,\r
+               x1080p2398,\r
                x1080p2400,\r
                x1080i5000,\r
                x1080i5994,\r
@@ -46,6 +50,16 @@ struct video_format
                x1080p2997,\r
                x1080p3000,\r
                x1080p5000,\r
+               x1080p5994,\r
+               x1080p6000,\r
+               x1556p2398,\r
+               x1556p2400,\r
+               x1556p2500,\r
+               x2160p2398,\r
+               x2160p2400,\r
+               x2160p2500,\r
+               x2160p2997,\r
+               x2160p3000,\r
                invalid,\r
                count\r
        };\r
@@ -93,24 +107,22 @@ struct video_format_desc
        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
+       std::vector<size_t>             audio_cadence; // rotating optimal number of 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
-\r
-inline bool operator==(const video_format_desc& rhs, const video_format_desc& lhs)\r
-{\r
-       return rhs.format == lhs.format;\r
-}\r
+       \r
+       bool operator==(const video_format_desc& lhs)\r
+       {\r
+               return format == lhs.format;\r
+       }\r
 \r
-inline bool operator!=(const video_format_desc& rhs, const video_format_desc& lhs)\r
-{\r
-       return !(rhs == lhs);\r
-}\r
+       bool operator!=(const video_format_desc& lhs)\r
+       {\r
+               return !(*this == lhs);\r
+       }\r
+};\r
 \r
 inline std::wostream& operator<<(std::wostream& out, const video_format_desc& format_desc)\r
 {\r