/** * @file encodersettings.cpp * @author Josep Maria AntolĂ­n * @date Feb 27 2017 * @brief Encoder settings interface for encoders. */ #ifndef ENCODERSETTINGS_H #define ENCODERSETTINGS_H #include #include #include "util/memory.h" class EncoderSettings { public: class OptionsGroup { public: OptionsGroup(QString gName, QString gCode, QList conNames) : groupName(gName), groupCode(gCode), controlNames(conNames) {} QString groupName; QString groupCode; QList controlNames; }; enum class ChannelMode { AUTOMATIC=0, MONO=1, STEREO=2 }; virtual ~EncoderSettings() = default; // Returns the list of quality values supported, to assign them to the slider virtual QList getQualityValues() const { return QList(); } virtual int getQuality() const { return 0; } virtual int getQualityIndex() const { return 0; } // Returns the list of compression values supported, to assign them to the slider virtual QList getCompressionValues() const { return QList(); } // Sets the compression level virtual void setCompression(int compression) { Q_UNUSED(compression); } virtual int getCompression() const { return 0; } // Returns the list of radio options to show to the user virtual QList getOptionGroups() const { return QList(); } // Selects the option by its index. If it is a single-element option, // index 0 means disabled and 1 enabled. // Return the selected option of the group. If it is a single-element option, // 0 means disabled and 1 enabled. virtual int getSelectedOption(QString groupCode) const { Q_UNUSED(groupCode); return 0; } virtual ChannelMode getChannelMode() const { return ChannelMode::AUTOMATIC; } // Returns the format subtype of this encoder settings. virtual QString getFormat() const = 0; }; typedef std::shared_ptr EncoderSettingsPointer; #endif // ENCODERSETTINGS_H