PlayerManager and adding new players (1 Viewer)

sytone

Portal Member
April 17, 2013
49
70
103
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,070
    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
    103
    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,070
    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
    103
    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,070
    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

    I don't think so, because MP has no way of knowing at which timestamp the external player stopped playback. Best way to achieve this would be to use an auto-resume feature in your external player itself. (MPC-HC can do that, I don't know about VLC)
    I don't think so, because MP has no way of knowing at which timestamp the external player stopped playback. Best way to achieve...
    Hello Folks, Is it possible to enable MP to resume in an External Player, where it left off ? I guess the question also is, can...
    Replies
    2
    Views
    377
    Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
    Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
    I used to run the TVService under the "NT Service\TVService" account to follow least privileges principal (not exposing my whole...
    Replies
    3
    Views
    1K
    I haven't tested it. I use MP1, but sometimes I try to help with MP2 :).
    I haven't tested it. I use MP1, but sometimes I try to help with MP2 :).
    This happened immediately after my Windows 11 x64 monthly update for November. The update included also cumulative update to .NET...
    Replies
    9
    Views
    1K
    Your timing is great.....I just got home myself!! :) A little confusion for me here! There are 2 x files in the folder......one is x86, and other is x64 Wondering if I should be selecting the x64.....since I'm installing the 64bit version? UPDATE Transferred both files to the destination folder, and labelled appropriately. This way...
    Your timing is great.....I just got home myself!! :) A little confusion for me here! There are 2 x files in the folder......one is...
    Am a long time MP1 user, and have successfully been running the x64 version since it first appeared. Recently, problem of black...
    Replies
    10
    Views
    800
    After many hours of troubleshooting I've given up and accepted that it's just "one of these things" when using madVR for watching live TV. I've now ticked the box to "Use EVR for LiveTV", with a default display refresh rate of 50Hz. In combination with tweaking some of the Nvidia 3D settings for the MP executable only, I now have a...
    After many hours of troubleshooting I've given up and accepted that it's just "one of these things" when using madVR for watching...
    Every so often, when I switch to a TV channel, my MP client stops accepting user inputs, either from the remote or keyboard/mouse...
    Replies
    30
    Views
    5K
    Top Bottom