@@ -43,17 +43,18 @@ class Option
43
43
~Option () {}
44
44
45
45
OptionType getType () const ;
46
- const std::string getName () { return std::string ( m_avOption.name ? m_avOption.name : " " ); }
47
- const std::string getHelp () { return std::string ( m_avOption.help ? m_avOption.help : " " ); }
48
- const std::string getUnit () { return std::string ( m_avOption.unit ? m_avOption.unit : " " ); }
46
+ std::string getName () const { return std::string ( m_avOption.name ? m_avOption.name : " " ); }
47
+ std::string getHelp () const { return std::string ( m_avOption.help ? m_avOption.help : " " ); }
48
+ std::string getUnit () const { return std::string ( m_avOption.unit ? m_avOption.unit : " " ); }
49
+ int getOffset () const { return m_avOption.offset ; }
49
50
50
51
// flags
51
- int getFlags () { return m_avOption.flags ; }
52
- bool isEncodingOpt (){ return m_avOption.flags & AV_OPT_FLAG_ENCODING_PARAM; }
53
- bool isDecodingOpt (){ return m_avOption.flags & AV_OPT_FLAG_DECODING_PARAM; }
54
- bool isAudioOpt (){ return m_avOption.flags & AV_OPT_FLAG_AUDIO_PARAM; }
55
- bool isVideoOpt (){ return m_avOption.flags & AV_OPT_FLAG_VIDEO_PARAM; }
56
- bool isSubtitleOpt (){ return m_avOption.flags & AV_OPT_FLAG_SUBTITLE_PARAM; }
52
+ int getFlags () const { return m_avOption.flags ; }
53
+ bool isEncodingOpt () const { return m_avOption.flags & AV_OPT_FLAG_ENCODING_PARAM; }
54
+ bool isDecodingOpt () const { return m_avOption.flags & AV_OPT_FLAG_DECODING_PARAM; }
55
+ bool isAudioOpt () const { return m_avOption.flags & AV_OPT_FLAG_AUDIO_PARAM; }
56
+ bool isVideoOpt () const { return m_avOption.flags & AV_OPT_FLAG_VIDEO_PARAM; }
57
+ bool isSubtitleOpt () const { return m_avOption.flags & AV_OPT_FLAG_SUBTITLE_PARAM; }
57
58
58
59
// default value
59
60
bool getDefaultValueBool () const ;
@@ -63,11 +64,12 @@ class Option
63
64
std::pair<int , int > getDefaultValueRatio () const ;
64
65
65
66
// array of childs
66
- bool hasChild () { return ! m_options.empty (); }
67
- std::vector<Option> getChilds () { return m_options; }
68
- Option& getChild ( size_t index ) { return m_options.at ( index ); }
69
- size_t getNbChilds () { return m_options.size (); }
67
+ bool hasChild () const { return ! m_options.empty (); }
68
+ const std::vector<Option>& getChilds () { return m_options; }
69
+ const Option& getChild ( size_t index ) { return m_options.at ( index ); }
70
+ size_t getNbChilds () const { return m_options.size (); }
70
71
int getDefaultChildIndex () const { return m_defaultChildIndex; }
72
+
71
73
void setDefaultChildIndex ( size_t index ) { m_defaultChildIndex = index; }
72
74
void appendChild ( const Option& child );
73
75
0 commit comments