Skip to content

Commit

Permalink
Fixed volume level (with linearize) after changing the play mode. Ver…
Browse files Browse the repository at this point in the history
…sion 1.0.15.
  • Loading branch information
ua0lnj committed Mar 21, 2021
1 parent 5c1e2f3 commit c2bd14f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions softhddevice.cpp
Expand Up @@ -64,7 +64,7 @@ extern "C"
/// vdr-plugin version number.
/// Makefile extracts the version number for generating the file name
/// for the distribution archive.
static const char *const VERSION = "1.0.14"
static const char *const VERSION = "1.0.15"
#ifdef GIT_REV
"-GIT" GIT_REV
#endif
Expand Down Expand Up @@ -2790,7 +2790,7 @@ bool cSoftHdDevice::SetPlayMode(ePlayMode play_mode)
if (play_mode != 0)
SuspendMode = NOT_SUSPENDED;
}

SetVolume(cDevice::CurrentVolume(), true);

This comment has been minimized.

Copy link
@9000h

9000h Mar 23, 2021

looks like this causing issues with mpv (i965 vaapi)

This comment has been minimized.

Copy link
@ua0lnj

ua0lnj Mar 23, 2021

Author Owner

Describe?

This comment has been minimized.

Copy link
@9000h

9000h Mar 23, 2021

as soon as mpv try to play a file vdr did crash and the crash is in mpv SetVolume

This comment has been minimized.

Copy link
@ua0lnj

ua0lnj Mar 23, 2021

Author Owner

I think I tested it, I'll check how I come home from work

This comment has been minimized.

Copy link
@ua0lnj

ua0lnj Mar 24, 2021

Author Owner

Can't reproduce crash, test vaapi Intel, cuvid Nvidia. All works fine, soft and hw volume control.
Need more information how to reproduce.
Maybe logs...

This comment has been minimized.

Copy link
@9000h

9000h Mar 24, 2021

settings from setup.conf
softhddevice.1080i.CutLeftRight = 0
softhddevice.1080i.CutTopBottom = 0
softhddevice.1080i.Deinterlace = 3
softhddevice.1080i.Denoise = 0
softhddevice.1080i.FirstField = 0
softhddevice.1080i.InverseTelecine = 0
softhddevice.1080i.Scaling = 0
softhddevice.1080i.SecondField = 0
softhddevice.1080i.Sharpen = 0
softhddevice.1080i.SkipChromaDeinterlace = 0
softhddevice.1080i_fake.CutLeftRight = 0
softhddevice.1080i_fake.CutTopBottom = 0
softhddevice.1080i_fake.Deinterlace = 3
softhddevice.1080i_fake.Denoise = 0
softhddevice.1080i_fake.FirstField = 0
softhddevice.1080i_fake.InverseTelecine = 0
softhddevice.1080i_fake.Scaling = 0
softhddevice.1080i_fake.SecondField = 0
softhddevice.1080i_fake.Sharpen = 0
softhddevice.1080i_fake.SkipChromaDeinterlace = 0
softhddevice.576i.CutLeftRight = 0
softhddevice.576i.CutTopBottom = 0
softhddevice.576i.Deinterlace = 2
softhddevice.576i.Denoise = 0
softhddevice.576i.FirstField = 0
softhddevice.576i.InverseTelecine = 0
softhddevice.576i.Scaling = 2
softhddevice.576i.SecondField = 0
softhddevice.576i.Sharpen = 0
softhddevice.576i.SkipChromaDeinterlace = 0
softhddevice.60HzMode = 1
softhddevice.720p.CutLeftRight = 0
softhddevice.720p.CutTopBottom = 0
softhddevice.720p.Deinterlace = 1
softhddevice.720p.Denoise = 0
softhddevice.720p.FirstField = 0
softhddevice.720p.InverseTelecine = 0
softhddevice.720p.Scaling = 0
softhddevice.720p.SecondField = 0
softhddevice.720p.Sharpen = 0
softhddevice.720p.SkipChromaDeinterlace = 0
softhddevice.AudioAutoAES = 1
softhddevice.AudioBufferTime = 600
softhddevice.AudioCompression = 0
softhddevice.AudioDelay = 50
softhddevice.AudioDownmix = 1
softhddevice.AudioDrift = 3
softhddevice.AudioMaxCompression = 0
softhddevice.AudioMaxNormalize = 0
softhddevice.AudioNormalize = 0
softhddevice.AudioPassthrough = -16
softhddevice.AudioSoftvol = 1
softhddevice.AudioStereoDescent = 0
softhddevice.AutoCrop.Delay = 0
softhddevice.AutoCrop.Interval = 3
softhddevice.AutoCrop.Tolerance = 0
softhddevice.Background = 0
softhddevice.BlackPicture = 0
softhddevice.Brightness = 0
softhddevice.ClearOnSwitch = 0
softhddevice.Contrast = 10
softhddevice.DetachFromMainMenu = 0
softhddevice.EnableDPMSatBlackScreen = 0
softhddevice.HideMainMenuEntry = 0
softhddevice.Hue = 0
softhddevice.MakePrimary = 1
softhddevice.MaxSizeGPUImageCache = 128
softhddevice.Osd.Height = 1080
softhddevice.Osd.Width = 1920
softhddevice.pip.Alt.Height = 50
softhddevice.pip.Alt.VideoHeight = 50
softhddevice.pip.Alt.VideoWidth = 0
softhddevice.pip.Alt.VideoX = 0
softhddevice.pip.Alt.VideoY = 0
softhddevice.pip.Alt.Width = 0
softhddevice.pip.Alt.X = 0
softhddevice.pip.Alt.Y = 50
softhddevice.pip.Height = 18
softhddevice.pip.VideoHeight = 0
softhddevice.pip.VideoWidth = 0
softhddevice.pip.VideoX = 0
softhddevice.pip.VideoY = 0
softhddevice.pip.Width = 18
softhddevice.pip.X = 79
softhddevice.pip.Y = 78
softhddevice.Saturation = 10
softhddevice.SkinToneEnhancement = 0
softhddevice.SoftStartSync = 1
softhddevice.StudioLevels = 0
softhddevice.Suspend.Close = 0
softhddevice.Suspend.X11 = 0
softhddevice.UHD.CutLeftRight = 0
softhddevice.UHD.CutTopBottom = 0
softhddevice.UHD.Deinterlace = 1
softhddevice.UHD.Denoise = 0
softhddevice.UHD.FirstField = 0
softhddevice.UHD.InverseTelecine = 0
softhddevice.UHD.Scaling = 0
softhddevice.UHD.SecondField = 0
softhddevice.UHD.Sharpen = 0
softhddevice.UHD.SkipChromaDeinterlace = 0
softhddevice.Video4to3DisplayFormat = 0
softhddevice.VideoOtherDisplayFormat = 2

export LIBVA_DRIVER_NAME=i965
gdb --args vdr -l3 -w 60 --chartab=ISO-8859-15 -P"satip -d2 -s 192.168.178.129|DVBS2-4,DVBC-2,DVBT2-2|minisatip" -P"softhddevice -f -v va-api -a default -c softvol -w alsa-driver-broken" -P"mpv -v gpu -a alsa -b /srv/vdr/video"

Thread 1 "vdr" received signal SIGSEGV, Segmentation fault.
0x00007fffeb2e7eb0 in mpv_set_property () from /lib/x86_64-linux-gnu/libmpv.so.1
(gdb) bt
#0 0x00007fffeb2e7eb0 in mpv_set_property () at /lib/x86_64-linux-gnu/libmpv.so.1
#1 0x00007fffeb2e7fcc in mpv_set_property_string () at /lib/x86_64-linux-gnu/libmpv.so.1
#2 0x00007fffeb468c71 in cMpvPlayer::SetVolume(int) (this=0x555555fc4650, Volume=) at /usr/include/c++/9/bits/basic_string.h:2300
#3 0x00005555556aadfb in cStatus::MsgSetVolume(int, bool) (Volume=255, Absolute=) at status.c:64
#4 0x00005555556134b7 in cDevice::SetVolume(int, bool) (this=0x555555f489c0, Volume=, Absolute=Absolute@entry=true) at device.c:1036
#5 0x00007ffff3e0a54c in cSoftHdDevice::SetPlayMode(ePlayMode) (this=, play_mode=pmNone) at /usr/local/include/vdr/device.h:632
#6 0x000055555561451f in cDevice::Detach(cPlayer*) (this=0x555555f489c0, Player=Player@entry=0x555555f984c8) at device.c:1369
#7 0x0000555555678c85 in cPlayer::Detach() (this=this@entry=0x555555f984c8) at player.c:37
#8 0x00005555556c813c in cTransfer::Activate(bool) (this=0x555555f98370, On=) at transfer.c:37
#9 0x000055555561517f in cDevice::Detach(cReceiver*) (Receiver=0x555555f98370, this=0x555555f13d30) at device.c:1826
#10 cDevice::Detach(cReceiver*) (this=0x555555f13d30, Receiver=Receiver@entry=0x555555f98370) at device.c:1818
#11 0x000055555567b965 in cReceiver::Detach() (this=this@entry=0x555555f98370) at receiver.c:128
#12 0x00005555556c8033 in cTransfer::~cTransfer() (this=0x555555f98370, __in_chrg=) at transfer.c:24
#13 0x00005555556c82cf in cTransfer::~cTransfer() (this=0x555555f98370, __in_chrg=) at transfer.c:22
#14 cTransferControl::~cTransferControl() (this=0x555555abd840, __in_chrg=) at transfer.c:80
#15 0x00005555556c831d in cTransferControl::~cTransferControl() (this=0x555555abd840, __in_chrg=) at transfer.c:77
#16 0x0000555555678e47 in cControl::Launch(cControl*) (Control=0x555555fc4510) at player.c:92
#17 0x00007fffeb457fce in cMpvPlugin::PlayFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) (this=, Filename=..., Shuffle=)
at /usr/include/c++/9/bits/char_traits.h:300
#18 0x00007fffeb458a37 in cMpvPlugin::PlayFileHandleType(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) (this=
0x55555586d910, Filename="/srv/vdr/video/@Current_Not_Applicable/2019-11-22.18.50.200-0.rec/00001.ts", Shuffle=) at /usr/include/c++/9/bits/char_traits.h:300
#19 0x00007fffeb458fc4 in cMpvPlugin::Service(char const*, void*) (this=0x55555586d910, id=, data=) at /usr/include/c++/9/bits/char_traits.h:300
#20 0x00007fffeb45d779 in cMpvFilebrowser::PlayFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool)
(this=this@entry=0x555555ef64a0, Filename="/srv/vdr/video/@Current_Not_Applicable/2019-11-22.18.50.200-0.rec/00001.ts", Shuffle=Shuffle@entry=false) at filebrowser.c:277
#21 0x00007fffeb4617d0 in cMpvFilebrowser::ProcessKey(eKeys) (this=0x555555ef64a0, Key=) at /usr/include/c++/9/bits/char_traits.h:300
#22 0x00005555556697d4 in cOsdMenu::ProcessKey(eKeys) (this=this@entry=0x555555f4bd80, Key=Key@entry=kOk) at osdbase.c:539
#23 0x00005555556583f0 in cMenuMain::ProcessKey(eKeys) (this=0x555555f4bd80, Key=kOk) at menu.c:4624
#24 0x00005555555f61a8 in main(int, char**) (argc=, argv=) at vdr.c:1419
(gdb)

This comment has been minimized.

Copy link
@9000h

9000h Mar 24, 2021

vdr 2.5.1 devel

This comment has been minimized.

Copy link
@ua0lnj

ua0lnj Mar 24, 2021

Author Owner

mpv software volume control = 0?

This comment has been minimized.

Copy link
@ua0lnj

ua0lnj Mar 25, 2021

Author Owner

Try in mpv player.c do this:

void cMpvPlayer::SetVolume(int Volume)
{
if (MpvPluginConfig->SoftVol)
SendCommand("set volume %d\n", Volume);
else if (PlayerIsRunning())
mpv_set_property_string(hMpv, "ao-volume", std::to_string(Volume).c_str());
}

This comment has been minimized.

Copy link
@9000h

9000h Mar 25, 2021

this did the trick, works with the change

return::SetPlayMode(play_mode);
}

Expand Down

0 comments on commit c2bd14f

Please sign in to comment.