How to display image from process plugin

Discussion in 'General Development (no feature request here!)' started by Shukuyen, May 25, 2011.

  1. Shukuyen
    • Premium Supporter

    Shukuyen Community Plugin Dev

    Joined:
    May 8, 2008
    Messages:
    557
    Likes Received:
    209
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Lake of Constance
    Ratings:
    +261 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Hi,

    I want to display an image (System.Drawing.Image) in MediaPortal triggered by a process plugin. Is there a way to do this, like I can play video files with g_Player? Or what other way can be used?

    Thanks,
    Shukuyen.


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    You can set a property with image filename and use <type>image</type> in the skin with that property in <texture> tag.

    If property is empty, picture is not visible and control.hasthumb(imageID) is false.
    If property contains valid filename, picture is shown and control.hasthumb(imageID) is true.
     
  4. Shukuyen
    • Premium Supporter

    Shukuyen Community Plugin Dev

    Joined:
    May 8, 2008
    Messages:
    557
    Likes Received:
    209
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Lake of Constance
    Ratings:
    +261 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Thanks for the answer, SilentException, but as I want to show this image from a process plugin I don't have a skin file?
     
  5. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Not sure what you are trying to do but to display an image you will need a window plugin and skin file. You can say set a skin property with the path to an image file but actually displaying the image needs a window plugin
     
  6. Shukuyen
    • Premium Supporter

    Shukuyen Community Plugin Dev

    Joined:
    May 8, 2008
    Messages:
    557
    Likes Received:
    209
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Lake of Constance
    Ratings:
    +261 / 0
    Home Country:
    Germany Germany
    Show System Specs
    I am trying to build an Air Play client (apples "streaming" brand) that can receive videos and images from iOS devices. You would push a "display on mediaportal" button on your iPhone and the image will appear on MediaPortal.

    I thought it would be good to do this as a process plugin so that it can listen for Air Play connections in the background and display / play content once it is initiated by the device. I don't need any GUI for this except when displaying the content ...
     
  7. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,469
    Likes Received:
    4,273
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,425 / 0
    Home Country:
    Australia Australia
    Just expose some skin properties and the skins can display the images etc.

    So you can have a property like #AirPlay.Active which evaluates to true|false, you can also also publish all your other fields as well and then skins can add overlay imports where they want to show it.
     
    • Like Like x 1
  8. Shukuyen
    • Premium Supporter

    Shukuyen Community Plugin Dev

    Joined:
    May 8, 2008
    Messages:
    557
    Likes Received:
    209
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Lake of Constance
    Ratings:
    +261 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Thanks Damien, that sounds like what I was looking for. Now I just have to find out how to pass a System.Drawing.Image to the GUIImage control - as far as I have seen this may not be possible, so I will probably have to save the image to disk first.

    To be honest, this skin stuff is really confusing ;-)
     
  9. mbuzina
    • Premium Supporter

    mbuzina Retired Team Member

    Joined:
    April 11, 2005
    Messages:
    2,839
    Likes Received:
    627
    Location:
    Germany
    Ratings:
    +723 / 4
    Home Country:
    Germany Germany
    Show System Specs
    Hi Shukuyen

    Great idea having an airplay client built in. I guess you would have to generate 2 plugins, one Process Plugin "Bonjour Listener" that would listen for AirPlay connections and a Window Plugin that would show the Airplay Content. This way you would not only be able to receive pictures, but also Video (and maybe Music).
     
  10. Shukuyen
    • Premium Supporter

    Shukuyen Community Plugin Dev

    Joined:
    May 8, 2008
    Messages:
    557
    Likes Received:
    209
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Lake of Constance
    Ratings:
    +261 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Hey mbuzina,

    I think it could work from a process plugin like ltfearme wrote. I can already receive images and videos but not yet display them (hopefully images will work soon, after the help I get here, for videos I will have to reuse the onlinevideos player stuff but it's hard if you don't know what you are doing :D).

    Music isn't included in the receiver class yet, it is streamed encrypted. There seems to be a reverse engineered private key to make music work, so maybe some time in the future ...

    I want to clean up the code a bit and maybe get images to work then I will upload the project to SVN. Maybe someone with more c#/mediaportal experience is willing to help with this :)
     
  11. hierl_w

    hierl_w Portal Member

    Joined:
    February 15, 2010
    Messages:
    30
    Likes Received:
    34
    Gender:
    Male
    Ratings:
    +34 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Hello guys,

    I have the same problem with showing pictures from the process plugin "MP Upnp Renderer".
    https://forum.team-mediaportal.com/...erer-process-plugin.104959/page-3#post-858917

    I don't want to make a extra window plugin + skin, If not necessary, because
    I have no skin know how & plugin can be used with every skin.

    Music and video is working fine from process plugin by activating any screen and playing the mediaUrl with gPlayer. But only the pictures I can't show correctly.

    Isn't it possible to show in fullscreenmode of the pictureviewer/slideshow?
    Like aktivate fullscreenwindow and set the picture from process plugin.

    Can anyone give me some code examle how to show the pictureUrl, please.
    Should I cache the picture before showing?

    Can I show the exifDialog in Fullscreen?

    Edit: Now It works by using the SlideshowWindow...

    bye,
    hierl_w
     
    Last edited: May 29, 2012
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!