fix patch err

This commit is contained in:
nap.liu 2022-12-16 21:29:17 +08:00
parent 4ed4fb7057
commit c51fc48088
3 changed files with 30 additions and 15 deletions

View File

@ -0,0 +1,7 @@
#!/bin/bash
export LD_LIBRARY_PATH=/var/packages/VideoStation/target/lib/patch/lib/
export GST_PLUGIN_PATH=/var/packages/VideoStation/target/lib/patch/plugins/
/var/packages/VideoStation/target/bin/gst-inspect-1.0.orig "$@"

View File

@ -5,8 +5,8 @@
#########################
pid=$$
stderrfile="/tmp/gstreamer.stderr"
logfile="/tmp/gstreamer.log"
stderrfile="/tmp/gst-launch-1.0.stderr"
logfile="/tmp/gst-launch-1.0.log"
#########################
# UTILS

View File

@ -10,7 +10,7 @@ version="2.0"
action="patch"
branch="master"
dependencies=("VideoStation" "ffmpeg")
wrappers=("ffmpeg" "gstreamer")
wrappers=("ffmpeg" "gst-launch-1.0" "gst-inspect-1.0")
vs_path=/var/packages/VideoStation/target
vs_lib_path="$vs_path/lib"
@ -28,6 +28,7 @@ cp_to_patch=(
"ffmpeg27:ffmpeg"
"ffmpeg33:ffmpeg"
"gst-launch-1.0:gst-launch-1.0"
"gst-inspect-1.0:gst-inspect-1.0"
)
###############################
@ -132,21 +133,28 @@ function patch() {
info "Enabling eac3, dts and truehd"
sed -i -e 's/eac3/3cae/' -e 's/dts/std/' -e 's/truehd/dheurt/' "$libsynovte_path"
info "Downloading gstreamer patch"
wget -q -O - "$repo_base_url/raw/branch/$branch/$patch_package" > "/tmp/$patch_package"
if [[ -d "$vs_lib_path/patch" ]]; then
info "Downloading gstreamer patch"
wget -q -O - "$repo_base_url/raw/branch/$branch/$patch_package" > "/tmp/$patch_package"
# patch VideoStation gstreamer plugin
info "Patching gstreamer"
tar -xzvf "/tmp/$patch_package" -C $vs_lib_path;
# tar -xzvf "/tmp/$patch_package" -C $cp_lib_path;
info "Patching gstreamer done"
# patch VideoStation gstreamer plugin
info "Patching gstreamer"
tar -xzvf "/tmp/$patch_package" -C $vs_lib_path;
# force refresh gstreamer plugin cache
rm -rf /var/packages/VideoStation/etc/gstreamer-1.0/registry.aarch64.bin
# rm -rf /var/packages/CodecPack/etc/gstreamer-1.0/registry.aarch64.bin
info "Refresh gstreamer plugin cache done"
# fix permission
chown -R VideoStation:VideoStation "$vs_lib_path/patch"
# tar -xzvf "/tmp/$patch_package" -C $cp_lib_path;
info "Patching gstreamer done"
# force refresh gstreamer plugin cache
rm -rf /var/packages/VideoStation/etc/gstreamer-1.0/registry.aarch64.bin
# rm -rf /var/packages/CodecPack/etc/gstreamer-1.0/registry.aarch64.bin
info "Refresh gstreamer plugin cache done"
rm "/tmp/$patch_package"
fi
rm "/tmp/$patch_package"
restart_packages