From f81bdfb29e2747c39c982a9f4cbbdaa830c2560a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 22 Mar 2022 00:29:20 +0100 Subject: Use /usr/lib64 instead of /usr/lib, which makes it compatible with gentoo --- README.md | 2 +- build.sh | 2 +- src/sound.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1f8ad7..5700257 100644 --- a/README.md +++ b/README.md @@ -38,4 +38,4 @@ FFMPEG only uses the GPU with CUDA when doing transcoding from an input video to libraries at compile-time. * Clean up the code! * Fix segfault in debug mode (happens because audio codec becomes NULL?) -* Dynamically change bitrate to match desired fps. This would be helpful when streaming for example, where the encode output speed also depends on upload speed to the stream service. +* Dynamically change bitrate/resolution to match desired fps. This would be helpful when streaming for example, where the encode output speed also depends on upload speed to the streaming service. diff --git a/build.sh b/build.sh index ee1e9b3..9bdaf16 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ dependencies="glew libavcodec libavformat libavutil x11 xcomposite glfw3 libpulse-simple libswresample" includes="$(pkg-config --cflags $dependencies) -I/opt/cuda/targets/x86_64-linux/include" -libs="$(pkg-config --libs $dependencies) /usr/lib/libcuda.so -ldl -pthread -lm" +libs="$(pkg-config --libs $dependencies) /usr/lib64/libcuda.so -ldl -pthread -lm" g++ -c src/sound.cpp -O2 $includes -DPULSEAUDIO=1 g++ -c src/main.cpp -O2 $includes -DPULSEAUDIO=1 g++ -o gpu-screen-recorder -O2 sound.o main.o -s $libs diff --git a/src/sound.cpp b/src/sound.cpp index 59f5972..779aa87 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -33,7 +33,7 @@ int sound_device_get_by_name(SoundDevice *device, const char *name, unsigned int pa_simple *pa_handle = pa_simple_new(nullptr, "gpu-screen-recorder", PA_STREAM_RECORD, name, "record", &ss, nullptr, nullptr, &error); if(!pa_handle) { - fprintf(stderr, "pa_simple_new() failed: %s\n", pa_strerror(error)); + fprintf(stderr, "pa_simple_new() failed: %s. Audio input device %s might not be valid\n", pa_strerror(error), name); return -1; } -- cgit v1.2.3