Detecting shmdata library and gst plugin

Find shmdata library and add it to gstreamer plugin path. User is informed on how to build shmdata.
This commit is contained in:
Bruno Herbelin
2022-12-03 18:00:58 +01:00
parent 69fa3521f9
commit 8af740caa8
4 changed files with 114 additions and 8 deletions

View File

@@ -288,6 +288,31 @@ if(WIN32)
message(STATUS "Including 'Dirent' from https://github.com/tronkko/dirent -- ${DIRENT_INCLUDE_DIR}.")
endif()
#
# SHMDATA (Unix only)
#
if(UNIX)
if (PKG_CONFIG_FOUND)
pkg_check_modules(SHMDATA QUIET shmdata-1.3)
endif()
if(SHMDATA_FOUND)
find_library(GSTREAMER_SHMDATA_LIBRARY
NAMES gstshmdata
HINTS ${SHMDATA_LIBRARY_DIRS}/gstreamer-1.0
)
if(GSTREAMER_SHMDATA_LIBRARY)
add_definitions(-DGSTREAMER_SHMDATA_PLUGIN=\"${GSTREAMER_SHMDATA_LIBRARY}\")
endif()
macro_log_feature(GSTREAMER_SHMDATA_LIBRARY "GStreamerPluginShmdata" "Plugin to share any flow" "https://gitlab.com/sat-mtl/tools/shmdata" FALSE)
endif(SHMDATA_FOUND)
endif(UNIX)
# show message about found libs
macro_display_feature_log()

View File

@@ -27,7 +27,7 @@ Download and install a release package from https://snapcraft.io/vimix
$ snap install vimix
NB: You'll need to setup the snap permissions.
NB: You might need to setup the snap permissions.
### Mac OSX
@@ -79,6 +79,7 @@ Optionnal:
- stb
- TinyXML2
- AbletonLink
- Shmdata
#### Install Dependencies
@@ -89,6 +90,9 @@ Optionnal:
Optionnal:
$ apt-get install libglm-dev libstb-dev libtinyxml2-dev ableton-link-dev
Follow the instructions to [install Shmdata](https://gitlab.com/sat-mtl/tools/shmdata).
**OSX with Brew**
@@ -101,10 +105,20 @@ To generate the snap (from vimix directory):
$ snapcraft
To install the locally created snap:
To install and test the locally created snap:
$ snap install --dangerous vimix_0.5_amd64.snap
#### Generate flatpak
To generate and install the flatpack:
$ flatpak-builder --user --install --force-clean build ##PATH_TO_VIMIX##/flatpak/io.github.brunoherbelin.Vimix.json
To run the installed flatpak:
$ flatpak run io.github.brunoherbelin.Vimix
### Memcheck
To generate memory usage plots in [massif format](https://valgrind.org/docs/manual/ms-manual.html):

View File

@@ -1,10 +1,10 @@
Prepare and install flatpak
** Prepare and install flatpak
~$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
~$ flatpak install org.gnome.Sdk/x86_64
~$ flatpak install org.gnome.Platform
build vimix
** build vimix flatpak
~$ cd vimix/flatpak
~$ flatpak-builder --user --install --force-clean build io.github.brunoherbelin.Vimix.json
@@ -13,6 +13,69 @@ NB: might need to run this to enable local git clone during build
~$ git config --global --add protocol.file.allow always
run vimix
run vimix flatpak
~$ flatpak run io.github.brunoherbelin.Vimix
uninstall vimix
~$ flatpak uninstall vimix
** Change io.github.brunoherbelin.Vimix.json
"finish-args": [
"--socket=wayland",
"--socket=fallback-x11",
"--share=ipc",
"--share=network",
"--device=shm",
"--device=all",
"--device=dri",
"--filesystem=host",
"--filesystem=/tmp",
"--talk-name=org.gtk.vfs.*",
"--env=FREI0R_PATH=/app/lib/frei0r-1"
],
"cleanup": [
"/include",
"/share/gdb",
"/share/info",
"/share/man",
"/lib/debug"
],
compile vimix with code from local folder (debug)
{
"name": "vimix",
"buildsystem": "cmake",
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release"
],
"sources": [
{
"type":"dir",
"path": "/home/bhbn/Development/vimix",
}
]
}
for packaging
{
"name": "vimix",
"buildsystem": "cmake",
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release"
],
"sources": [
{
"type": "git",
"url": "https://github.com/brunoherbelin/vimix.git",
"tag": "0.7.2"
}
]
}

View File

@@ -7,18 +7,22 @@
"finish-args": [
"--socket=wayland",
"--socket=fallback-x11",
"--socket=pulseaudio",
"--share=ipc",
"--share=network",
"--device=all",
"--device=dri",
"--device=shm",
"--device=all",
"--filesystem=host",
"--filesystem=/tmp",
"--talk-name=org.gtk.vfs.*",
"--env=FREI0R_PATH=/app/lib/frei0r-1"
],
"cleanup": [
"/include",
"/share/gdb",
"/share/info",
"/share/man"
"/share/man",
"/lib/debug"
],
"modules": [
{