Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th June 2014, 17:52   #1  |  Link
haha01haha01
Registered User
 
Join Date: Mar 2014
Posts: 6
MPC-HC patch with support for BD-J via dslibbluray

(For all info regarding dslibbluray itself, see http://forum.doom9.org/showthread.php?t=164314)

This is a patched MPC-HC I have been working on for the last few weeks that implements basic support for dslibbluray, which allows playing BluRay discs and menus just like they work on commercial BluRay players (aka BD-J). This is a very buggy alpha release, a POC only and not an actual everyday player. Use this for testing and development only - here be dragons. The main purpose of this patch is to help getting BD-J support pushed into mainline MPC-HC.

The code is based on MPC-HC 1.7.5. You can get the source code on my github (the relevant code is in the branch named "br", you can also take a look at my last few commits in that branch to see the actual patches required for dslibbluray to work within MPC-HC)

In order for this to work you must have dslibbluray and evrmixer r265 or newer registered and working. At the time of writing this, the latest compiled binaries on dslibbluray's sourceforge are not recent enough - therefore, I have compiled the patched mpc-hc together with the latest dslibbluray, and you can download them here. simply register the filters (via register*bit.bat) and use MPC-HC's "Open File" to open the index.bdmv of your bluray disc.

KNOWN BUGS\ISSUES:
Where do I start?
-movie audio may suddenly stop working (I suspect this has to do with my code not synchronizing the Direct3DDevice correctly)
-while playing, mouse clicks on the video frame will trigger MPC-HC's pause\play mechanism, which will pause ALL video (including BD-J menus, making them non-responsive)
-In MPC-HC's navigation menu, Prev\Next chapter are enabled but not implemented and thus may cause undefined behavior
-Additionally, "Title\Root\Subtitle\Whatever Menu" buttons will all lead to the title menu.
-Navigating through BD-J menus is slow and may stutter (this is especially noticeable on slow computers or in debug builds. I suspect this is caused by MPC's custom presenter not rendering ARGB input fast enough, as most modern filters output in NV12)
-Seeking is very clunky and may mess audio-video synchronization (again, especially on slow computers and debug builds. might be caused by dslibbluray's implementation of PlayAtTime)
-Seeking will completely mess the "You stopped playing at mm:ss last time, do you want to continue from there?" feature for bluray discs that support it (likely related to the PlayAtTime implementation).
-Crashes or stops working in many unhandled edge-cases (resetting the D3D display, seeking while another seek operation did not yet complete, seeking while in menus, etc.)

Short explanation of the relevant patches (for developers):
Implementing dslibbluray has 3 aspects in regards to the player's code:
1. Adding the custom EVR mixer (EVRMixer.dll) - this is not too complicated, see my patches to EVRAllocatorPresenter.cpp\.h. The catch is that when using EVRMixer, all Direct3DDevice calls must be synchronized via LockDevice. I have wrapped Paint() with the required locks, but there are probably more functions to wrap (this might be the cause of the audio issues I have noticed).
2.Rendering dslibbluray - super easy, see my change to CFGManager::EnumSourceFilters function in FGManager.cpp
3.Hooking in navigation, keyboard and seeking - this is where most of the trouble is. I have done a lot of nasty hacks to get this working (sort of), but an MPC-HC developer that is familiar with the codebase could probably do this in a much more elegant way (perhaps implement this on top of MPC's current dvds-with-menus infrastructure?). Most of the patches in MainFrm and FGManager are for this part.

Last edited by haha01haha01; 28th June 2014 at 17:55.
haha01haha01 is offline   Reply With Quote
Old 28th June 2014, 22:18   #2  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 4,893
it "works" with MadVR. the menu is not rendered but still can be used blindly.
if Madshi finds time to add support for the PG IG "stream" we get MadVR with Blu ray menu support
huhn is offline   Reply With Quote
Old 28th June 2014, 22:50   #3  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,352
Its probably easier and more flexible to implement OSD rendering using madVRs APIs in dslibbluray instead of relying on a custom EVR Mixer. But I suggested that months ago already.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 6th July 2014, 23:15   #4  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
The code inside dslibluray to control the mixer is literally a few lines. I am sure it could be swapped out with something else if needed. Someone could write some custom mixer that does the same that sits in between the filter and madVR. The 2nd pin needs to be able to render full frame rate over the main video. Overlays also still need to be able to render even when the main video pin is turned off. Bluray is a pain in the ass like that.
dukey is offline   Reply With Quote
Old 24th September 2014, 20:34   #5  |  Link
Joniii
Registered User
 
Join Date: Aug 2007
Posts: 284
Thanks for this, I hope it will be added to MPC-HC.
__________________

Windows 10 Pro with Media Center (2x DVB-C, 14TB HDD), MPC-HC (MadVR, LAV Filters, XySubFilter)
Sony Bravia 55XBR8/55X4500
Yamaha RX-V659
Yamaha Piano Black NS-777/555/C444/
Joniii is offline   Reply With Quote
Reply

Tags
bdj, bluray, libbluray, mpc, mpchc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.