X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Finput%2Finput.h;h=eb4dc903ad1dd6a40400c0d961be3b0b8230d8c6;hb=a111f54e43d6b3974036b6e7812b39558409910f;hp=1e3d11f4af4d551f10f9c06d5028cfb2aacb12a8;hpb=1785286834c8c3e81e2aa2bc17248cfa6992c883;p=casparcg diff --git a/modules/ffmpeg/producer/input/input.h b/modules/ffmpeg/producer/input/input.h index 1e3d11f4a..eb4dc903a 100644 --- a/modules/ffmpeg/producer/input/input.h +++ b/modules/ffmpeg/producer/input/input.h @@ -1,65 +1,76 @@ -/* -* Copyright (c) 2011 Sveriges Television AB -* -* 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 . -* -* Author: Robert Nagy, ronag89@gmail.com -*/ - -#pragma once - -#include - -#include -#include -#include - -#include - -struct AVFormatContext; -struct AVPacket; - -namespace caspar { - -namespace diagnostics { - -class graph; - -} - -namespace ffmpeg { - -class input : boost::noncopyable -{ -public: - explicit input(const spl::shared_ptr& graph, const std::wstring& filename, bool loop, uint32_t start, uint32_t length); - - bool try_pop(std::shared_ptr& packet); - bool eof() const; - - void loop(bool value); - bool loop() const; - - void seek(uint32_t target); - - spl::shared_ptr context(); -private: - struct impl; - std::shared_ptr impl_; -}; - - -}} +/* +* 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 . +* +* Author: Robert Nagy, ronag89@gmail.com +*/ + +#pragma once + +#include "../util/util.h" + +#include + +#include +#include +#include +#include + +#include +#include + +struct AVFormatContext; +struct AVPacket; + +namespace caspar { + +namespace diagnostics { + +class graph; + +} + +namespace ffmpeg { + +class input : boost::noncopyable +{ +public: + explicit input(const spl::shared_ptr& 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& 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; + boost::rational framerate() const; + + std::future seek(uint32_t target); + + spl::shared_ptr context(); +private: + struct implementation; + std::shared_ptr impl_; +}; + + +}}