Skip to content

Commit a975088

Browse files
committed
Merge pull request #183 from cchampet/swig_ignoreOptionMap
Swig: ignore custom types which are not bound
2 parents d151afc + 55adb30 commit a975088

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

src/AvTranscoder/Option.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@ class AvExport Option
118118
typedef std::vector<Option> OptionArray;
119119
typedef std::map<std::string, Option> OptionMap; ///< Key: option name / value: option
120120

121+
#ifndef SWIG
121122
/**
122123
* @param outOptions: map or array of options
123124
* @param av_class: a libav context (could be an AVFormatContext or an AVCodecContext).
124125
* @param req_flags: libav flag (AV_OPT_FLAG_XXX), which is a filter for AVOption loaded by the Context (default = 0: no flag restriction).
125126
*/
126127
void AvExport loadOptions( OptionMap& outOptions, void* av_class, int req_flags = 0 );
127128
void AvExport loadOptions( OptionArray& outOptions, void* av_class, int req_flags = 0 );
129+
#endif
128130

129131
}
130132

src/AvTranscoder/codec/ICodec.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ class AvExport ICodec
4444
int getLatency() const;
4545

4646
OptionArray getOptions(); ///< Get options as array
47+
#ifndef SWIG
4748
OptionMap& getOptionsMap() { return _options; } ///< Get options as map
48-
49+
#endif
4950
Option& getOption( const std::string& optionName ) { return _options.at(optionName); }
5051

5152
#ifndef SWIG

src/AvTranscoder/file/FormatContext.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ class AvExport FormatContext
8888
size_t getStartTime() const { return _avFormatContext->start_time; }
8989

9090
OptionArray getOptions(); ///< Get options as array
91+
#ifndef SWIG
9192
OptionMap& getOptionsMap() { return _options; } ///< Get options as map
92-
93+
#endif
9394
Option& getOption( const std::string& optionName ) { return _options.at(optionName); }
9495

9596
/**

src/AvTranscoder/util.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ AVPixelFormat AvExport getAVPixelFormat( const std::string& pixelFormat );
4848
*/
4949
AVSampleFormat AvExport getAVSampleFormat( const std::string& sampleFormat );
5050

51+
#ifndef SWIG
5152
/**
5253
* @brief Get array of short/long names of all format supported by FFmpeg / libav.
5354
*/
@@ -77,6 +78,7 @@ OptionArrayMap AvExport getVideoCodecOptions();
7778
* @brief Get the list of options for each audio codec
7879
*/
7980
OptionArrayMap AvExport getAudioCodecOptions();
81+
#endif
8082

8183
}
8284

0 commit comments

Comments
 (0)