Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ea65bfa
Adding windows compatibility
djthorpe Oct 7, 2026
5c4ee0a
Add temporary push trigger to test_ffmpeg workflow for WIP branch
djthorpe Oct 7, 2026
5cebfe6
Fix ubuntu-latest ffmpeg configure: install liblzma-dev etc. to match…
djthorpe Oct 7, 2026
d8b91d0
Also build libraw for test-ffmpeg: reader needs it transitively
djthorpe Oct 7, 2026
9523512
Rename workflow to test.yaml, since it will grow to cover all tests
djthorpe Oct 7, 2026
5392dbe
Rename workflow display name to "Test"
djthorpe Oct 7, 2026
a4340e2
Declare real build prerequisites on each test-* Makefile target
djthorpe Oct 7, 2026
72f0793
Drop Go 1.25 from merge test matrix, minimum is now 1.26
djthorpe Oct 7, 2026
b8f6d03
Add dependabot.yml, grouping noisy otel/grpc module updates
djthorpe Oct 7, 2026
f6528c7
Skip Test_avdevice_device_info_string when the first device is nil
djthorpe Oct 7, 2026
b325623
Drop sys/ffmpeg61 and sys/ffmpeg71, fix allocator mismatch in sys/ffm…
djthorpe Oct 7, 2026
100dff9
Expand CI matrix from make test-ffmpeg to the full make test
djthorpe Oct 7, 2026
20f205f
Add -lws2_32 to libraw.pc on Windows, fixing undefined __imp_htonl
djthorpe Oct 7, 2026
37dccde
Fix chromaprint build on generator-agnostic cmake, add HEIF decoder libs
djthorpe Oct 7, 2026
a4002c0
Install Docker on macOS/Windows runners for profile/manager's tests
djthorpe Oct 7, 2026
84cb08b
Make libraw.pc patching robust to upstream Libs: line format
djthorpe Oct 7, 2026
c3bcee9
Use native Postgres instead of Docker testcontainers on macOS/Windows CI
djthorpe Oct 7, 2026
4dd4ecb
Added go 1.27 for tests
djthorpe Oct 7, 2026
3442d95
ContentType: return immediately for curated extensions, skip the read
djthorpe Oct 7, 2026
66245fd
Fix the real reason -lws2_32 never applied: OS=Windows_NT env collision
djthorpe Oct 7, 2026
1418fc0
Fix encoder not handling EAGAIN from avcodec_send_frame
djthorpe Oct 7, 2026
cd38f41
Fix IsErrno comparing against a numeric value with no C-side meaning
djthorpe Oct 7, 2026
161fb7a
Bump actions/cache to v6, which natively targets node24
djthorpe Oct 7, 2026
094b3d9
writer.Create: use url.Path directly for local files, not url.String()
djthorpe Oct 7, 2026
d044571
Fix reader file handle leak: AVFormat_free_context vs close_input
djthorpe Oct 7, 2026
3765b6f
Define CHROMAPRINT_NODLL, fixing undefined __imp_chromaprint_* on Win…
djthorpe Oct 7, 2026
fbb325b
Disable NLS in libexif, fixing undefined libintl_* on Windows
djthorpe Oct 7, 2026
99c31a0
Fix flaky TestManager_StartCompletes: guarantee measurable duration
djthorpe Oct 7, 2026
8d258a3
Fix the same AVFormat_free_context leak in three more test helpers
djthorpe Oct 7, 2026
40c0cf4
Remove redundant -lstdc++ cgo directive; fix gomedia/task duration flake
djthorpe Oct 7, 2026
e9f25d6
Group-wrap -lchromaprint/-lstdc++ for GNU ld, retry at the libstdc++ bug
djthorpe Oct 7, 2026
e77feef
Fix TestProbeSource_File: build a real file:// URL, not string-pasted
djthorpe Oct 7, 2026
0957d57
Normalize RFC 8089 file:// URLs for FFmpeg's unusual protocol parsing
djthorpe Oct 8, 2026
e647a1a
Fixed style
djthorpe Oct 8, 2026
e691a67
Promote test.yaml to the real CI gate, retire on_pull_request_merge.yaml
djthorpe Oct 8, 2026
a89d57f
Add docker.yaml with a Windows image, mirroring go-omodie's docker.yml
djthorpe Oct 8, 2026
b777e4e
Remove Docker mechanics from the Makefile
djthorpe Oct 8, 2026
a13fdca
Address Copilot PR review: UNC paths, .jpg sniffing, run concurrency
djthorpe Oct 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This Go module provides CGO bindings to several media C libraries, layered consistently:

1. **sys/\*** - low-level CGO bindings, mirroring each C library's API 1:1
- `sys/ffmpeg80/` (default), plus `sys/ffmpeg71/`, `sys/ffmpeg61/` - FFmpeg bindings, selected via `SYS_VERSION` in the Makefile
- `sys/ffmpeg80/` - FFmpeg bindings, selected via `SYS_VERSION` in the Makefile
- `sys/libheif/`, `sys/libraw/`, `sys/libexif/`, `sys/chromaprint/`, `sys/dvb/`
2. **pkg/\*** - high-level, idiomatic Go APIs per library
- `pkg/ffmpeg/` - Reader, Decoder, Encoder, Resampler, Frame abstractions
Expand Down
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2
updates:
# Go modules, checked monthly. OpenTelemetry and gRPC both release updates
# across many modules at once, so each is grouped into a single pull request.
- package-ecosystem: gomod
directory: /
schedule:
interval: monthly
groups:
opentelemetry:
patterns:
- "go.opentelemetry.io/*"
grpc:
patterns:
- "google.golang.org/grpc*"
- "github.com/grpc-ecosystem/*"

# Actions used by the workflows, checked monthly in a single pull request
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
github-actions:
patterns:
- "*"
185 changes: 185 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
name: Docker

on:
release:
types: [published, edited]
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
linux:
name: Build Linux ${{ matrix.arch }} image
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate image tags and labels
id: metadata
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository_owner }}/gomedia
tags: |
type=ref,event=branch,suffix=-linux-${{ matrix.arch }}
type=ref,event=tag,suffix=-linux-${{ matrix.arch }}

- name: Build and publish Linux image
uses: docker/build-push-action@v7
with:
context: .
file: etc/docker/Dockerfile.linux
platforms: linux/${{ matrix.arch }}
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
OS=linux
ARCH=${{ matrix.arch }}
SOURCE=${{ github.server_url }}/${{ github.repository }}

windows:
name: Build Windows image
runs-on: windows-2022
steps:
- name: Configure git line endings
shell: bash
run: git config --global core.autocrlf input

- name: Checkout
uses: actions/checkout@v5

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26.x"

- name: Cache build directory
uses: actions/cache@v6
with:
path: build
key: Windows-docker-build-${{ hashFiles('Makefile') }}
restore-keys: |
Windows-docker-build-

- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
# 'inherit' keeps the Go toolchain (installed above by
# actions/setup-go, outside MSYS2) visible inside the msys2 shell
# alongside gcc/make/pkg-config - see test.yaml for the same setup.
path-type: inherit
install: >-
base-devel
make
curl
diffutils
nasm
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-zlib
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libde265
mingw-w64-x86_64-aom
mingw-w64-x86_64-dav1d

- name: Build gomedia.exe
shell: msys2 {0}
# The cmd target doesn't itself depend on the library-build targets
# (it only checks for them via pkg-config to set feature tags), so
# they're built explicitly first - see the same note on test.yaml.
# gomedia.exe links libstdc++/libgcc/libwinpthread dynamically (this
# project's own libraries are static, but MinGW's own C++/threading
# runtime isn't), so those three DLLs are copied alongside it for
# Dockerfile.windows to package together.
run: |
make ffmpeg chromaprint libexif libraw libheif
make cmd
cp "$MINGW_PREFIX"/bin/libstdc++-6.dll "$MINGW_PREFIX"/bin/libgcc_s_seh-1.dll "$MINGW_PREFIX"/bin/libwinpthread-1.dll build/

- name: Verify Windows container engine
shell: pwsh
run: |
$containerOS = docker info --format '{{.OSType}}'
if ($containerOS -ne 'windows') {
throw "Expected a Windows container engine, got '$containerOS'."
}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and publish Windows image
shell: pwsh
run: |
$repository = "ghcr.io/$($env:GITHUB_REPOSITORY_OWNER)/gomedia".ToLowerInvariant()
$source = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY"
$refTag = $env:GITHUB_REF_NAME -replace '[^A-Za-z0-9_.-]', '-'
$imageTag = "${repository}:${refTag}-windows-ltsc2022"

$buildArgs = @('build', '--file', 'etc/docker/Dockerfile.windows', '--build-arg', "SOURCE=$source")
$buildArgs += @('--tag', $imageTag)
$buildArgs += '.'
docker @buildArgs
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
docker push $imageTag
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

manifest:
name: Publish multi-platform latest tag
needs: [linux, windows]
runs-on: ubuntu-24.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create release and latest manifests
shell: bash
env:
IMAGE_OWNER: ${{ github.repository_owner }}
REF_NAME: ${{ github.ref_name }}
run: |
image="ghcr.io/${IMAGE_OWNER,,}/gomedia"
ref_tag="${REF_NAME//[^A-Za-z0-9_.-]/-}"
docker buildx imagetools create \
--tag "$image:latest" \
--tag "$image:$ref_tag" \
"$image:$ref_tag-linux-amd64" \
"$image:$ref_tag-linux-arm64" \
"$image:$ref_tag-windows-ltsc2022"
81 changes: 0 additions & 81 deletions .github/workflows/on_publish.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/on_pull_request_merge.yaml

This file was deleted.

Loading
Loading