mirror of
https://github.com/notedit/gst.git
synced 2025-09-26 20:21:12 +08:00
fix gstreamer 1.20 build
This commit is contained in:
@@ -21,6 +21,10 @@ brew install gst-plugins-base
|
||||
brew install gst-plugins-good
|
||||
brew install gst-plugins-bad
|
||||
brew install gst-plugins-ugly
|
||||
|
||||
|
||||
// set GST_PLUGIN_PATH
|
||||
export GST_PLUGIN_PATH=/opt/homebrew/lib/gstreamer-1.0/
|
||||
```
|
||||
|
||||
Then
|
||||
@@ -31,6 +35,8 @@ go get github.com/notedit/gst
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
https://github.com/notedit/gst-go-demo
|
||||
|
@@ -3,6 +3,11 @@ package gst
|
||||
/*
|
||||
#cgo pkg-config: gstreamer-1.0
|
||||
#include "gst.h"
|
||||
|
||||
|
||||
const char* ErrorMessage(GError *err) {
|
||||
return err->message;
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
|
||||
@@ -26,7 +31,7 @@ func ParseLaunch(pipelineStr string) (p *Pipeline, err error) {
|
||||
gstElt := C.gst_parse_launch(pDesc, &gError)
|
||||
|
||||
if gError != nil {
|
||||
err = errors.New("create pipeline error")
|
||||
err = errors.New(C.GoString(C.ErrorMessage(gError)))
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user