At first I thought that the control point is what I want to program, however, after slipping through several documents through documents, it seems to me that the control point still wants to play media files on the server provides on the device, the control point It works using external ones (unlike the multimedia visualization tool, which plays the files themselves).
To be compatible with UPnP AV, software applications or hardware devices must include at least one UPnP AV device (MediaServer, ControlPoint, or MediaRenderer) and its required services. There are applications that provide multiple devices, so logical separation cannot be found in practice. Often video players only implement ControlPoint services to view the server and download its contents (content can even be hosted on another server).
I just need something that allows me to connect to the server, index the media lists, so that I can go to anything track, and just give me the ability to play, stop, pause, next, prev and control the volume. files must be played back server.
UPnP defines several Services that must be implemented by the device (for example, MediaServer must provide a DirectoryService). Each service has mandatory and optional actions (for example, DirectoryService can be viewed through the Browse method). To achieve what you want, your server must implement UPnP MediaServer (necessary to view its contents) and UPnP MediaRenderer (necessary to control playback). UPnP ControlPoint acts as a kind of remote control. It is used to view the server and select a server to play files.
The view request is as follows (ObjectID 0 always indicates the root of the tree):
<Browse xmlns:u =" urn:schemas-upnp-org:service:ContentDirectory:1 "> <ObjectID>0</ObjectID> <Filter></Filter> <RequestedCount>0</RequestedCount> <StartingIndex >0</StartingIndex> <SortCriteria ></ SortCriteria> <BrowseFlag> BrowseDirectChildren </BrowseFlag > </u:Browse>
The server responds with a response that might look like this:
<DIDL-Lite> <item id="1" parentID ="0" restricted ="1"> <upnp:class>object.item.videoItem </upnp:class> <dc:title>Video file</dc:title> <upnp:artist>John Doe</upnp:artist> <upnp:genre>Action</ upnp:genre> <upnp:director>John Doe Jr.</upnp:director> <res protocolInfo="http-get:*:video/mpeg:*" resolution ="352x288"> http://10.20.30.40:12345/ExportContent?id=1 </res> </item> </DIDL-Lite >
In this case, the server has only one video element (usually the server will have several folders containing many elements). The res element contains information about the resource itself (where it is located, which transport protocol should be used, type mime, ...). In your case, the server may even respond with "localhost" as the address, preventing the file from loading. The MediaRenderer part of your server should have access to it anyway.
I donβt remember all the libraries I came across, but they included frequently mentioned names such as Cling, Fraunhofer FOKUS and CyberLink.
Personally, I would recommend CyberLink for Java . I used it to implement MediaServer, however it offers enough to implement ControlPoint or MediaRenderer. In addition, you should get a UPnP developer tool, such as Developer Tools for UPnP (originally Intel UPnP Tools ) or GUPnP Tools for Linux . GUPnP also provides the UPnP library for C. These developer tools let you invoke and debug UPnP commands and come in handy during development. Another useful resource is UPnP device descriptions from the UPnP consortium.