X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Fvideo%2Fvideo_decoder.h;h=d954dc05b05610a1d8b24d26b8cd03b7a75e573a;hb=726897adbf881d3b75f171fff24f2b917ba5f05a;hp=a6107c1c61594c6a06fbc543496bc559219781cd;hpb=116075e74e5bf0a23736aa036af813ee25e34e2c;p=casparcg diff --git a/modules/ffmpeg/producer/video/video_decoder.h b/modules/ffmpeg/producer/video/video_decoder.h index a6107c1c6..d954dc05b 100644 --- a/modules/ffmpeg/producer/video/video_decoder.h +++ b/modules/ffmpeg/producer/video/video_decoder.h @@ -1,67 +1,64 @@ -/* -* copyright (c) 2010 Sveriges Television AB -* -* This file is part of CasparCG. -* -* 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 . -* -*/ -#pragma once - -#include "../util.h" - -#include - -#include - -#include - -#include - -#include - -struct AVFormatContext; -struct AVFrame; -struct AVPacket; - -namespace caspar { - -namespace core { - struct frame_factory; -} - -namespace ffmpeg { - -class video_decoder : boost::noncopyable -{ -public: - - typedef Concurrency::ISource> source_t; - typedef Concurrency::ITarget> target_t; - - explicit video_decoder(source_t& source, target_t& target, AVFormatContext& context); - - size_t width() const; - size_t height() const; - - int64_t nb_frames() const; - bool is_progressive() const; - - double fps() const; -private: - struct implementation; - safe_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 + +#include + +struct AVFormatContext; +struct AVFrame; +struct AVPacket; + +namespace caspar { + +namespace core { + class frame_factory; + class write_frame; +} + +namespace ffmpeg { + +class video_decoder : boost::noncopyable +{ +public: + explicit video_decoder(const spl::shared_ptr& context); + + bool ready() const; + void push(const std::shared_ptr& packet); + std::shared_ptr poll(); + + int width() const; + int height() const; + + uint32_t nb_frames() const; + uint32_t file_frame_number() const; + bool is_progressive() const; + + std::wstring print() const; + +private: + struct implementation; + spl::shared_ptr impl_; +}; + }} \ No newline at end of file