Skip to content

Commit

Permalink
Merge pull request #35 from nimbleape/fix-arm64-element-error
Browse files Browse the repository at this point in the history
fix one issue with building on arm64
  • Loading branch information
notedit authored Aug 9, 2022
2 parents 48ea21a + 935a7eb commit 17f84e2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ func (b *Bus) Pop() (message *Message) {
}

func (b *Bus) PopTimed() (message *Message, err error) {
CGstMessage := C.gst_bus_timed_pop(b.C, C.GST_CLOCK_TIME_NONE)
var timeNone int64 = C.GST_CLOCK_TIME_NONE

CGstMessage := C.gst_bus_timed_pop(b.C, C.ulonglong(timeNone))
if CGstMessage == nil {
// Timeout hit, no message
err = fmt.Errorf("no message in bus")
Expand Down
13 changes: 13 additions & 0 deletions element_arm64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package gst

/*
#cgo pkg-config: gstreamer-1.0 gstreamer-app-1.0
#include "gst.h"
*/
import "C"
import "time"

func (e *Element) Seek(duration time.Duration) bool {
result := C.gst_element_seek_simple(e.GstElement, C.GST_FORMAT_TIME, C.GST_SEEK_FLAG_FLUSH, C.longlong(duration.Nanoseconds()))
return result == C.TRUE
}
3 changes: 2 additions & 1 deletion element_other.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build !arm
//go:build !arm && !arm64
// +build !arm,!arm64

package gst

Expand Down

0 comments on commit 17f84e2

Please sign in to comment.