-/*\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
-\r
-#include <memory>\r
-#include <string>\r
-#include <cstdint>\r
-\r
-#include <boost/noncopyable.hpp>\r
-\r
-struct AVFormatContext;\r
-struct AVPacket;\r
-\r
-namespace caspar {\r
-\r
-namespace diagnostics {\r
-\r
-class graph;\r
-\r
-}\r
- \r
-namespace ffmpeg {\r
-\r
-class input : boost::noncopyable\r
-{\r
-public:\r
- explicit input(const safe_ptr<diagnostics::graph>& graph, const std::wstring& filename, bool loop, uint32_t start, uint32_t length);\r
-\r
- bool try_pop(std::shared_ptr<AVPacket>& packet);\r
- bool eof() const;\r
-\r
- void loop(bool value);\r
- bool loop() const;\r
-\r
- void seek(uint32_t target);\r
-\r
- safe_ptr<AVFormatContext> context();\r
-private:\r
- struct implementation;\r
- std::shared_ptr<implementation> impl_;\r
-};\r
-\r
- \r
-}}\r
+/*
+* Copyright 2013 Sveriges Television AB http://casparcg.com/
+*
+* This file is part of CasparCG (www.casparcg.com).
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+* Author: Robert Nagy, ronag89@gmail.com
+*/
+
+#pragma once
+
+#include "../util/util.h"
+
+#include <common/memory.h>
+
+#include <memory>
+#include <string>
+#include <cstdint>
+#include <future>
+
+#include <boost/noncopyable.hpp>
+#include <boost/rational.hpp>
+
+struct AVFormatContext;
+struct AVPacket;
+
+namespace caspar {
+
+namespace diagnostics {
+
+class graph;
+
+}
+
+namespace ffmpeg {
+
+class input : boost::noncopyable
+{
+public:
+ explicit input(const spl::shared_ptr<diagnostics::graph>& graph, const std::wstring& url_or_file, bool loop, uint32_t start, uint32_t length, bool thumbnail_mode, const ffmpeg_options& vid_params);
+
+ bool try_pop(std::shared_ptr<AVPacket>& packet);
+ bool eof() const;
+
+ void start(uint32_t value);
+ uint32_t start() const;
+ void length(uint32_t value);
+ uint32_t length() const;
+ void loop(bool value);
+ bool loop() const;
+
+ int num_audio_streams() const;
+
+ std::future<bool> seek(uint32_t target);
+
+ spl::shared_ptr<AVFormatContext> context();
+private:
+ struct implementation;
+ std::shared_ptr<implementation> impl_;
+};
+
+
+}}