gstreamer and ubuntu, NULL returned from getting xcontext

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gstreamer and ubuntu, NULL returned from getting xcontext

Davide Perini
Hi guys,
I installed gstreamer in Ubuntu 20.04 as mentioned in the official site:

apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio


when I try to screen capture:
gst-launch-1.0 ximagesrc ! videoscale ! autovideosink

I get an error.

---
root@sblantipodi-Virtual-Machine:~# gst-launch-1.0 ximagesrc ! videoscale ! autovideosink
Setting pipeline to PAUSED ...
error: XDG_RUNTIME_DIR not set in the environment.
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0: Could not open X display for reading
Additional debug info:
gstximagesrc.c(158): gst_ximage_src_open_display (): /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0:
NULL returned from getting xcontext
Setting pipeline to NULL ...
Freeing pipeline ...
---

Can you help me please?
Same command works well on Fedora.

Thank you!

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer and ubuntu, NULL returned from getting xcontext

Davide Perini
Solved it.
I was launching gstreamer as root when I have started gnome as user.

Thanks


Il 23/08/2020 01.26, Davide Perini ha scritto:
Hi guys,
I installed gstreamer in Ubuntu 20.04 as mentioned in the official site:

apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio


when I try to screen capture:
gst-launch-1.0 ximagesrc ! videoscale ! autovideosink

I get an error.

---
root@sblantipodi-Virtual-Machine:~# gst-launch-1.0 ximagesrc ! videoscale ! autovideosink
Setting pipeline to PAUSED ...
error: XDG_RUNTIME_DIR not set in the environment.
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0: Could not open X display for reading
Additional debug info:
gstximagesrc.c(158): gst_ximage_src_open_display (): /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0:
NULL returned from getting xcontext
Setting pipeline to NULL ...
Freeing pipeline ...
---

Can you help me please?
Same command works well on Fedora.

Thank you!

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel