mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
just trying to compile again
This commit is contained in:
@@ -127,53 +127,75 @@ endif()
|
||||
#
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
#
|
||||
# GSTREAMER
|
||||
#
|
||||
find_package(GLIB2 REQUIRED)
|
||||
macro_log_feature(GLIB2_FOUND "GLib" "GTK general-purpose utility library" "http://www.gtk.org" TRUE)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(GSTREAMER REQUIRED gstreamer-base-1.0>=1.24
|
||||
gstreamer-pbutils-1.0
|
||||
gstreamer-app-1.0
|
||||
gstreamer-audio-1.0
|
||||
gstreamer-video-1.0
|
||||
gstreamer-gl-1.0
|
||||
)
|
||||
|
||||
find_package(GObject REQUIRED)
|
||||
macro_log_feature(GOBJECT_FOUND "GObject" "GTK object-oriented framework" "http://www.gtk.org" TRUE)
|
||||
include_directories(
|
||||
${GSTREAMER_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_package(GStreamer 1.0.0 COMPONENTS base)
|
||||
macro_log_feature(GSTREAMER_FOUND "GStreamer"
|
||||
"Open Source Multiplatform Multimedia Framework"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
link_directories(
|
||||
${GSTREAMER_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
find_package(GStreamerPluginsBase 1.0.0 COMPONENTS app audio video pbutils gl)
|
||||
macro_log_feature(GSTREAMER_APP_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer app library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
else ()
|
||||
find_package(GLIB2 REQUIRED)
|
||||
macro_log_feature(GLIB2_FOUND "GLib" "GTK general-purpose utility library" "http://www.gtk.org" TRUE)
|
||||
|
||||
macro_log_feature(GSTREAMER_AUDIO_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer audio library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
find_package(GObject REQUIRED)
|
||||
macro_log_feature(GOBJECT_FOUND "GObject" "GTK object-oriented framework" "http://www.gtk.org" TRUE)
|
||||
|
||||
macro_log_feature(GSTREAMER_VIDEO_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer video library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
find_package(GStreamer 1.0 COMPONENTS base REQUIRED)
|
||||
|
||||
macro_log_feature(GSTREAMER_PBUTILS_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer pbutils library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
find_package(GStreamerPluginsBase 1.0.0 COMPONENTS app audio video pbutils gl)
|
||||
macro_log_feature(GSTREAMER_APP_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer app library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
macro_log_feature(GSTREAMER_AUDIO_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer audio library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
macro_log_feature(GSTREAMER_VIDEO_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer video library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
macro_log_feature(GSTREAMER_PBUTILS_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer pbutils library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
macro_log_feature(GSTREAMER_GL_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer opengl library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
|
||||
include_directories(
|
||||
${GLIB2_INCLUDE_DIR}
|
||||
${GSTREAMER_INCLUDE_DIR}
|
||||
${GSTREAMER_AUDIO_INCLUDE_DIR}
|
||||
${GSTREAMER_VIDEO_INCLUDE_DIR}
|
||||
${GSTREAMER_BASE_INCLUDE_DIR}
|
||||
${GSTREAMER_APP_INCLUDE_DIR}
|
||||
${GSTREAMER_PBUTILS_INCLUDE_DIR}
|
||||
${GSTREAMER_GL_INCLUDE_DIR}
|
||||
)
|
||||
set( GSTREAMER_LIBRARIES
|
||||
${GOBJECT_LIBRARIES}
|
||||
${GSTREAMER_BASE_LIBRARY}
|
||||
${GSTREAMER_APP_LIBRARY}
|
||||
${GSTREAMER_AUDIO_LIBRARY}
|
||||
${GSTREAMER_VIDEO_LIBRARY}
|
||||
${GSTREAMER_PBUTILS_LIBRARY}
|
||||
${GSTREAMER_GL_LIBRARY}
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
macro_log_feature(GSTREAMER_GL_LIBRARY_FOUND "GStreamerPluginsBase" "GStreamer opengl library"
|
||||
"http://gstreamer.freedesktop.org/" TRUE "1.0.0")
|
||||
|
||||
# Various preprocessor definitions for GST
|
||||
add_definitions(-DGST_DISABLE_XML -DGST_DISABLE_LOADSAVE)
|
||||
|
||||
include_directories(
|
||||
${GLIB2_INCLUDE_DIR}
|
||||
${GSTREAMER_INCLUDE_DIR}
|
||||
${GSTREAMER_AUDIO_INCLUDE_DIR}
|
||||
${GSTREAMER_VIDEO_INCLUDE_DIR}
|
||||
${GSTREAMER_BASE_INCLUDE_DIR}
|
||||
${GSTREAMER_APP_INCLUDE_DIR}
|
||||
${GSTREAMER_PBUTILS_INCLUDE_DIR}
|
||||
${GSTREAMER_GL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
#
|
||||
# ICU4C
|
||||
#
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
#!/bin/bash
|
||||
# test if there is an nvidia GPU
|
||||
gpu=$(lspci | grep -i '.* vga .* nvidia .*')
|
||||
shopt -s nocasematch
|
||||
if [[ $gpu == *' nvidia '* ]]; then
|
||||
# with nvidia, request render offload
|
||||
printf 'Nvidia GPU present: %s\n' "$gpu"
|
||||
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia vimix "$@"
|
||||
|
||||
# Test if running under wayland
|
||||
if [ -z "$WAYLAND_DISPLAY" ]; then
|
||||
# not Wayland, nothing special
|
||||
vimix "$@"
|
||||
else
|
||||
# otherwise, nothing special
|
||||
printf 'GPU present: %s\n' "$gpu"
|
||||
vimix "$@"
|
||||
# Wayland: test if there is an nvidia GPU
|
||||
gpu=$(lspci | grep -i '.* vga .* nvidia .*')
|
||||
shopt -s nocasematch
|
||||
if [[ $gpu == *' nvidia '* ]]; then
|
||||
# with nvidia, request Wayland render offload
|
||||
printf 'Nvidia GPU present: %s\n' "$gpu"
|
||||
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia vimix "$@"
|
||||
else
|
||||
# otherwise, nothing special
|
||||
vimix "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -171,14 +171,7 @@ target_link_libraries(${VMIX_BINARY} LINK_PRIVATE
|
||||
${TINYXML2_LIBRARIES}
|
||||
${ICU_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
${GOBJECT_LIBRARIES}
|
||||
${GSTREAMER_LIBRARY}
|
||||
${GSTREAMER_BASE_LIBRARY}
|
||||
${GSTREAMER_APP_LIBRARY}
|
||||
${GSTREAMER_AUDIO_LIBRARY}
|
||||
${GSTREAMER_VIDEO_LIBRARY}
|
||||
${GSTREAMER_PBUTILS_LIBRARY}
|
||||
${GSTREAMER_GL_LIBRARY}
|
||||
${GSTREAMER_LIBRARIES}
|
||||
Threads::Threads
|
||||
ZLIB::ZLIB
|
||||
Ableton::Link
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GEOMETRYVIEW_H
|
||||
#define GEOMETRYVIEW_H
|
||||
|
||||
// #define ENABLE_CANVAS
|
||||
#define ENABLE_CANVAS
|
||||
|
||||
#include "View.h"
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ string GstToolkit::gst_version()
|
||||
#if GST_GL_HAVE_PLATFORM_GLX
|
||||
// https://gstreamer.freedesktop.org/documentation/nvcodec/index.html?gi-language=c#plugin-nvcodec
|
||||
// list ordered with higher priority at the end (e.g. nvidia proprietary before vaapi)
|
||||
const char *plugins[17] = { "vdpaumpegdec", "omxh264dec", "omxmpeg2dec", "omxmpeg4videodec", "vaapidecodebin",
|
||||
const char *plugins[17] = { "vdpaumpegdec", "omxh264dec", "omxmpeg2dec", "omxmpeg4videodec", "vaapidecodebin",
|
||||
"nvh264sldec", "nvh264dec", "nvh265sldec", "nvh265dec", "nvmpegvideodec", "nvmpeg2videodec", "nvmpeg4videodec",
|
||||
"nvvp8sldec", "nvvp8dec", "nvvp9sldec", "nvvp9dec", "nvav1dec"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user