I used -a pulse and -a pipewire, but for stereo only.
Run the mpv without vdr and tell me what parameters it works with (without systemctl).
I used -a pulse and -a pipewire, but for stereo only.
Run the mpv without vdr and tell me what parameters it works with (without systemctl).
without any ao device:
mpv --vo=gpu --hwdec=cuda --hwdec-codecs=all enticement-13.hours.bd.1080p.mkv
(+) Video --vid=1 (*) (h264 1920x800 23.976fps)
(+) Audio --aid=1 --alang=ger (*) (ac3 6ch 48000Hz)
Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
(+) Subs --sid=1 --slang=ger (*) (f) (subrip)
Using hardware decoding (cuda).
AO: [pulse] 48000Hz 5.1(side) 6ch float
VO: [gpu] 1920x800 cuda[nv12]
AV: 00:00:19 / 02:24:29 (0%) A-V: 0.000 Cache: 128s/150MB
result: 2 channel stereo sound
adding audio-spdif parameter:
mpv --vo=gpu --hwdec=cuda --hwdec-codecs=all --audio-spdif=ac3,dts,dts-hd,truehd enticement-13.hours.bd.1080p.mkv
(+) Video --vid=1 (*) (h264 1920x800 23.976fps)
(+) Audio --aid=1 --alang=ger (*) (ac3 6ch 48000Hz)
Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
(+) Subs --sid=1 --slang=ger (*) (f) (subrip)
Using hardware decoding (cuda).
ALSA lib conf.c:5187:(snd_config_expand) Unknown parameters AES0=6,AES1=130,AES2=0,AES3=2
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default:AES0=6,AES1=130,AES2=0,AES3=2
AO: [alsa] 48000Hz stereo 2ch spdif-ac3
VO: [gpu] 1920x800 cuda[nv12]
AV: 00:00:24 / 02:24:29 (0%) A-V: 0.000 Cache: 124s/150MB
Alles anzeigen
result: no sound
adding --ao=pulse:
mpv --vo=gpu --hwdec=cuda --hwdec-codecs=all --ao=pulse --audio-spdif=ac3,dts,dts-hd,truehd enticement-13.hours.bd.1080p.mkv
(+) Video --vid=1 (*) (h264 1920x800 23.976fps)
(+) Audio --aid=1 --alang=ger (*) (ac3 6ch 48000Hz)
Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
(+) Subs --sid=1 --slang=ger (*) (f) (subrip)
Using hardware decoding (cuda).
[ao] Failed to initialize audio driver 'pulse'
AO: [pulse] 48000Hz 5.1(side) 6ch float
VO: [gpu] 1920x800 cuda[nv12]
AV: 00:00:05 / 02:24:29 (0%) A-V: 0.000 Cache: 131s/150MB
with pipewire:
mpv --vo=gpu --hwdec=cuda --hwdec-codecs=all --ao=pipewire --audio-spdif=ac3,dts,dts-hd,truehd enticement-13.hours.bd.1080p.mkv
(+) Video --vid=1 (*) (h264 1920x800 23.976fps)
(+) Audio --aid=1 --alang=ger (*) (ac3 6ch 48000Hz)
Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
(+) Subs --sid=1 --slang=ger (*) (f) (subrip)
Using hardware decoding (cuda).
[ao] Audio output pipewire not found!
[ao] Failed to initialize audio driver 'pipewire'
[ao] Audio output pipewire not found!
[ao] Failed to initialize audio driver 'pipewire'
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [gpu] 1920x800 cuda[nv12]
V: 00:00:11 / 02:24:29 (0%) Cache: 141s/150MB
Alles anzeigen
mpv --ao=help
Available audio outputs:
pulse PulseAudio audio output
alsa ALSA audio output
oss OSS/ioctl audio output
jack JACK audio output
null Null audio output
pcm RAW PCM/WAVE file writer audio output
trying --ao=jack:
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[ao/jack] cannot open server
[ao] Failed to initialize audio driver 'jack'
Ich versuche hier gerade das MPV-Plugin 1.2.4 in einer VM ohne jegliche Hardwarebeschleunigung mit vdr-sxfe zu betreiben:
das Plugin wird mit -v x11 -h no aufgerufen.
Wenn ich eine MP3-Datei mit eingebettetem Cover abspielen lasse, sehe ich auch für einen Bruchteil einer Sekunde das Cover am Schirm, aber dann wird der Bildschirm schwarz bevor wieder das normale TV kommt. MP3-Ton kommt keiner.
I'm trying to run the MPV plugin 1.2.4 without any hardware acceleration with vdr-sxfe in a virtual machine:
the plugin is configured to run with -v x11 -h no.
When I open a MP3 file with an embedded cover, I can see it for a split second before the screen turns black and returns to live TV. No MP3 audio playback at all.
syslog
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5131] [mpv] playing //home/vdr/Schreibtisch/somemp3withcover.mp3
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5143] IPTV streamer thread ended (pid=5131, tid=5143)
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 6 start-file
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property filename
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property pause
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property speed
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property media-title
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property playlist-pos-1
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property playlist-count
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property track-list
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5141] device 1 receiver thread ended (pid=5131, tid=5141)
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property track-list
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 19 metadata-update
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 18 audio-reconfig
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 18 audio-reconfig
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 8 file-loaded
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property container-fps
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property duration
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: property chapters
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 18 audio-reconfig
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 10 track-switched
Nov 14 08:27:28 vdr-VirtualBox vdr[5131]: [5249] [mpv]: event: 7 end-file
Nov 14 08:27:29 vdr-VirtualBox vdr[5131]: [5131] cansel 0
Nov 14 08:27:29 vdr-VirtualBox vdr[5131]: [5131] saved setup to /var/lib/vdr/setup.conf
Nov 14 08:27:29 vdr-VirtualBox vdr[5131]: [5131] [mpv] Playlist was not used
Alles anzeigen
Try -v auto -h auto -a audiodevice
You can enable debug in make file, and look at the /var/log/mpv.
Also, test mpv without vdr.
> Try -v auto -h auto
Causes a crash when attempting to play the MP3 file, see the attached log.
> Also, test mpv without vdr.
Works, below is the default output when calling mpv without any options:
vdr@vdr-VirtualBox:~/Schreibtisch$ mpv some.mp3
[ffmpeg/demuxer] mp3: Estimating duration from bitrate, this may be inaccurate
(+) Video --vid=1 [P] (mjpeg 1400x1400 1.000fps)
(+) Audio --aid=1 (mp3 2ch 44100Hz)
File tags:
Artist: Artist
Album: Album
Date: 1987
Genre: Pop
Title: Title
libEGL warning: DRI2: failed to authenticate
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
VMware: No 3D enabled (0, Success).
VMware: No 3D enabled (0, Success).
[vo/gpu] Failed to commit ModeSetting atomic request (-13)
[vo/gpu/opengl] Failed to set CRTC for connector 38: Permission denied
[vo/gpu/vulkan/libplacebo] Found no suitable device, giving up.
[vo/gpu/vulkan/libplacebo] Failed initializing vulkan device
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vo/vdpau] Error when calling vdp_device_create_x11: 1
[vo/xv] No Xvideo support found.
[vo/sdl] Using opengl
[vo/sdl] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the sdl VO.
Displaying cover art. Use --no-audio-display to prevent this.
[autoconvert] Converting yuv444p -> yuv420p
VO: [sdl] 1400x1400 yuv420p
AO: [pulse] 44100Hz stereo 2ch float
AV: 00:00:02 / 00:04:16 (1%)
Exiting... (Quit)
Alles anzeigen
What I get when I try to enforce pulse (-a pulse)
Nov 14 12:48:20 vdr-VirtualBox vdr[7107]: [7224] [mpv]: Failed to initialize audio driver 'pulse'
Nov 14 12:48:20 vdr-VirtualBox vdr[7107]: [7224] [mpv]: Could not open/initialize audio device -> no sound.
and alsa (-a alsa)
ZitatNov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: could not open audio: ALSA: Couldn't open audio device: Das Gerät oder die Ressource ist belegt
Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: event: 18 audio-reconfig
Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: event: 10 track-switched
Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: Failed to initialize audio driver 'sdl'
Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: Could not open/initialize audio device -> no sound.
Look aplay -L, try -a default.
Crash because there is no video output and no OSD.
Find the parameters that MPV works with and put them in the plugin settings.
> Look aplay -L, try -a default.
-a default results in cansel 0
Below is the output of aplay -L.
The problem is definitely on the audio side, since -a null shows the cover art without exiting (with no audio of course)
I've tried
-a default
-a sysdefault
-a pulse
What choice would you suggest to try from the options below?
vdr@vdr-VirtualBox:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
Playback/recording through the PulseAudio sound server
sysdefault
Default Audio Device
iec958
IEC958 (S/PDIF) Digital Audio Output
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pulse
PulseAudio Sound Server
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
hw:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
Direct hardware device without any conversions
plughw:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
Hardware device with all software conversions
sysdefault:CARD=I82801AAICH
Intel 82801AA-ICH, Intel 82801AA-ICH
Default Audio Device
front:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
Front output / input
surround21:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
4.0 Surround output to Front and Rear speakers
surround41:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
iec958:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=I82801AAICH,DEV=0
Intel 82801AA-ICH, Intel 82801AA-ICH
Direct sample mixing device
usbstream:CARD=I82801AAICH
Intel 82801AA-ICH
USB Stream Output
Alles anzeigen
> Try -a alsa/front:CARD=I82801AAICH,DEV=0
Modified 50-mpv.conf accordingly and followed by systemctl restart vdr.
Result:
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 11 idle
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 6 start-file
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property filename
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property pause
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property speed
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property media-title
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property playlist-pos-1
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property playlist-count
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property track-list
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property track-list
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 19 metadata-update
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 18 audio-reconfig
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 18 audio-reconfig
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 8 file-loaded
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [1951] device 1 receiver thread ended (pid=1941, tid=1951)
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property container-fps
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property duration
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: property chapters
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 18 audio-reconfig
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 10 track-switched
Nov 14 15:08:50 vdr-VirtualBox vdr[1941]: [2049] [mpv]: event: 7 end-file
Nov 14 15:08:51 vdr-VirtualBox vdr[1941]: [1941] cansel 0
Nov 14 15:08:51 vdr-VirtualBox vdr[1941]: [1941] saved setup to /var/lib/vdr/setup.conf
Nov 14 15:08:51 vdr-VirtualBox vdr[1941]: [1941] [mpv] Playlist was not used
Nov 14 15:08:51 vdr-VirtualBox vdr[1941]: [1941] setting primary device to 2
Nov 14 15:08:51 vdr-VirtualBox vdr[1941]: [1941] switching to channel 6 I-1-10083-1 (SWR)
Alles anzeigen
Try with mpv
-audio-device alsa/front:CARD=I82801AAICH,DEV=0
-audio-device pulse
Both options play fine:
vdr@vdr-VirtualBox:~/Schreibtisch$ mpv --audio-device=alsa/front:CARD=I82801AAICH,DEV=0 some.mp3
[autoconvert] Converting yuv444p -> yuv420p
VO: [sdl] 1400x1400 yuv420p
AO: [alsa] 48000Hz stereo 2ch s16
AV: 00:00:12 / 00:04:16 (5%)
vdr@vdr-VirtualBox:~/Schreibtisch$ mpv --audio-device=pulse some.mp3
[autoconvert] Converting yuv444p -> yuv420p
VO: [sdl] 1400x1400 yuv420p
AO: [pulse] 44100Hz stereo 2ch float
AV: 00:00:02 / 00:04:16 (1%)
Alles anzeigen
I put pulseaudio into -vvv verbosity, attached is the result.
The mpv-plugin was configured with -a alsa/front:CARD=I82801AAICH,DEV=0
Edit: the quoted code below is the log with -a pulse
Nov 14 23:27:17 vdr-VirtualBox pulseaudio[1125]: Processing rewind...
Nov 14 23:27:17 vdr-VirtualBox pulseaudio[1125]: alsa_output.pci-0000_00_05.0.analog-stereo: state: RUNNING -> IDLE
Nov 14 23:27:17 vdr-VirtualBox pulseaudio[1125]: Sink alsa_output.pci-0000_00_05.0.analog-stereo becomes idle, timeout in 5 seconds.
Nov 14 23:27:17 vdr-VirtualBox pulseaudio[1125]: Hmm, no streams around, trying to vacuum.
Nov 14 23:27:17 vdr-VirtualBox pulseaudio[1125]: Freeing input 2 "Audio Stream"
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 11 idle
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 6 start-file
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property filename
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property pause
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property speed
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property media-title
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property playlist-pos-1
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property playlist-count
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property track-list
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2615] device 1 receiver thread ended (pid=2605, tid=2615)
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property track-list
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 19 metadata-update
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 18 audio-reconfig
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 18 audio-reconfig
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 8 file-loaded
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property container-fps
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property duration
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property chapters
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 18 audio-reconfig
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 10 track-switched
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property media-title
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property demuxer-via-network
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: property track-list
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: Init failed: Verbindung verweigert
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: Failed to initialize audio driver 'pulse'
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: Could not open/initialize audio device -> no sound.
Nov 14 23:27:17 vdr-VirtualBox vdr[2605]: [2718] [mpv]: event: 7 end-file
Nov 14 23:27:18 vdr-VirtualBox vdr[2605]: [2605] cansel 0
Alles anzeigen
I was finally able to solve the Init failed problem after seahawk1986 explained it to me like a 5yo.
The reason are missing environment variables for the vdr process caused by its startup procedure.
As a result mpv (starting in the context of the vdr process) lacks the necessary informations to connect to an audio server.
How to fix this:
[Service]
EnvironmentFile=-/etc/default/locale
Environment=XDG_RUNTIME_DIR=/run/user/1000/ # <- 1000 is the UID for the first user in Ubuntu dists, might differ for you
EnvironmentFile=-/home/vdr/.session-env # <- path needs to match the location of your .session-env
Environment=VDR_ID=0
In my case including -a pulse in /etc/vdr/conf.d/50-mpv.conf was required in addition.
After a restart you should finally have a working vdr-plugin-mpv with audio.
I have a problem building the mpv plugin against the yaVDR vdr if the patch for the pin-Plugin is active (the last version I was able to build successfully was 1.2.4) - and I fail to see how this patch affects the SignalStats method:
$ make
CC control.o
g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wno-switch -c -DPLUGIN_NAME_I18N='"mpv"' -D_GNU_SOURCE -DUSE_LIBMPV -DPLGRESDIR='"/usr/share/vdr/plugins/mpv"' -o control.o control.c
In file included from /usr/include/X11/Xlib-xcb.h:8,
from player.h:16,
from control.h:13,
from control.c:9:
/usr/include/vdr/dvbdevice.h:243:157: error: expected ‘,’ or ‘...’ before ‘int’
243 | d, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL, int *Status = NULL) const;
| ^~~~~~
In file included from /usr/include/vdr/menuitems.h:14,
from /usr/include/vdr/plugin.h:14,
from /usr/include/vdr/status.h:17,
from status.h:12,
from control.h:14,
from control.c:9:
/usr/include/vdr/dvbdevice.h:243:152: error: default argument missing for parameter 7 of ‘virtual bool cDvbDevice::SignalStats(int&, double*, double*, double*, double*, double*, int*) const’
243 | &Valid, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL, int *Status = NULL) const;
| ^~~~~
In file included from /usr/include/vdr/menuitems.h:14,
from /usr/include/vdr/plugin.h:14,
from /usr/include/vdr/status.h:17,
from status.h:12,
from control.h:14,
from control.c:9:
/usr/include/vdr/dvbdevice.h:243:48: note: ...following parameter 2 which has a default argument
243 | virtual bool SignalStats(int &Valid, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL, int *Status = NULL) const;
| ^
make: *** [Makefile:111: control.o] Error 1
Alles anzeigen
With the patches before the one for the Pin-Plugin: https://github.com/seahawk1986…4ea48df59f4b66483c76a7f83
After applying the patch for the pin-plugin: https://github.com/seahawk1986…52acc3f102bd12f692c3ad2e2
May be this:
In X11/Xlib.h line 83:
#define Status int
I don’t know how to get around this yet and why did the patch affect this...
Ah, so the #define Status int in the header X11/Xlib.h would cause the preprocessor to replace a variable name Status with int in the function signature causing a syntax error - using https://gcc.gnu.org/onlinedocs…02fPop-Macro-Pragmas.html to do a #undef Status around this function signature seems to do the trick:
Index: vdr-2.6.4/dvbdevice.h
===================================================================
--- vdr-2.6.4.orig/dvbdevice.h 2023-12-26 14:25:45.668911060 +0000
+++ vdr-2.6.4/dvbdevice.h 2023-12-26 14:29:17.930655868 +0000
@@ -238,7 +240,10 @@
virtual bool ProvidesEIT(void) const;
virtual int NumProvidedSystems(void) const;
virtual const cPositioner *Positioner(void) const;
+#pragma push_macro("Status")
+#undef Status
virtual bool SignalStats(int &Valid, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL, int *Status = NULL) const;
+#pragma pop_macro("Status")
virtual int SignalStrength(void) const;
virtual int SignalQuality(void) const;
virtual const cChannel *GetCurrentlyTunedTransponder(void) const;
Alles anzeigen
Or is there a better solution to this like renaming the variable or doing the undef in den mpv-Plugin after the include of the X11 header files?
This seems to work and is quite simple to maintain as a patch for the plugin:
Index: vdr-plugin-mpv-1.4.4/player.h
===================================================================
--- vdr-plugin-mpv-1.4.4.orig/player.h 2023-07-07 11:18:26.000000000 +0000
+++ vdr-plugin-mpv-1.4.4/player.h 2023-12-26 16:42:18.748908581 +0000
@@ -15,6 +15,8 @@
#include <mpv/client.h>
#include <X11/Xlib-xcb.h>
#include <X11/Xutil.h>
+// get rid of the "#define status int" that causes problems in combination with the pin patch
+#undef Status
using std::string;
using std::vector;
Alles anzeigen
Noch eine Ersuchen/Frage zum Aufruf von MPV. Da kommt zuerst die Dateiauswahl. Wie lösche ich hier eine Datei ?
How to remove a file from the directory when starting MPV, do I understand correctly? This is not a file manager, this is a player, there is no such functionality.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!