forked from Streampunk/beamcoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
143 lines (143 loc) · 4.59 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
"targets": [{
"target_name" : "beamcoder",
"sources" : [ "src/beamcoder.cc", "src/beamcoder_util.cc",
"src/governor.cc", "src/demux.cc",
"src/decode.cc", "src/filter.cc",
"src/encode.cc", "src/mux.cc",
"src/packet.cc", "src/frame.cc",
"src/codec_par.cc", "src/format.cc",
"src/codec.cc", "src/hwcontext.cc" ],
"defines": [
"NAPI_VERSION=<(napi_build_version)"
],
"conditions": [
['OS=="linux"', {
"defines": [
"__STDC_CONSTANT_MACROS"
],
"cflags_cc!": [
"-fno-rtti",
"-fno-exceptions"
],
"cflags_cc": [
"-std=c++11",
"-fexceptions"
],
"link_settings": {
"libraries": [
"-lavcodec",
"-lavdevice",
"-lavfilter",
"-lavformat",
"-lavutil",
"-lpostproc",
"-lswresample",
"-lswscale",
"-lzimg"
]
},
"copies": [
{
"destination": "<(PRODUCT_DIR)",
"files": [
"node_modules/ffmpeg-ffprobe-static/ffmpeg",
"node_modules/ffmpeg-ffprobe-static/ffprobe",
]
}
]
}],
["OS=='mac'", {
"variables": {
"ffmpeg_version": "1.33rc3",
"target_arch_override": "<!(node -p \"'<(target_arch)' === 'x64' ? 'x86_64' : '<(target_arch)'\")",
},
"defines": [
"__STDC_CONSTANT_MACROS"
],
"cflags_cc!": [
"-fno-rtti",
"-fno-exceptions"
],
"cflags_cc": [
"-std=c++11",
"-fexceptions"
],
"include_dirs": [
"<(module_root_dir)/ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)/include/"
],
"link_settings": {
"library_dirs": [
"<(module_root_dir)/ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)/"
],
"libraries": [
"-Wl,-rpath,@loader_path",
"-lavcodec",
"-lavdevice",
"-lavfilter",
"-lavformat",
"-lavutil",
"-lpostproc",
"-lswresample",
"-lswscale",
"-lzimg"
],
},
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.11',
},
"copies": [
{
"destination": "<(PRODUCT_DIR)",
"files": [
"<!@(node -p \"require('fs').readdirSync('ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)').map(f => 'ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)/' + f).join(' ')\")"
]
}
]
}
],
['OS=="win"', {
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeTypeInfo": "true",
"AdditionalOptions": ['/WX']
}
}
}
},
"include_dirs" : [
"ffmpeg/ffmpeg-4.x-win64-shared/include"
],
"libraries": [
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avcodec",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avdevice",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avfilter",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avformat",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avutil",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/postproc",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/swresample",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/swscale"
],
"copies": [
{
"destination": "<(PRODUCT_DIR)",
"files": [
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avcodec-58.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avdevice-58.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avfilter-7.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avformat-58.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avutil-56.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/postproc-55.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/swresample-3.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/swscale-5.dll",
"node_modules/ffmpeg-ffprobe-static/ffmpeg.exe",
"node_modules/ffmpeg-ffprobe-static/ffprobe.exe"
]
}
]
}]
]
}]
}