-
Notifications
You must be signed in to change notification settings - Fork 23
/
x264_plugin_patcher.sh
60 lines (56 loc) · 1.33 KB
/
x264_plugin_patcher.sh
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
#!/bin/bash
# This patches the current example code from BlackMagic to build on modern CentOS-derived OS
ed x264_encoder_plugin/.mk.defs << ENDOFPATCH
8c
CFLAGS = -fPIC -stdlib=libstdc++ -std=c++11 -Wall -I\$(PLUGIN_DEF_DIR)
.
wq
ENDOFPATCH
ed x264_encoder_plugin/Makefile << ENDOFPATCH
56a
install:
mkdir -p \$(BUNDLE_DIR)/Contents/Linux-x86-64
cp bin/x264_encoder_plugin.dvcp \$(BUNDLE_DIR)/Contents/Linux-x86-64
sudo mkdir -p /opt/resolve/IOPlugins
sudo cp -r \$(BUNDLE_DIR) /opt/resolve/IOPlugins
.
44a
rm -rf \$(BUNDLE_DIR)
sudo rm -rf /opt/resolve/IOPlugins
.
19c
# (need to install zlib1g-dev on debian or zlib-devel on centos)
LDFLAGS += -L\$(X264_DIR) -lx264 -lz
.
12c
LDFLAGS = -shared '-Wl,-rpath,\$\$ORIGIN' -Wl,-z,origin -lpthread -stdlib=libstdc++
.
9c
CFLAGS += -I\$(X264_DIR) -I/usr/include/c++/11 -I/usr/include/c++/11/x86_64-redhat-linux
BUNDLE_DIR = \$(BASEDIR)x264_encoder_plugin.dvcp.bundle
.
wq
ENDOFPATCH
ed x264_encoder_plugin/audio_encoder.h << ENDOFPATCH
3a
#include <memory>
.
wq
ENDOFPATCH
ed x264_encoder_plugin/x264_encoder.cpp << ENDOFPATCH
408c
const char* pCodecGroup = "AVC (plugin)";
.
405c
const char* pCodecName = "x264 (plugin)";
.
342a
case 5:
pProfile = x264_profile_names[5];
.
199a
textsVec.push_back("High 444");
valuesVec.push_back(5);
.
wq
ENDOFPATCH