mirror of
https://github.com/go-gst/go-gst.git
synced 2025-09-26 20:11:18 +08:00
change github action to build all packages
* fix issues * add build script to build all packages locally
This commit is contained in:
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@@ -9,20 +9,23 @@ jobs:
|
||||
matrix:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, 'macos-latest']
|
||||
os: [ubuntu-latest, windows-latest, "macos-latest"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup GStreamer
|
||||
id: setup_gstreamer
|
||||
id: setup_gstreamer
|
||||
uses: blinemedical/setup-gstreamer@45324555100927b587d390d8cf3940f91fd3bdc9
|
||||
with:
|
||||
version: 1.22.0
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '^1.21.0'
|
||||
go-version: "^1.21.0"
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: build the appsink
|
||||
run: cd examples/appsink && go build -x .
|
||||
|
||||
|
||||
- name: build
|
||||
shell: bash
|
||||
run: |
|
||||
packages=$(go list ./...)
|
||||
for package in $packages; do
|
||||
go build $package || exit 1
|
||||
done
|
||||
|
8
buildAll.sh
Executable file
8
buildAll.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# this script builds all go packages in the current directory
|
||||
|
||||
packages=$(go list ./...)
|
||||
for package in $packages; do
|
||||
go build -o /dev/null "$package" || exit 1
|
||||
done
|
@@ -30,7 +30,7 @@ func main() {
|
||||
|
||||
uri := os.Args[1]
|
||||
|
||||
discoverer, err := pbutils.NewDiscoverer(time.Second * 15)
|
||||
discoverer, err := pbutils.NewDiscoverer(gst.ClockTime(time.Second * 15))
|
||||
if err != nil {
|
||||
fmt.Println("ERROR:", err)
|
||||
os.Exit(2)
|
||||
|
@@ -13,11 +13,11 @@ import (
|
||||
)
|
||||
|
||||
// AudioMeta is a Go representation of a GstAudioMeta.
|
||||
type AudioMeta struct{ *Object }
|
||||
type AudioMeta struct{ *glib.Object }
|
||||
|
||||
// FromGstAudioMetaUnsafeNone wraps the given audioMeta with a ref and finalizer.
|
||||
func FromGstAudioMetaUnsafeNone(audioMeta unsafe.Pointer) *AudioMeta {
|
||||
return &AudioMeta{wrapObject(glib.TransferNone(audioMeta))}
|
||||
return &AudioMeta{glib.TransferNone(audioMeta)}
|
||||
}
|
||||
|
||||
func BufferAddAudioMeta(buffer *gst.Buffer, info *Info, samples int, offsets []int) *AudioMeta {
|
||||
@@ -34,6 +34,6 @@ func BufferAddAudioMeta(buffer *gst.Buffer, info *Info, samples int, offsets []i
|
||||
(*C.GstBuffer)(unsafe.Pointer(buffer.Instance())),
|
||||
info.ptr,
|
||||
C.gsize(samples),
|
||||
offsets,
|
||||
nil,
|
||||
)))
|
||||
}
|
||||
|
@@ -6,7 +6,6 @@ package pbutils
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/go-gst/go-glib/glib"
|
||||
|
@@ -9,7 +9,6 @@ import "C"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/go-gst/go-gst/gst"
|
||||
|
@@ -19,7 +19,6 @@ void cgoVideoConvertSampleCb (GstSample * sample, GError * gerr, gpointer user_d
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/go-gst/go-gst/gst"
|
||||
|
Reference in New Issue
Block a user