Add required dependencies to Builder project

My Gtk4 video player prototype is now running in Builder, but it’s obviously missing the required dependencies, the same thing happened before and was solved by the installation of a system package ; But now I have to import / include the right files in my project, what is the correct way to do this?

The package in question is this one:

# dpkg -L libgtk-4-media-gstreamer
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/gtk-4.0
/usr/lib/x86_64-linux-gnu/gtk-4.0/4.0.0
/usr/lib/x86_64-linux-gnu/gtk-4.0/4.0.0/media
/usr/lib/x86_64-linux-gnu/gtk-4.0/4.0.0/media/libmedia-gstreamer.so
/usr/share
/usr/share/doc
/usr/share/doc/libgtk-4-media-gstreamer
/usr/share/doc/libgtk-4-media-gstreamer/copyright
/usr/share/doc/libgtk-4-media-gstreamer/changelog.Debian.gz

Is there a corresponding package that I could then require in the Flatpak manifest?

I tried to search for a corresponding Flatpak (or even pip) package, but no luck. Shouldn’t this gstreamer dependency be in the runtime / SDK?

PS - I have been posting quite a lot recently - I’m teaching myself Gnome application development - thank you for not hesitating to let me know if I’m out of line in any way, and for your patience & guidance altogether :slight_smile:

I’m not sure what you mean that it builds, but is missing a dependency. The library libmedia-gstreamer.so is a part of GTK4 (see here: https://pkgs.org/search/?q=libmedia-gstreamer.so), which should be included in the org.gnome.Platform runtime. Otherwise it should get pulled in by the gtk4 package in your distribution.

In the appropriate meson.build file you’ll want to have something this, of course:

gtk_dep = dependency('gtk4', version: '>= 4.6.0')

which you pass to executable() or whatever.

1 Like

I’m not sure what you mean that it builds, but is missing a dependency

You’re right, I made this assumption a bit too quickly. The reason I said this is that it display the same symptoms as before, but it’s clearly not a serious diagnosis.

In the appropriate meson.build file you’ll want to have something this, of course:

gtk_dep = dependency('gtk4', version: '>= 4.6.0')

This I just did, but this:

which you pass to executable() or whatever.

Is a bit unclear to me, could you mean the app = MatineeApplication() entry point of my app? Thanks a lot for your help.

Mmm, what exactly is the problem you’re facing? It seemed like you were asking a question about dependencies, but now I think I see python code? :slightly_smiling_face:

Mmm, what exactly is the problem you’re facing? It seemed like you were asking a question about dependencies, but now I think I see python code? :slightly_smiling_face:

I hear you, I have a hard time myself figuring out where this dependency fits, given that my code knows nothing about it, I’m not requiring it or anything ; I only know that my test script works (outside of Builder) but that my Builder project exhibits the same symptoms than my test script before the installation of the lib : A proper video widget, but with a minus sign in it…? BTW my dirty code is here.

I don’t see your code, just a 404

? I had just changed the link to point to the right file / line #, maybe you clicked right at that time ? Sorry about that, please try again.

This is what I see, I would guess you’ve marked the repository private or something.

1 Like

Aaarg I’m really sorry about that, yes, the repo was private, it’s open now, really sorry :confused:

Okay, so what is the problem you’re seeing?

Okay, so what is the problem you’re seeing?

In fact, it seems that I can’t really access the video file that I’m passing to the video widget ; I just ran os.path.exists(file) and it returns false (when it does exist) so could this be a sandboxing issue?

I found what the problem is (it is sandboxing in fact) my test file is in /tmp and apparently this is not OK, which I can totally understand. Now my video plays (but I have no sound…? Hum) please excuse this whole thing, thank you for your help & good night :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.