Inter-Plugin messages (1 Viewer)

The_Keymaker

Portal Member
February 11, 2014
18
2
60
Home Country
United States of America United States of America
Hello,

I am new to MediaPortal but I have coding experience. I've previously (and currently) write my own plugins for MeediOS.

I am considering using Mediaportal and would like to write some plugins. One characteristic of MeediOS was that it had a messaging system whereby the plugins and the MeediOS framework could send messages that other plugins and the framework could 'subscribe' to and receive.

Is there a similar messaging feature in MediaPortal? If not, is it possible for plugins to communicate with and pass data to and from each other?

Thanks!
 

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    MediaPortal 2 has a fully featured messaging system that can be used by any plugin. So if you like to develop plugins you should consider to look into MP2, as it is the future... (IMHO)

    Edit: some related quote from another thread:
    @morpheus_xx, can you provide me some code examples, or places to look and I can grab the source tree from git? What are you using for MQ?
    MP2 has two MQ implementation: Synchronous- and AsynchronousMessageQueue ("AMQ"):
    https://github.com/MediaPortal/Medi....Common/Messaging/AsynchronousMessageQueue.cs
    (see folder https://github.com/MediaPortal/Medi...rtal/Source/Core/MediaPortal.Common/Messaging for related classes)

    And this are some few examples for wrapping messages and access to the AMQ:
    https://github.com/MediaPortal/Medi.../MediaManagement/ContentDirectoryMessaging.cs
    https://github.com/MediaPortal/Medi...on/MediaManagement/ImporterWorkerMessaging.cs

    And one of the many examples how messages are received and handled:
    https://github.com/MediaPortal/Medi...ts/Media/Models/ShowPlaylistModel.cs#L95-L142

    I hope this gives you a first overview. (A)MQs are very widely used inside MP2 and provide a great flexibility.
     

    The_Keymaker

    Portal Member
    February 11, 2014
    18
    2
    60
    Home Country
    United States of America United States of America
    @morpheus_xx,

    Thank you very much. The links were very helpful, especially the ShowPlayListModel.cs and the ContentDirectoryMessaging.cs.

    Is there a MP2 plugin tutorial similar to the one here for MP1?

    If not can you point me to a VERY simple MP2 plugin so that I may see how to get started?

    Thanks again in advance!
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom