Kodi Community Forum

Full Version: HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So looking forward to this...  Man, you just made my weekend and probably the next one too!
Hoping also it gets accepted, so WAF goes higher regarding 4K at home

It took a couple of hours to understand/debug the ApplicationPlayer.cpp and PlayerCoreFactory.cpp.
That's the workflow:

1. call to ApplicationPlayer.cpp OpenFile() with the new item

2. ApplicationPlayer.cpp executes PlayerCoreFactory.cpp GetDefaultPlayer() function to retrieve the player name for the item which should be played. There, your rules was matched and so on...
The correct matched player name always was returned.
So the issue is was not here.

3. now the current/last used player was retrieved todo some stuff in video player without closing it.

4. if that was null, a new player was created, the one with the before matched rules

5. new file was loaded in this player

You see, the issue is that ALWAYS the last player is used, because it never is null.

I have now added the following between 3 & 4:

3.5 when the last player name differs from new one (matched with rules), the last gets unloaded. Then under 4, the player is null and the new one gets created and finally the file loaded into the new player.

Hope this makes sense
pOpY
There is 1001 lines of code in that first file alone.  I will never understand how on earth you coders debug and rewrite what you do... Amazes me tbh.  Assuming your testbed worked, I hope it's approved and added soon.  I've wanted to use v.18 x64 as a daily driver but this was the holdup.  I'm sure you can tell I'm chomping at the bit.  Appreciate ya'.  KODI dev(s) too!
It's my job also, c, c++ and so on.
That could be a reason

Have made a clean build for Windows x64 over night based on the latest nightly/master.

Not at home today to test.
When i have time to test it, and it's ok, I can share it.

Stay tuned.

pOpY
Bad news, my build works like it should on my dev maschine (intel gpu) and the issue is fixed for me.
Sadly on my second HTPC the internal video player just shows black picture and no video.
Dont know why and have to investigate.
But i think it has'nt todo anything with the external player fix.

pOpY
@popy, way to go! I also hope it gets accepted, and that the issue you are experiencing has nothing to do with your fix.  While I am living with the Leia PCF issue, I so much wish it wasn't there! Smile

Thanks for your efforts towards that goal.

Regards,

Bart
Good news!
The issue with black screen is the issue of my build.
Also with no files changed, i have a black screen.
Must look into it when i find time.

But, @Rechi found the root cause of this issue.
My fix was more a workaround for the issue.
I have updated the code/PR 14291 (PR) and already tested it with positive results.

Hope it gets merged soon to have it in one of the next nightlys.

pOpY
(2018-08-13, 21:27)popy Wrote: [ -> ]Good news!
The issue with black screen is the issue of my build.
Also with no files changed, i have a black screen.
Must look into it when i find time.

But, @Rechi found the root cause of this issue.
My fix was more a workaround for the issue.
I have updated the code/PR 14291 (PR) and already tested it with positive results.

Hope it gets merged soon to have it in one of the next nightlys.

pOpY
 You are a Rock Star & a Super Star my friend! Thank you so much for this fix which was so desperately needed for so long. We are all so anxiously waiting for the fix to be merged. We need more Kodi users like you who contribute so much. I'm sure the Devs really appreciate it. 

Thanks!!
Thanks for your kind words.

pOpY
Good news.
Merged into master!
Fix should be included in upcomming nightly.

pOpY
Excellent news!! Can't wait for this major fix!!

Thank you.
Nice

I'll give nightly a try tomorrow.
New nightly working here as expected :-)
Sadly i faced a new bug, see https://trac.kodi.tv/ticket/17988#ticket

If you are closing the external player itself (with ALT-F4 or the harmony) all should be good.
Bug just comes up when pressing STOP inside kodi during a external player is currently active.

Have fun
pOpY
(2018-08-15, 15:22)popy Wrote: [ -> ]New nightly working here as expected :-)
Sadly i faced a new bug, see https://trac.kodi.tv/ticket/17988#ticket

If you are closing the external player itself (with ALT-F4 or the harmony) all should be good.
Bug just comes up when pressing STOP inside kodi during a external player is currently active.

Have fun
pOpY
 Thanks for the Update pOpY. I'll have some time a little later today to test the bug fix with the new Kodi nightly, and also the MPC-BE/MadVR UHD HDR playback. Will try to report back later. Thanks again for all your help & fixes!!
Been running it through its paces for a while and am no where close to done:

The main problem with the PCF honoring rules for defaulting to the correct player is fixed.  YiPpY!  So is player selection via the 'Play using' menu.  YeEhAw!  Alt + F4 command to the focused external player quits and returns to KODI in focus with resolution and frame rate correctly applied just as it did using 17.6.  All is perfect including engaging/disengaging HDR etc.

However, there is a new problem and if memory serves me correct, it too was always present in my past tests with v.18 so it's not exactly new or caused by your fix imo.  Again, going by distant memory.

When I play 3D with any player, the correct player opens, the resolution switches from 2160 to 1080 correctly and 3D frame packed mode engages.  The 3D playback is all perfect as it was in 17.6.  Quitting the player is where the problem begins.  The external player closes and 3D disengages on the panel but the return to focused KODI results in it no longer in fullscreen.  It appears windowed in the top left corner and the image of the GUI is not complete (mostly just a black box although some images are present when scrolling the distorted tiny GUI).  Alt + F4 kills KODI and the Windows desktop returns to the correct resolution and frame rate.

I windowed KODI instead of the required fullscreen for external players and the results were the same.  Fullscreening the windowed KODI in the top left corner after the error resulted in a fullscreened black window with a tiny KODI still in the top left corner.

Not sure a debug log would do any good and no idea what else I can supply should you or another decide to try and tackle it?  It would require 3D capability and understand most no longer have it.  Uhg...