From 9a88c165595c5624f088db25ecd7e4c55b3389a1 Mon Sep 17 00:00:00 2001 From: lukas Date: Sat, 25 Sep 2021 23:52:21 +0200 Subject: [PATCH] remove direct libcall due to lib update --- .gitlab-ci.yml | 2 -- apiGo/go.mod | 2 +- apiGo/go.sum | 4 ++-- .../thumbnail/Thumbnailparser_shared_ffmpeg.go | 18 +----------------- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59317f8..1d753b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,8 +28,6 @@ Build_Backend: image: golang:latest stage: build_backend script: - - apt update - - apt install libffmpeg-ocaml-dev - cd apiGo - go build -v -tags sharedffmpeg -o openmediacenter - cp -r ../build/ ./static/ diff --git a/apiGo/go.mod b/apiGo/go.mod index 1f6b14d..95ee12d 100644 --- a/apiGo/go.mod +++ b/apiGo/go.mod @@ -3,7 +3,7 @@ module openmediacenter/apiGo go 1.16 require ( - github.com/3d0c/gmf v0.0.0-20210830084021-7b27911659a2 // indirect + github.com/3d0c/gmf v0.0.0-20210925211039-e278e6e53b16 github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/go-sql-driver/mysql v1.5.0 github.com/pelletier/go-toml/v2 v2.0.0-beta.3 diff --git a/apiGo/go.sum b/apiGo/go.sum index 0d86dc2..dd89002 100644 --- a/apiGo/go.sum +++ b/apiGo/go.sum @@ -1,6 +1,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/3d0c/gmf v0.0.0-20210830084021-7b27911659a2 h1:+wdkl7m6ElGhLyYxHab+uPYf57MQ4XpX6EuG/8kbkLg= -github.com/3d0c/gmf v0.0.0-20210830084021-7b27911659a2/go.mod h1:0QMRcUq2JsDECeAq7bj4h79k7XbhtTsrPUQf6G7qfPs= +github.com/3d0c/gmf v0.0.0-20210925211039-e278e6e53b16 h1:LX3XWmS88yKgWJcMXb8vusphpDBe9+6LTI9FyHeFFWQ= +github.com/3d0c/gmf v0.0.0-20210925211039-e278e6e53b16/go.mod h1:0QMRcUq2JsDECeAq7bj4h79k7XbhtTsrPUQf6G7qfPs= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/apiGo/videoparser/thumbnail/Thumbnailparser_shared_ffmpeg.go b/apiGo/videoparser/thumbnail/Thumbnailparser_shared_ffmpeg.go index d76291a..7cdc51d 100644 --- a/apiGo/videoparser/thumbnail/Thumbnailparser_shared_ffmpeg.go +++ b/apiGo/videoparser/thumbnail/Thumbnailparser_shared_ffmpeg.go @@ -2,17 +2,6 @@ package thumbnail -/* - -#cgo pkg-config: libavcodec - -#include -#include "libavcodec/avcodec.h" -#include "libavutil/pixfmt.h" - -*/ -import "C" - import ( "github.com/3d0c/gmf" "io" @@ -68,12 +57,7 @@ func decodePic(srcFileName string, decodeExtension string, time uint64) (pic *[] cc.SetTimeBase(gmf.AVR{Num: 1, Den: 1}) - // add missing codecs in lib - var ( - AV_PIX_FMT_YUVJ444P int32 = C.AV_PIX_FMT_YUVJ444P - ) - - cc.SetPixFmt(AV_PIX_FMT_YUVJ444P).SetWidth(srcVideoStream.CodecPar().Width()).SetHeight(srcVideoStream.CodecPar().Height()) + cc.SetPixFmt(gmf.AV_PIX_FMT_YUVJ444P).SetWidth(srcVideoStream.CodecPar().Width()).SetHeight(srcVideoStream.CodecPar().Height()) if codec.IsExperimental() { cc.SetStrictCompliance(gmf.FF_COMPLIANCE_EXPERIMENTAL) }