Hello
I’m using core18. My snap app is using GStreamer 1.16.2 and gtkmm 3.22.2. There is a GStreamer plugin named gtkglgink
(https://thiblahute.github.io/GStreamer-doc/gtk-1.0/gtkglsink.html) which is using OpenGL to render video frames on the GTK+ OpenGL widget.
Everything worked fine before upgrading the host system (during upgrade some mesa
packages were updated from 19.2.8-0
to 20.0.8-0
). After that, my app in a snap stopped working correctly. It gives me an error Failed to initialize OpenGL with Gtk
which is reported by GStreamer plugin gtkglsink
. If I run the same binary outside snap environment (on my host machine) everything works while in a snap it doesn’t.
That’s weird because I didn’t touch anything neither in the app code nor in snapcraft.yaml
. The previously built snap app just stopped working due to external upgrades!
Am I missing something? Maybe the opengl
interface has been broken or something else?
My snapcraft.yaml:
name: gst-test
base: core18
version: '1.0'
summary: GStreamer OpenGL Snap
description: Testing GStreamer 1.16.2 OpenGL GTK+ plugin in snap environment
grade: stable
confinement: strict
architectures:
- build-on: amd64
apps:
gst-test:
command: snap_run.sh $SNAP/usr/bin/gst-launch-1.0
plugs: [opengl]
extensions: [gnome-3-28]
parts:
base:
plugin: nil
build-packages:
- software-properties-common
g++-8: # Ubuntu 18.04 has outdated gcc so we have to install it from PPA
plugin: nil
override-pull: |
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y g++-8
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90
after: [base]
gstreamer:
override-pull: |
snapcraftctl pull
git checkout 1.16.2
source: https://github.com/GStreamer/gstreamer.git
plugin: autotools
configflags: ['--prefix=/usr', '--disable-gtk-doc']
build-packages:
- bison
- flex
- gettext
- liborc-0.4-dev
- libpulse-dev
- libxv-dev
- libtag1-dev
- libwavpack-dev
- libgl1-mesa-dev
- libglu1-mesa-dev
- libglew-dev
stage-packages:
- liborc-0.4-dev
- libasound2-dev
- libjpeg-dev
- libvpx-dev
- libvorbis-dev
- libogg-dev
- libpulse-dev
- libpulse0
- libwavpack-dev
- libtag1v5
- libopus-dev
- libtheora-dev
- libxv-dev
- libxdamage-dev
- libcdparanoia-dev
- libgl1-mesa-glx
- libglu1-mesa
- libglew2.0
prime:
- usr
after: [g++-8]
gst-plugins-base:
override-pull: |
snapcraftctl pull
git checkout 1.16.2
source: https://github.com/GStreamer/gst-plugins-base.git
plugin: autotools
configflags: ['--prefix=/usr', '--disable-gtk-doc']
build-packages:
- liborc-0.4-dev
- libfribidi-dev
- libpulse-dev
stage-packages:
- libdatrie1
- libegl1
- libgraphite2-3
- libharfbuzz0b
- libpango-1.0-0
- libpangocairo-1.0-0
- libpangoft2-1.0-0
- libthai0
prime:
- usr
after: [gstreamer]
gst-libav:
override-pull: |
snapcraftctl pull
git checkout 1.16.2
source: https://github.com/GStreamer/gst-libav.git
plugin: autotools
configflags: ['--prefix=/usr', '--disable-gtk-doc']
build-packages:
- yasm
- liborc-0.4-dev
- libpulse-dev
- libva-dev
stage-packages:
- libpulse0
prime:
- usr
after: [gst-plugins-base]
gst-plugins-good:
override-pull: |
snapcraftctl pull
git checkout 1.16.2
source: https://github.com/GStreamer/gst-plugins-good.git
plugin: autotools
configflags: ['--prefix=/usr', '--disable-gtk-doc']
build-packages:
- liborc-0.4-dev
- libpulse-dev
stage-packages:
- libpulse0
- libatk-bridge2.0-0
- libatk1.0-0
- libatspi2.0-0
- libcairo-gobject2
- libdatrie1
- libegl1
- libepoxy0
- libgdk-pixbuf2.0-0
- libgraphite2-3
- libgtk-3-0
- libharfbuzz0b
- libpango-1.0-0
- libpangocairo-1.0-0
- libpangoft2-1.0-0
- libsoup2.4-1
- libthai0
- libwayland-client0
- libwayland-cursor0
- libwayland-egl1
- libxcomposite1
- libxcursor1
- libxi6
- libxinerama1
- libxkbcommon0
- libxml2
- libxrandr2
prime:
- usr
after: [gst-libav]
script:
source: script
plugin: dump
prime:
- snap_run.sh
after: [gst-plugins-good]