/* Copyright (C) 2017 Carl Hetherington This file is part of DCP-o-matic. DCP-o-matic 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 2 of the License, or (at your option) any later version. DCP-o-matic 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 DCP-o-matic. If not, see . */ #include "transcoder.h" #include "event_history.h" extern "C" { #include #include } class FFmpegTranscoder : public Transcoder { public: FFmpegTranscoder (boost::shared_ptr film, boost::weak_ptr job); void go (); float current_encoding_rate () const; int video_frames_enqueued () const; bool finishing () const { return false; } void set_output (boost::filesystem::path o) { _output = o; } private: void video (boost::shared_ptr, DCPTime); void audio (boost::shared_ptr, DCPTime); void subtitle (PlayerSubtitles, DCPTimePeriod); AVCodecContext* _codec_context; AVFormatContext* _format_context; AVStream* _video_stream; AVPixelFormat _pixel_format; mutable boost::mutex _mutex; Frame _last_frame; EventHistory _history; boost::filesystem::path _output; };