]> git.sesse.net Git - casparcg/blobdiff - core/video_format.h
2.0. audio: Audio pipeline is now in 32 bit.
[casparcg] / core / video_format.h
index 672e18f6076763367054bb75938c5d58e87fe5a5..58634a827ba742f361900a434051e3ab9fde9418 100644 (file)
@@ -1,3 +1,23 @@
+/*\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
@@ -25,21 +45,36 @@ struct video_format
                x1080p2500,\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
@@ -48,12 +83,20 @@ struct video_format_desc
 \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
+       size_t                                  square_width;\r
+       size_t                                  square_height;\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_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