mirror of
https://github.com/zergon321/reisen.git
synced 2025-09-26 20:01:14 +08:00
pkg-config directives added to the dependent files.
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
package reisen
|
||||
|
||||
// #cgo pkg-config: libavutil libavformat libavcodec libswscale
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avutil.h>
|
||||
// #include <libavutil/imgutils.h>
|
||||
// #include <libswscale/swscale.h>
|
||||
// #include <inttypes.h>
|
||||
import "C"
|
||||
|
||||
// AudioFrame is a data frame
|
||||
// obtained from an audio stream.
|
||||
type AudioFrame struct {
|
||||
|
20
examples/player/Dockerfile
Normal file
20
examples/player/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# Use the official Golang image as the base image
|
||||
FROM golang:1.20.5-alpine3.18 AS builder
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Install necessary packages
|
||||
RUN apk add ffmpeg
|
||||
|
||||
# Copy the Go module files
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
# Download and cache the Go module dependencies
|
||||
RUN go mod download
|
||||
|
||||
# Copy the source code into the container
|
||||
COPY . .
|
||||
|
||||
# Build the Go application
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o vidstreamsplit .
|
8
frame.go
8
frame.go
@@ -1,5 +1,13 @@
|
||||
package reisen
|
||||
|
||||
// #cgo pkg-config: libavutil libavformat libavcodec libswscale
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avutil.h>
|
||||
// #include <libavutil/imgutils.h>
|
||||
// #include <libswscale/swscale.h>
|
||||
// #include <inttypes.h>
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
@@ -1,5 +1,13 @@
|
||||
package reisen
|
||||
|
||||
// #cgo pkg-config: libavutil libavformat libavcodec libswscale
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avutil.h>
|
||||
// #include <libavutil/imgutils.h>
|
||||
// #include <libswscale/swscale.h>
|
||||
// #include <inttypes.h>
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
2
video.go
2
video.go
@@ -1,6 +1,6 @@
|
||||
package reisen
|
||||
|
||||
// #cgo pkg-config: libavutil libavformat libavformat libswscale
|
||||
// #cgo pkg-config: libavutil libavformat libavcodec libswscale
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avutil.h>
|
||||
|
@@ -1,5 +1,13 @@
|
||||
package reisen
|
||||
|
||||
// #cgo pkg-config: libavutil libavformat libavcodec libswscale
|
||||
// #include <libavcodec/avcodec.h>
|
||||
// #include <libavformat/avformat.h>
|
||||
// #include <libavutil/avutil.h>
|
||||
// #include <libavutil/imgutils.h>
|
||||
// #include <libswscale/swscale.h>
|
||||
// #include <inttypes.h>
|
||||
import "C"
|
||||
import "image"
|
||||
|
||||
// VideoFrame is a single frame
|
||||
|
Reference in New Issue
Block a user