Skip to content

Commit c127c44

Browse files
committed
Windows: fix SWIG binding for static const members and process module
1 parent b059cfe commit c127c44

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

src/AvTranscoder/avTranscoder.i

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
%include "std_pair.i"
88
%include "std_map.i"
99

10-
1110
%include "AvTranscoder/swig/avException.i"
1211
%include "AvTranscoder/swig/avExport.i"
1312

@@ -50,11 +49,28 @@
5049

5150
#include <AvTranscoder/transcoder/StreamTranscoder.hpp>
5251
#include <AvTranscoder/transcoder/Transcoder.hpp>
53-
%}
5452

55-
%include "AvTranscoder/progress/progress.i"
53+
/* initialize static const members for binding */
54+
namespace avtranscoder {
55+
const std::string Profile::avProfileIdentificator = "avProfile";
56+
const std::string Profile::avProfileIdentificatorHuman = "avProfileLong";
57+
58+
const std::string Profile::avProfileType = "avProfileType";
59+
const std::string Profile::avProfileTypeFormat = "avProfileTypeFormat";
60+
const std::string Profile::avProfileTypeVideo = "avProfileTypeVideo";
61+
const std::string Profile::avProfileTypeAudio = "avProfileTypeAudio";
62+
63+
const std::string Profile::avProfileFormat = "format";
64+
const std::string Profile::avProfileCodec = "codec";
65+
const std::string Profile::avProfilePixelFormat = "pix_fmt";
66+
const std::string Profile::avProfileSampleFormat = "sample_fmt";
67+
const std::string Profile::avProfileFrameRate = "r";
68+
const std::string Profile::avProfileSampleRate = "ar";
69+
const std::string Profile::avProfileChannel = "ac";
70+
}
71+
%}
5672

57-
namespace std {
73+
namespace std {
5874
%template(IntPair) pair< size_t, size_t >;
5975
%template(VideoVector) vector< avtranscoder::VideoProperties >;
6076
%template(AudioVector) vector< avtranscoder::AudioProperties >;
@@ -69,6 +85,8 @@ namespace std {
6985

7086
%include <AvTranscoder/common.hpp>
7187

88+
%include "AvTranscoder/progress/progress.i"
89+
7290
%include <AvTranscoder/Profile.hpp>
7391

7492
%include <AvTranscoder/essenceStructures/Pixel.hpp>

0 commit comments

Comments
 (0)