EXP-ADDON-Add_Option_Disable_Internal_Bluray (1 Viewer)

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi :)
    This options can be usefull for testing but not only, if we are in case where Bluray Internal player failed, we can disable it until the issue is fixed.

    Known Issues:
    • Actual MP code always use internal player
    Testing Required:
    • Check/Uncheck the option in bluray section and see if all works.
    Attached bin (based on 1.3.0Beta) :)

    I also add a link to the branch on GitHub so that devs can get the code and try to help me directly.
    https://github.com/MediaPortal/MediaPortal-1/tree/EXP-ADDON-Add_Option_Disable_Internal_Bluray

    2012.12.28 : First Release Version

    2012.12.29 :
    • Update "Use Internal Blu-ray" option in GUISetting and on skin files (Default/DefaultWide/Titan).
    • Set by default Internal Blu-ray player (on fresh/upgrade when no setting exist).
    BD_Option_Config.JPG


    10-09-32.png
    10-10-26.png
     

    Attachments

    • ADDON-Add_Option_Disable_Internal_Bluray_v2.zip
      2.8 MB
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #2
    Updated first post with latest bin :)
    All can be setup from GUI without reboot MP.
     

    nicsergio

    MP Donator
  • Premium Supporter
  • April 27, 2010
    165
    159
    Home Country
    Italy Italy
    @Sebastiii, thanks for the work done with this ADDON.
    I've got several blu-ray movies, stored as ISO images and I wanted to use the plugin "Blu Ray Player Launcher", as I did with MP1.2.3, to use an external player only for BDs.
    I've installed the files you posted, I've deselected in configuration "Use internal blu ray player menu".
    The only difference I see is that no longer appears in the dialog screen that requires the chapter to play the movie, but it plays always with the internal MP player..
    With this add-on is only excluded the management of BD menu? Would be possible to exclude the internal player too?
    thanks
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #4
    This addons disable internal blu-ray (with selection of menu and chapter).
    To describe :
    In 1.3.0beta, we have :
    - internal blu-ray (Menu stuff)
    - native video player (in case on blu-ray, it will use LAV Splitter)

    "Blu Ray Player Launcher" need to override "native video player" to take the process. (like is doing BDHandler).
    :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #6
    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;
        }
      }
    }
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #8
    Not sure,

    I mean original BDH always override MP Internal player, so i assume that "Blu Ray Player Launcher" should/must do it with or without with option, that lead to the fact, this option should not be needed after all if "Blu Ray Player Launcher plugin" handle correctly the override.

    So this new code doesn't need change on 3rd party plugins. (the above code where i check it's to avoid to manually disable BDHandler when i want to use internal blu-ray (because original code always override MP).
    :p
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Not sure,

    I mean original BDH always override MP Internal player, so i assume that "Blu Ray Player Launcher" should/must do it with or without with option, that lead to the fact, this option should not be needed after all if "Blu Ray Player Launcher plugin" handle correctly the override.

    So this new code doesn't need change on 3rd party plugins. (the above code where i check it's to avoid to manually disable BDHandler when i want to use internal blu-ray (because original code always override MP).
    :p

    It could be that we did already break the compatibility in 1.3.0 alpha for the "Blu-ray Player Launcher". Don't ask from me how I did implement that plugin years ago - I have no clue what events it is listening about :)
     

    Users who are viewing this thread

    Top Bottom