commit custom events the way it should look

This commit is contained in:
tinyzimmer
2020-10-05 09:47:59 +03:00
parent a6efc0bfe3
commit 121a651b7f

View File

@@ -58,7 +58,7 @@ func createPipeline() (*gst.Pipeline, error) {
fmt.Printf("Received custom event with count=%d send_eos=%v\n", customEvent.Count, customEvent.SendEOS)
if customEvent.SendEOS {
fmt.Println("Send EOS is true, sending eos")
if !pipeline.GetPipelineBus().Post(gst.NewEOSMessage(self)) {
if !pipeline.SendEvent(gst.NewEOSEvent()) {
fmt.Println("WARNING: Failed to send EOS to pipeline")
}
} else {