forked from antoineMoPa/beamcoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
105 lines (105 loc) · 3.4 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
{
"targets": [{
"target_name" : "beamcoder",
"sources" : [ "src/beamcoder.cc", "src/beamcoder_util.cc",
"src/log.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"],
"conditions": [
['OS!="win"', {
"defines": [
"__STDC_CONSTANT_MACROS"
],
"cflags_cc!": [
"-fno-rtti",
"-fno-exceptions"
],
"cflags_cc": [
"-std=c++11",
"-fexceptions"
]
}],
['OS!="win" and OS!="linux"', {
"link_settings": {
"libraries": [
"-lavcodec",
"-lavdevice",
"-lavfilter",
"-lavformat",
"-lavutil",
"-lpostproc",
"-lswresample",
"-lswscale"
]
}
}],
['OS=="win"', {
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeTypeInfo": "true"
}
}
}
},
"include_dirs" : [
"ffmpeg/ffmpeg-5.x-win64-shared/include"
],
"libraries": [
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/avcodec",
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/avdevice",
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/avfilter",
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/avformat",
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/avutil",
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/postproc",
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/swresample",
"-l../ffmpeg/ffmpeg-5.x-win64-shared/lib/swscale"
],
"copies": [
{
"destination": "build/Release/",
"files": [
"ffmpeg/ffmpeg-5.x-win64-shared/bin/avcodec-59.dll",
"ffmpeg/ffmpeg-5.x-win64-shared/bin/avdevice-59.dll",
"ffmpeg/ffmpeg-5.x-win64-shared/bin/avfilter-8.dll",
"ffmpeg/ffmpeg-5.x-win64-shared/bin/avformat-59.dll",
"ffmpeg/ffmpeg-5.x-win64-shared/bin/avutil-57.dll",
"ffmpeg/ffmpeg-5.x-win64-shared/bin/postproc-56.dll",
"ffmpeg/ffmpeg-5.x-win64-shared/bin/swresample-4.dll",
"ffmpeg/ffmpeg-5.x-win64-shared/bin/swscale-6.dll"
]
}
]
}],
['OS=="linux"', {
"libraries": [
"<!(pkg-config --libs libavcodec)",
"<!(pkg-config --libs libavdevice)",
"<!(pkg-config --libs libavfilter)",
"<!(pkg-config --libs libavformat)",
"<!(pkg-config --libs libavutil)",
"<!(pkg-config --libs libpostproc)",
"<!(pkg-config --libs libswresample)",
"<!(pkg-config --libs libswscale)"
]
}],
['OS=="mac"', {
"include_dirs" : [
"/usr/local/Cellar/ffmpeg@5/5.1.3/include/",
"/opt/homebrew/Cellar/ffmpeg@5/5.1.3/include/",
"/opt/homebrew/Cellar/ffmpeg@5/5.1.4_4/include/",
],
"library_dirs": [
"/usr/local/Cellar/ffmpeg@5/5.1.3/lib/",
"/opt/homebrew/Cellar/ffmpeg@5/5.1.3/lib/",
"/opt/homebrew/Cellar/ffmpeg@5/5.1.4_4/lib/",
]
}],
]
}]
}