Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
pkg-config directives added to the dependent files.
Browse files Browse the repository at this point in the history
  • Loading branch information
zergon321 committed Jul 26, 2023
1 parent 8fb0b08 commit 834b509
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 1 deletion.
9 changes: 9 additions & 0 deletions audioframe.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
20 changes: 20 additions & 0 deletions examples/player/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 8 additions & 0 deletions frame.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 8 additions & 0 deletions unknown.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion video.go
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
8 changes: 8 additions & 0 deletions videoframe.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 834b509

Please sign in to comment.