PlayerManager and adding new players (1 Viewer)

sytone

Portal Member
April 17, 2013
49
70
102
Home Country
Barbados Barbados
Any details on the player manager service and adding new players?
 

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I moved your question into a new thread so we can focus on this topic.

    First, the best source for information is the source code of MP2. If you check here: https://github.com/MediaPortal/Medi...tal.UI/Presentation/Players/IPlayerManager.cs you'll find all methods commented.

    If you plan to add new players, this can be done by plugins. We are using the much: OnlineVideos, SlimTV, Cinema plugin, all provide own players (mostly derived from inbuilt players and extending them for new features or "linking" them to plugins).

    I'll will collect more information about examples and post them here.

    What parts you are interested in?
     

    sytone

    Portal Member
    April 17, 2013
    49
    70
    102
    Home Country
    Barbados Barbados
    So I have embedded the Silverlight player for Netflix in v1 in a hacky way and wanted to see what alternatives there are and if I can use that as a interface so system events can be hooked in better.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Ok, this requires a bit more brainstorming :)

    Can you please post a link to the MP1-way? I need to get an idea first how it works.
     

    sytone

    Portal Member
    April 17, 2013
    49
    70
    102
    Home Country
    Barbados Barbados
    So I am currently creating WebBrowser control and wrapping calls from MP and translating them to the sliverlight control in the page. This is hacky as I have added the WebBrowser to the forms Controls collection and I am intercepting calls to the window to add/remove it. I also have to do PInvokes to stop the control from eating all command sent to it as JavaScript/IE/Silverlight eat any keyboard commands, I have to refocus to the Media portal window.

    I have considered looking at ISilverlightViewer to host natively but not had time and was wondering if I can use the player framework so it was more native for MP. If I do this however I think I will have to deal with the rendering of the hosted instance.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I can explain how current video players work:

    Video Player uses DirectShow to playback a file/stream. Its output video frames are "captured" by a custom EvrPresenter, it does a callback to pass the video frame back to MP2. This frame is than used by VideoBrush to be painted in controls (fullscreen background or simple rectangle).

    So the chain is:
    DirectShow --> EvrPresenter --> Video Surface --> VideoBrush --> Rendering.

    I'm not sure if such a chain (or shorter) could work for WebBrowsers. But i.e. if you get a bitmap of the rendered screen, you could use this the same way like the video surface in my example above.

    Another way would be to let the plugin run like in MP2, bypassing the player system an using a screen that shows WebBrowser in "fullscreen" (or how you like it).

    It's an interesting topic for me, so I appreciate any work on this :)
     

    Users who are viewing this thread

    Similar threads

    MP1 MP2 MP2 - V2.5 Thumbnail issue DE
    Thumbnail issue resolved: I understand that the problems related to the creation of thumbnails are quite common and also happened to me. Here the solution to my problem: MP2/Settings/Media Library/Film Import Settings/FanArt offline caching here it is important to select the location where TV recordings are stored. In my case, the...
    Thumbnail issue resolved: I understand that the problems related to the creation of thumbnails are quite common and also happened...
    There seems to be an issue how MP2 is displaying TV recordings depending on whether the media source is on a local hard drive or a...
    Replies
    1
    Views
    887
    • Sticky
    @high strange tag, 1.36/1.37 ;)
    @high strange tag, 1.36/1.37 ;)
    We have just released MediaPortal 1.37 - Willow x86 and x64 version. Highlights of this release Bugfixes: [MP1-5232] - GPU...
    Replies
    3
    Views
    288
    • Sticky
    Upgrade install on MP 1.36 x64 proceeded without issue, everything I have tried so far is working and looking very good. Many Thanks(y):)
    Upgrade install on MP 1.36 x64 proceeded without issue, everything I have tried so far is working and looking very good. Many...
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the...
    Replies
    1
    Views
    422
    Playing audio cd's keeps stopping at random in the middle of songs. It can happen on the first song or sometimes after a few songs have played. If I press Next, it will start playing the next song. This happens with BASS and Wasapi players. It does not happen if I use Internal dshow player (which doesn't sound as good as either of...
    Playing audio cd's keeps stopping at random in the middle of songs. It can happen on the first song or sometimes after a few songs...
    Playing audio cd's keeps stopping at random in the middle of songs. It can happen on the first song or sometimes after a few songs...
    Replies
    0
    Views
    880
    Nice you could resolve the issue!
    Nice you could resolve the issue!
    I have MediaPortal 2.5 Server installed on one computer and Mediaportal 2.5 client on another. The client is connected to the...
    Replies
    6
    Views
    1K
    Top Bottom