X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Fmuxer%2Fframe_muxer.h;h=651cbb4412cf4987c132133d9a87ee5c8150ece4;hb=726897adbf881d3b75f171fff24f2b917ba5f05a;hp=4b4fdc709cce53aea38b08700119b9d1014ecaca;hpb=f78d434c81a83b428ae2e24af862d5f2702c34f9;p=casparcg diff --git a/modules/ffmpeg/producer/muxer/frame_muxer.h b/modules/ffmpeg/producer/muxer/frame_muxer.h index 4b4fdc709..651cbb441 100644 --- a/modules/ffmpeg/producer/muxer/frame_muxer.h +++ b/modules/ffmpeg/producer/muxer/frame_muxer.h @@ -1,70 +1,69 @@ -/* -* 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 "display_mode.h" - -#include - -#include - -#include - -#include - -struct AVFrame; - -namespace caspar { - -namespace core { - -class write_frame; -class basic_frame; -struct frame_factory; - -} - -namespace ffmpeg { - -class frame_muxer : boost::noncopyable -{ -public: - frame_muxer(double in_fps, const safe_ptr& frame_factory, const std::string& filter = "", display_mode::type force_deinterlace_mode = display_mode::deinterlace_bob_reinterlace); - - void push(const std::shared_ptr& video_frame, int hints = 0); - void push(const std::shared_ptr& audio_samples); - - bool video_ready() const; - bool audio_ready() const; - - std::shared_ptr poll(); - - uint32_t calc_nb_frames(uint32_t nb_frames) const; - - void force_deinterlacing(bool value); - -private: - struct implementation; - safe_ptr impl_; -}; - +/* +* 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 "display_mode.h" + +#include +#include + +#include +#include +#include + +#include +#include + +#include + +struct AVFrame; + +namespace caspar { namespace ffmpeg { + +class frame_muxer : boost::noncopyable +{ +public: + frame_muxer( + boost::rational in_framerate, + const spl::shared_ptr& frame_factory, + const core::video_format_desc& format_desc, + const core::audio_channel_layout& channel_layout, + const std::wstring& filter, + bool multithreaded_filter); + + void push(const std::shared_ptr& video_frame); + void push(const std::shared_ptr& audio_samples); + + bool video_ready() const; + bool audio_ready() const; + + core::draw_frame poll(); + + boost::rational out_framerate() const; + + uint32_t calc_nb_frames(uint32_t nb_frames) const; +private: + struct impl; + spl::shared_ptr impl_; +}; + }} \ No newline at end of file