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
Register FAQ Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
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
 

Tags
bdj, bluray, libbluray, mpc, mpchc


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 19:13.


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