]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/util/util.h
2.1.0: Reverted utf8. To complicated to fully fix for now.
[casparcg] / modules / ffmpeg / producer / util / util.h
index 1a957bb4ac983ccba368f7d98e510b0c4e833b21..2960c2e94a1af35e89201831f400082b7e11228f 100644 (file)
@@ -1,3 +1,24 @@
+/*\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
+*\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
+*\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 <common/memory/safe_ptr.h>\r
 #include <core/producer/frame/pixel_format.h>\r
 #include <core/mixer/audio/audio_mixer.h>\r
 \r
-\r
-#if defined(_MSC_VER)\r
-#pragma warning (push)\r
-#pragma warning (disable : 4244)\r
-#endif\r
-extern "C" \r
-{\r
-       #include <libavutil/pixfmt.h>\r
-       #include <libavcodec/avcodec.h>\r
-}\r
-#if defined(_MSC_VER)\r
-#pragma warning (pop)\r
-#endif\r
-\r
+enum PixelFormat;\r
 struct AVFrame;\r
 struct AVFormatContext;\r
 struct AVPacket;\r
+struct AVRational;\r
+struct AVCodecContext;\r
 \r
 namespace caspar {\r
 \r
@@ -43,7 +53,7 @@ std::shared_ptr<AVFrame>                      empty_video();
 \r
 // Utils\r
 \r
-static const PixelFormat       CASPAR_PIX_FMT_LUMA = PIX_FMT_MONOBLACK; // Just hijack some unual pixel format.\r
+static const int CASPAR_PIX_FMT_LUMA = 10; // Just hijack some unual pixel format.\r
 \r
 core::field_mode::type         get_mode(const AVFrame& frame);\r
 int                                                    make_alpha_format(int format); // NOTE: Be careful about CASPAR_PIX_FMT_LUMA, change it to PIX_FMT_GRAY8 if you want to use the frame inside some ffmpeg function.\r
@@ -57,6 +67,11 @@ safe_ptr<AVFormatContext> open_input(const std::wstring& filename);
 bool is_sane_fps(AVRational time_base);\r
 AVRational fix_time_base(AVRational time_base);\r
 \r
-//void av_dup_frame(AVFrame* frame);\r
+double read_fps(AVFormatContext& context, double fail_value);\r
+\r
+std::wstring print_mode(size_t width, size_t height, double fps, bool interlaced);\r
+\r
+std::wstring probe_stem(const std::wstring stem);\r
+bool is_valid_file(const std::wstring filename);\r
 \r
 }}
\ No newline at end of file