Bug#774038: xbmc: When going fullscreen watching through xbmc-pvr-tvheadend-hts makes video stays black

Bernhard Übelacker bernhardu at vr-web.de
Mon Dec 29 10:48:25 UTC 2014


Hello Bálint,
I was successful in creating a package for kodi from you git
and some ffmpeg packages from unstable, and then building and
using a    xbmc-pvr-addons zip from it.

The issue I described I could not reproduce with kodi-14.
>From the logfile I assume that vdpau is in use:
  VDPAU::CreateContext - creating decoder context

And by getting to fullscreen the decoder is still destroyed, but later recreated:
    OnKey: backslash (0xf05c) pressed, action is ToggleFullScreen
    ...
    CVDPAU::OnLostDevice event
     (VDPAU) FiniVDPAUOutput
    ...
    CWinSystemX11::RefreshGlxContext: refreshing context
    CVDPAU::OnResetDevice event
    ...
    VDPAU::CreateContext - creating decoder context



I attached a debugger to see where we come from for this OnResetDevice:

(gdb) bt
#0  VDPAU::CDecoder::OnResetDevice (this=0x7f5c180017e0) at VDPAU.cpp:694
#1  0x0000000000e88458 in CWinSystemX11::SetWindow (this=this at entry=0x1b39a80, width=1680, height=<optimized out>, fullscreen=fullscreen at entry=true, output="DVI-D-0") at WinSystemX11.cpp:1234
#2  0x0000000000e89235 in CWinSystemX11::SetFullScreen (this=this at entry=0x1b39a80, fullScreen=fullScreen at entry=true, res=..., blankOtherDisplays=<optimized out>) at WinSystemX11.cpp:313
#3  0x0000000000e8f5ff in CWinSystemX11GL::SetFullScreen (this=0x1b39a80, fullScreen=true, res=..., blankOtherDisplays=<optimized out>) at WinSystemX11GL.cpp:212
#4  0x00000000007ce58e in CGraphicContext::SetVideoResolutionInternal (this=this at entry=0x1b387a0, res=<optimized out>, res at entry=RES_DESKTOP, forceUpdate=forceUpdate at entry=false) at GraphicContext.cpp:466
#5  0x00000000007cee56 in CGraphicContext::SetVideoResolution (this=0x1b387a0, res=RES_DESKTOP, forceUpdate=<optimized out>) at GraphicContext.cpp:371
#6  0x00000000006ffa24 in CDisplaySettings::OnSettingChanging (this=0x18e90c0 <CDisplaySettings::Get()::sDisplaySettings>, setting=0x10) at DisplaySettings.cpp:248
#7  0x0000000000c66a91 in CSettingsManager::OnSettingChanging (this=<optimized out>, setting=0x1d087a0) at SettingsManager.cpp:732
#8  0x0000000000c5172c in CSettingString::SetValue (this=0x1d087a0, value="DESKTOP") at Setting.cpp:1272
#9  0x0000000000c643d8 in CSettingsManager::SetString (this=0x1bb2410, id="videoscreen.screenmode", value="DESKTOP") at SettingsManager.cpp:601
#10 0x00000000006ee169 in CSettings::SetString (this=<optimized out>, id="videoscreen.screenmode", value="DESKTOP") at Settings.cpp:396
#11 0x00000000006fe083 in CDisplaySettings::SetCurrentResolution (this=0x18e90c0 <CDisplaySettings::Get()::sDisplaySettings>, resolution=resolution at entry=RES_DESKTOP, save=save at entry=true) at DisplaySettings.cpp:358
#12 0x00000000007cf1df in CGraphicContext::ToggleFullScreenRoot (this=0x1b387a0) at GraphicContext.cpp:1004
#13 0x0000000000cb3ea2 in CApplication::OnAction (this=0x1b35c90, action=...) at Application.cpp:2541
...

This kodi-14 stack is nearly equal to the stack of xbmc-13 when we call the VDPAU::CDecoder::FiniVDPAUOutput.
The difference starts in CWinSystemX11::SetFullScreen.
Will do some more testing, probably we need only to make a call to CWinSystemX11::SetWindow too ...


---------------


The commit message for xbmc-13 you mentioned reads like the exact opposite what I observed?


---------------


I build a package xbmc-13 with these changes to debian/rules:
-  --enable-xrandr \
+  --disable-xrandr \

And indeed, this version works like expected, for my short test.


Kind regards,
Bernhard





Am 28.12.2014 um 16:32 schrieb Bálint Réczey:
> Hi Bernhard,
> 
> 2014-12-28 14:28 GMT+01:00 Bernhard Ãœbelacker <bernhardu at vr-web.de>:
>> Hello Bálint Réczey,
>> thanks for your fast response.
>>
>> One thing I am uncomfortable with my proposal is, if it would affect
>> people using some low spec computer which are not able to decode fast
>> enough in software and not having vdpau at all.
> Well, if this was OK for DVD streams, it should be OK for PVR streams as well.
> BTW the original commit adding "hint.software = true;":
> 
> commit d75a46a9f9626be12cc486c8e7c7d9be9d216922
> Author: elupus <elupus at svn>
> Date:   Fri Apr 9 18:59:15 2010 +0000
> 
>     changed: only use libmpeg2 for dvd playback
> 
>     Side effect that vaapi/vdpau is now allowed for all mpeg2 content.
> 
>     git-svn-id:
> https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29147
> 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
> ...
> 
>>
>> I will try to build a kodi package from your repo and report back.
> It would also be interesting to check an xbmc build using FFmpeg, it
> may make a difference:
> http://snapshot.debian.org/package/xbmc/2%3A13.2%2Bdfsg1-2~exp1/
> 
> 
>>
>> Kind regards,
>> Bernhard
>>
>>
>> One think were I am undecided is, my proposal is to set set
>> software=true. But I don't know if then someone would still be able to
>> watch via xbmc-pvr-tvheadend-hts on e.g. on a raspberry
> I'm hesitant a bit, too to upload the change.
> You may have hit a different manifestation of #769057.
> 
> Looking at the code it seems compiling with xrandr disabled may make
> XBMC skip the OnLostDevice() call in CWinSystemX11::SetFullScreen()
> possibly fixing both issues.
> Could you please try disabling xrandr in debian/rules instead of using
> the hint trick?
> 
> Cheers,
> Balint
> 
>>
>> On Sun, 28 Dec 2014 11:17:44 +0100 =?UTF-8?B?QsOhbGludCBSw6ljemV5?=
>> <balint at balintreczey.hu> wrote:
>>> Control: tags -1 pending upstream confirmed
>>>
>>> Bernhard,
>>>
>>> 2014-12-27 22:07 GMT+01:00 Bernhard Ãœbelacker <bernhardu at vr-web.de>:
>>>> Package: xbmc
>>>> Version: 2:13.2+dfsg1-4
>>>> Severity: important
>>>>
>>>> Dear Maintainer,
>>>> when playing with xbmc from current jessie with activated xbmc-pvr-tvheadend-
>>>> hts
>>>> from some satellite broadcasts I get only a black screen when switching from
>>>> windowed to fullscreen mode.
>>>>
>>>>
>>>> These are the circumstances which are relevant (as far as I think):
>>>> - using a VDPAU enabled graphics card with needed vdpau libraries installed
>>>> - having no .xbmc directory in home directory (just for reproducability)
>>>> - starting xbmc
>>>> - activating Tvheadend HTSP Client addon
>>>> - playing a broadcast through LiveTv in windowed mode (in my case no HD
>>>> channel)
>>>>   (plays fine in the partial screen with channels on the side as filling the
>>>> whole window too.)
>>>> - switching to fullscreen mode (e.g. altgr+backslash)
>>>> - video stays black, audio still playing, other menus and control elements also
>>>> visible.
>>>>
>>>>
>>>> I did some further investigations:
>>> ...
>>>> I opened it as important, but probably you want to increase it to serious if
>>>> you see fit.
>>>> If yes probably on way of action for jessie would be to add this "hint.software
>>>> = true;"
>>>> in DVDPlayer.cpp:3003 as it is already the case for DVD playback.
>>>
>>> Thank you for the detailed investigation and the proposed fix. The fix
>>> will be included in the next upload.
>>> There is no need for increasing severity. I will ask for a freeze
>>> exception and I think Release Managers will approve it.
>>>
>>> I also checked latest upstream code but the patched part has been
>>> removed and without the HW to test the change I'm not comfortable with
>>> adapting the patch.
>>>
>>> I have packaged Kodi already [1] but it is waiting in the NEW queue
>>> right now. Could you please check if Kodi needs the fix, too and adapt
>>> the patch if needed?
>>> If you could upstream the Kodi fix yourself and ping me to back-port
>>> the fix I would be happy, too.
>>>
>>> Cheers,
>>> Balint
>>>
>>> [1] https://anonscm.debian.org/cgit/pkg-multimedia/kodi.git
>>>
>>>
> 
> 



More information about the pkg-multimedia-maintainers mailing list