go-gst
go-gst copied to clipboard
error: "Given string is too short for a pipeline" when trying gstreamer basic example 1
When I tried to get the Basic tutorial 1: Hello World example to run, I get the following error message:
Given string is too short for a pipeline: playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
The example can be found here: https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c
I guess the reason is that the string is always expected to include an exclamation mark ?
if len(strings.Split(launchv, "!")) < 2 {
return nil, fmt.Errorf("Given string is too short for a pipeline: %s", launchv)
}
The string given to the launch command is: "playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"
I agree with you that the line of code you mentioned is unnecessary part.
I think gst_parse_launch()
has no restriction on its parameter, pipeline_description
so it would be enough let go-gst do samething.
If you raise PR then I can review/merge it.
https://gstreamer.freedesktop.org/documentation/gstreamer/gstparse.html?gi-language=c#gst_parse_launch