Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>At first, I thought that a control point is what I want to program, however, after skimming through the docs of a few libraries, it appears to me that a control point still wants to play the media files the server provides on the very device, the control point runs on, using external software (unlike the media renderer, that plays the files itself).</p> </blockquote> <p>To be compatible with UPnP AV, software applications or hardware devices have to include at least one UPnP AV device (MediaServer, ControlPoint or MediaRenderer) and its mandatory services. There are applications providing several devices, thus, the logical separation may not be found in practice. Often, video players only implement the ControlPoint services for browsing a server and downloading its content (the content could be located even on another server).</p> <blockquote> <p>I'd simply need something that lets me connect to a server, index the media listings so I can jump to whatever track and the only give me the possibility to play, stop, pause, next, prev and control the volume. The files however should be played back serverside.</p> </blockquote> <p>UPnP defines several Services that have to be implemented by a device (e.g., a MediaServer has to provide a DirectoryService). Every service has mandatory and optional actions (e.g., a DirectoryService can be browsed via the <code>Browse</code> method). To achieve what you want, your server has to implement a UPnP MediaServer (needed for browsing its content) and a UPnP MediaRenderer (needed to control the playback). A UPnP ControlPoint acts as a kind of remote control. It is used to browse the server and select the server for playing back files.</p> <p>A browse request looks like this (ObjectID 0 always denotes the root of the tree):</p> <pre><code>&lt;Browse xmlns:u =" urn:schemas-upnp-org:service:ContentDirectory:1 "&gt; &lt;ObjectID&gt;0&lt;/ObjectID&gt; &lt;Filter&gt;&lt;/Filter&gt; &lt;RequestedCount&gt;0&lt;/RequestedCount&gt; &lt;StartingIndex &gt;0&lt;/StartingIndex&gt; &lt;SortCriteria &gt;&lt;/ SortCriteria&gt; &lt;BrowseFlag&gt; BrowseDirectChildren &lt;/BrowseFlag &gt; &lt;/u:Browse&gt; </code></pre> <p>The server answers with a response that could look like this:</p> <pre><code>&lt;DIDL-Lite&gt; &lt;item id="1" parentID ="0" restricted ="1"&gt; &lt;upnp:class&gt;object.item.videoItem &lt;/upnp:class&gt; &lt;dc:title&gt;Video file&lt;/dc:title&gt; &lt;upnp:artist&gt;John Doe&lt;/upnp:artist&gt; &lt;upnp:genre&gt;Action&lt;/ upnp:genre&gt; &lt;upnp:director&gt;John Doe Jr.&lt;/upnp:director&gt; &lt;res protocolInfo="http-get:*:video/mpeg:*" resolution ="352x288"&gt; http://10.20.30.40:12345/ExportContent?id=1 &lt;/res&gt; &lt;/item&gt; &lt;/DIDL-Lite &gt; </code></pre> <p>In this case, the server only has one video item (usually, the server will have several folders containing many items). The <code>res</code> element contains information about the resource itself (where it is located, which transport protocol has to be used, the mime type,...). In your case, the server could even answer with "localhost" as address, preventing downloading the file. The MediaRenderer part of your server should be able to access it anyway.</p> <blockquote> <p>I don't remember all the libraries I came across, but they included often mentioned names such as Cling, Fraunhofer FOKUS and CyberLink.</p> </blockquote> <p>Personally, I would recommend <a href="http://www.cybergarage.org/twiki/bin/view/Main/CyberLinkForJava" rel="nofollow">CyberLink for Java</a>. I used it to implement a MediaServer, however it offers enough to implement a ControlPoint or MediaRenderer too. Additionally, you should get a UPnP developer tool such as <a href="http://opentools.homeip.net/dev-tools-for-upnp" rel="nofollow">Developer tools for UPnP (originally Intel UPnP tools)</a> or the <a href="http://gupnp.org/" rel="nofollow">GUPnP tools for Linux</a>. GUPnP also provides a UPnP library for C. These developer tools allow you to invoke and debug UPnP commands and come very handy during development. Another useful resource are the <a href="http://upnp.org/sdcps-and-certification/standards/sdcps/" rel="nofollow">UPnP device descriptions</a> from the UPnP consortium.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks a lot for your detailed answer. I am going to use foobar2000 for my media server + renderer so that side should be covered. I already tried the Developer Tools and could control foobar's playback with them. To clear things up, this is a university project and in the end I should be able to control a media server/renderer with gestures, using a Kinect. The Kinect tools I should use only run in windows hence I thought I'd best create the UPnP-CP in windows too.
      singulars
    2. COHowever, instead of using a UPnP-library, my Prof suggested something else. I should just control foobar2000 with an already existing remote control and just sniff the traffic they're exchanging with Wireshark or something. He thought that I could then simply program something that creates and sends the XML files that are similar to those I sniffed. I haven't tried that thoroughly so far but all the results I got where hard to interpret. I should mention that I still don't know UPnP well at all and I think my prof doesn't know it that well either.
      singulars
    3. COSo would you recommend to use an already existing library that creates the stack yet probably has a higher learning curve or is the idea to just write it out myself better? I'd only need commands like play, pause, next, prev. However, as you mentioned that all UPnP devices have to implement several services, I think that would be rather difficult then?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload