#ifndef TRANSCODE_PARAMETERS_HPP #define TRANSCODE_PARAMETERS_HPP #include #include #include #include "Format.hpp" #include "InputMediaFile.hpp" namespace Transcode { class Parameters { public: Parameters(const InputMediaFile& InputFile, const Format& outputFormat); // Modifiers void setOffset(boost::posix_time::time_duration offset) { _offset = offset; } // Set input offset void setOutputFormat(const Format& format) { _outputFormat = format; } std::size_t setBitrate(Stream::Type type, std::size_t bitrate); // Manually select an input stream to output // There can be only one stream per each type (video, audio, subtitle) typedef std::map StreamMap; void selectInputStream(Stream::Type type, Stream::Id id) { _inputStreams[type] = id; } const StreamMap& getInputStreams(void) const {return _inputStreams;} //Accessors boost::posix_time::time_duration getOffset(void) const {return _offset;} const Format& getOutputFormat(void) const { return _outputFormat; } std::size_t getOutputBitrate(Stream::Type type) const; const InputMediaFile& getInputMediaFile(void) const { return _mediaFile;} InputMediaFile& getInputMediaFile(void) { return _mediaFile;} private: InputMediaFile _mediaFile; boost::posix_time::time_duration _offset; // start input offset Format _outputFormat; // OGA, OGV, etc. std::map _outputBitrate; StreamMap _inputStreams; }; } // namespace Transcode #endif