Skip to content

Commit 7c885d3

Browse files
author
Clement Champetier
committed
Context: add typedef to manipulate options
Add OptionArray and OptionMap.
1 parent 1869f4a commit 7c885d3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/AvTranscoder/option/Context.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
namespace avtranscoder
1212
{
1313

14+
typedef std::vector<Option> OptionArray;
15+
typedef std::map<std::string, Option> OptionMap;
16+
1417
/**
1518
* @brief Wrapper of AVContext.
1619
* Can access Options through the corresponding context.
@@ -37,16 +40,16 @@ class AvExport Context
3740
loadOptions( avContext, req_flags );
3841
}
3942

40-
std::vector<Option> getOptions();
41-
std::map<std::string, Option>& getOptionsMap() { return _options; }
43+
OptionArray getOptions();
44+
OptionMap& getOptionsMap() { return _options; }
4245

4346
Option& getOption( const std::string& optionName ) { return _options.at(optionName); }
4447

4548
protected:
4649
void loadOptions( void* av_class, int req_flags );
4750

4851
private:
49-
std::map<std::string, Option> _options;
52+
OptionMap _options;
5053
void* _avContext; ///< Has link (no ownership)
5154
};
5255

0 commit comments

Comments
 (0)