UPnP / DLNA Media Server for MediaPortal 2 (1 Viewer)

Albert

MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    Thanks hafblade. Which software did you use to watch the media library via UPnP? Is that software DLNA compatible?
     

    hafblade

    Portal Pro
    January 19, 2011
    675
    290
    Trier, Germany
    Home Country
    Germany Germany
    Hi tried it with:
    Windows Media Player
    Android Bubble UPNP App
    Android Fritz Media App
    Noname WLAN Radio

    On all these products standard UPNP servers like Twonky and Windows Media Player work without problems.

    All of these DON'T have DLNA but UPNP.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    hmm, unfortunately it seems the McGoober is gone, he was last online here on 29.03.2012 :(

    Maybe someone else picks up the plugin code and continues this great work?
     

    hafblade

    Portal Pro
    January 19, 2011
    675
    290
    Trier, Germany
    Home Country
    Germany Germany
    hmmm to bad perhaps I should finally start trying to code in visual studio instead of in eclipse java ... :p why did someone invent the time??? *hmpf*
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    I have been trying to continue working on this, but I have found a few problems:
    1. BOM (Byte Order Mask) is used on UTF8 encoding used by UPnPServer:HandleHTTPRequest_Nolock streamwriter. The BOM will cause errors on many clients that use a text based parser. As I understand it the BOM is unnecessary for UTF8 anyway and it can be avoid by by doing: encoding = UTF8Encoding(false);
    2. Not possible to add additional namespaces to the root device description in DvDevice:BuildRootDeviceDescription. This is necessary to fully support Samsung DLNA used on the TV.
    3. To support different DLNA TV clients at once it is sometimes necessary to have different device descriptors depending on the requirements of the client. This is currently not possible if I understand the code correctly.
    4. To make it possible to detect what kind of client (XBox, PS3, TV etc.) is connecting it is sometimes needed to know the device descriptor of the client. Is this currently possible? Or do we need a way to do a M-SEARCH over UPnP to detect it? Other times the HTTP header is needed but this I already have access to I believe.
    5. Also when streaming the file using SendWholeFile I have a problem stopping the streaming when the client disconnects. I see no way to detect that the client disconnected. Any suggestions?

    I am a beginner when it comes to programming for MediaPortal so I apologize for any stupid questions. ;)
    Also I have no experience with UPnP or DLNA, so I need to learn on the go if necessary...
     
    Last edited:

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    1, 2 will be added soon.
    3 - what does that mean exactly? At which part of the code do you need enhancements?
    4 - Are you talking about the server/device side? The UPnP "client" = control point doesn't have a device descriptor so it isn't possible to know the "device descriptor of the client"... What exactly do you need?
    5 - Here I also need more information about what you're doing. Actually, UPnP is a stateless protocol so you don't get the information at the server/device that a client disconnected. If you need that information, try creating a device for the client also, and connect the server with that client device, like we do in MP2 (client connects to server, server connects to client, both offer a UPnP device)
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    1,2 Great
    3. In DvDevice:AddDeviceDescriptionsRecursive the _deviceInformation needs to be override-able because for one device requires a specific friendlyName while another device requires a specific manufacturer for example, before they accept the media server.
    4. As I understand it some TV's support M-SEARCH requests that will inform the server of their friendlyName, manufacturer and other device information. To detect what type of TV is connected it is sometimes needed to get the TV's device information (basically the TV's ILocalizedDeviceInformation).
    5. I believe the resource server is responsible for streaming and that it is using the connection based HTTP protocol right? So when the device disconnects the socket connection to the resource server (basically it stops playing the stream), the server continues streaming the file because I don't seem to be able to detect this. This of course causes an exception inside the SendWholeFile method but as it is handled I will not be able to detect this.
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    I'm not absolutely sure if you're using the terms correctly. DEVICE is a fixed term in the UPnP conceptual field.
    In a UPnP connection, the two roles "server" and "client" have fixed names, the server is the "device" and the client is the "control point".
    A computer/program can have both roles, like our MP2 server, which is a device (providing the content directory and other services) and which is also a control point (it also connects to its MP2 clients).

    If you say "when the device disconnects", that would mean that the UPnP server disconnects. But normally, a client disconnects, not the server... I don't understand what you mean, for all points 3-5. Can it be that you're mis-using the term "device"?
     

    Users who are viewing this thread

    Top Bottom