mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-04 23:52:55 +08:00
use decodbin as an example of the gerr interface
This commit is contained in:
@@ -137,7 +137,11 @@ func runPipeline(loop *gst.MainLoop, pipeline *gst.Pipeline) error {
|
|||||||
case gst.MessageEOS:
|
case gst.MessageEOS:
|
||||||
err = errors.New("end-of-stream")
|
err = errors.New("end-of-stream")
|
||||||
case gst.MessageError:
|
case gst.MessageError:
|
||||||
err = msg.ParseError()
|
// The parsed error implements the error interface, but also
|
||||||
|
// contains additional debug information.
|
||||||
|
gerr := msg.ParseError()
|
||||||
|
fmt.Println("go-gst-debug:", gerr.DebugString())
|
||||||
|
err = gerr
|
||||||
}
|
}
|
||||||
|
|
||||||
// If either condition triggered an error, log and quit
|
// If either condition triggered an error, log and quit
|
||||||
|
Reference in New Issue
Block a user