3d0c / gmf

Go Media Framework
MIT License
891 stars 170 forks source link

fixes for go1.12 support #102

Closed ergoz closed 5 years ago

ergoz commented 5 years ago

Fixes for mangled C types for go 1.12 support

This fix not break go 1.11 support

Specially for GMF i made public docker container riftbit/ffalpine

Docker container for tests that i used:

#
# BUILD STEP
#
FROM riftbit/ffalpine:latest-go as build-stage

ARG GFM_REPO=3d0c/gmf

RUN go get github.com/${GFM_REPO}

WORKDIR $GOPATH/src/github.com/${GFM_REPO}/examples

RUN mkdir -p /examples && cp ./bbb.mp4 /examples/ && \
    go build -o /examples/stress stress.go

#
# RUNTIME STEP
#
FROM riftbit/ffalpine:latest

COPY --from=build-stage /examples /examples

RUN ls -la /examples

WORKDIR /examples
ENTRYPOINT ["./stress"]

Build image:

docker build -t grad .

Test run container:

docker run --rm grad -n 1 -fn decode

Result output

done, press enter to quit
3d0c commented 5 years ago

Great! Thanks!