jam at tigger.ws
Tue Mar 30 06:22:09 UTC 2021
> On 29 Mar 2021, at 10:50 pm, gotsring <gotsring at live.com> wrote:
> gst-launch is good for testing pipelines, but it lacks the ability to do any
> monitoring, live changes, error-handling, etc. Building pipelines in code
> takes getting used to, but it allows much more flexibility and robustness.
> For basic pipelines, you can use gst_parse_launch to run a pipeline similar
> to how you would use gst-launch
> For example, a simple pipeline with a tee can be started from the shell
> gst-launch-1.0 videotestsrc ! tee name=t \
> t. ! queue ! videoconvert ! autovideosink \
> t. ! queue ! videoconvert ! autovideosink
> or in C code using gst_parse_launch:
> GError* err = NULL;
> GstElement* pipeline = gst_parse_launch(
> "videotestsrc ! tee name=t "
> "t. ! queue ! videoconvert ! autovideosink "
> "t. ! queue ! videoconvert ! autovideosink"
> , &err);
> gst_element_set_state(pipeline, GST_STATE_PLAYING); // Play it
> You can swap out my test pipeline for whatever you want.
> Not quite sure what you're trying to do in terms of a GUI, but maybe use
> GTK? Check out basic tutorial 5:
OK perhaps a different track:
I compiled basic_tutorial12.c
The executable runs, pretty picture etc
pipeline = gst_parse_launch ("playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm", NULL);
pipeline = gst_parse_launch ("v4l2src device=argv ! tee name=t "
"t. ! queue ! videoscale ! video/x-raw,width=768,height=576 ! "
"videoconvert ! xvimagesink force-aspect-ratio=false "
" t. ! queue ! videoscale ! video/x-raw,width=768,height=576 ! "
"videoconvert ! xvimagesink force-aspect-ratio=false", NULL);
Now running gives me
Unable to set the pipeline to the playing state.
My 'get_parse_lauch' is wrong. Why? Where?
More information about the gstreamer-devel