newby help
Michiel Konstapel
michiel at aanmelder.nl
Tue Mar 30 07:32:53 UTC 2021
On 30-03-2021 08:22, James wrote:
> OK perhaps a different track:
> I compiled basic_tutorial12.c
> The executable runs, pretty picture etc
>
> I changed
>
> pipeline = gst_parse_launch ("playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm", NULL);
>
> for
> pipeline = gst_parse_launch ("v4l2src device=argv[1] ! 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?
>
> Thanks
> James
Do you literally have "v4l2src device=argv[1]" in there? That's not
going to work :)
If it's C, you'll have to use something like snprintf() to put the
argument into the parse_launch string. My C is quite rusty, but
something like
char cmdline[1024];
snprintf(
cmdline, 1024,
"v4l2src device=%s ! 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",
argv[1]
);
pipeline = gst_parse_launch(cmdline, NULL);
HTH,
Michiel
More information about the gstreamer-devel
mailing list