home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Area 51 - Testing Area
EXP-ADDON-Add_Option_Disable_Internal_Bluray
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Sebastiii" data-source="post: 951811" data-attributes="member: 60104"><p>It's here for BDHandler (the override part that start "GetBlurayPlayer();" or let MP to start on his side.</p><p> </p><p>[CODE]using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.IO;</p><p>using MediaPortal.Player;</p><p>using MediaPortal.GUI.Library;</p><p>using MediaPortal.Plugins.BDHandler.Player;</p><p>using MediaPortal.Profile;</p><p> </p><p>namespace MediaPortal.Plugins.BDHandler</p><p>{</p><p> </p><p> public class FactoryWrapper : IPlayerFactory</p><p> {</p><p> IPlayerFactory defaultPlayerFactory;</p><p> </p><p> public FactoryWrapper(IPlayerFactory factory)</p><p> {</p><p> this.defaultPlayerFactory = factory;</p><p> }</p><p> </p><p> public IPlayerFactory GetDefaultFactory()</p><p> {</p><p> return this.defaultPlayerFactory;</p><p> }</p><p> </p><p> public IPlayer Create(string filename)</p><p> {</p><p> return Create(filename, g_Player.MediaType.Video);</p><p> }</p><p> </p><p> public IPlayer Create(string filename, g_Player.MediaType type)</p><p> {</p><p> using (Settings xmlreader = new MPSettings())</p><p> {</p><p> bool BDInternalMenu = xmlreader.GetValueAsBool("bdplayer", "useInternalBDMenu", true);</p><p> </p><p> if (!BDInternalMenu)</p><p> {</p><p> string filepath = filename.ToLowerInvariant();</p><p> </p><p> if (filepath.Length < 4)</p><p> {</p><p> string discPath = Path.Combine(filepath, @"BDMV\index.bdmv");</p><p> if (File.Exists(discPath))</p><p> {</p><p> return GetBlurayPlayer();</p><p> }</p><p> }</p><p> </p><p> if (filepath.EndsWith(".mpls") || filepath.EndsWith(".bdmv") || (filepath.Contains(@"bdmv\stream") && filepath.EndsWith(".m2ts")))</p><p> {</p><p> return GetBlurayPlayer();</p><p> }</p><p> </p><p> return this.defaultPlayerFactory.Create(filename, type);</p><p> }</p><p> else</p><p> {</p><p> return this.defaultPlayerFactory.Create(filename, type);</p><p> }</p><p> }</p><p> }</p><p> </p><p> public static BDPlayer GetBlurayPlayer()</p><p> {</p><p> BDPlayer player = new BDPlayer();</p><p> player.SourceFilter = BDHandlerCore.Filter;</p><p> return player;</p><p> }</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="Sebastiii, post: 951811, member: 60104"] It's here for BDHandler (the override part that start "GetBlurayPlayer();" or let MP to start on his side. [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using MediaPortal.Player; using MediaPortal.GUI.Library; using MediaPortal.Plugins.BDHandler.Player; using MediaPortal.Profile; namespace MediaPortal.Plugins.BDHandler { public class FactoryWrapper : IPlayerFactory { IPlayerFactory defaultPlayerFactory; public FactoryWrapper(IPlayerFactory factory) { this.defaultPlayerFactory = factory; } public IPlayerFactory GetDefaultFactory() { return this.defaultPlayerFactory; } public IPlayer Create(string filename) { return Create(filename, g_Player.MediaType.Video); } public IPlayer Create(string filename, g_Player.MediaType type) { using (Settings xmlreader = new MPSettings()) { bool BDInternalMenu = xmlreader.GetValueAsBool("bdplayer", "useInternalBDMenu", true); if (!BDInternalMenu) { string filepath = filename.ToLowerInvariant(); if (filepath.Length < 4) { string discPath = Path.Combine(filepath, @"BDMV\index.bdmv"); if (File.Exists(discPath)) { return GetBlurayPlayer(); } } if (filepath.EndsWith(".mpls") || filepath.EndsWith(".bdmv") || (filepath.Contains(@"bdmv\stream") && filepath.EndsWith(".m2ts"))) { return GetBlurayPlayer(); } return this.defaultPlayerFactory.Create(filename, type); } else { return this.defaultPlayerFactory.Create(filename, type); } } } public static BDPlayer GetBlurayPlayer() { BDPlayer player = new BDPlayer(); player.SourceFilter = BDHandlerCore.Filter; return player; } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Area 51 - Testing Area
EXP-ADDON-Add_Option_Disable_Internal_Bluray
Contact us
RSS
Top
Bottom