Developers Notes on UPnP

From MythTV Official Wiki
Revision as of 03:43, 12 August 2010 by MythMike (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A v1.0 compliant UPnP AV MediaServer was implemented in MythTV CVS on June 6th, 2006 by dblain, (for more specific MythTV code information see [10118]). UPnP in MythTV is still a work in progress. There is a lot of work left to get a totally compliant implementation. And as there are so many aspects (and potential) to UPnP feel free to help out in adding new UPnP features, (or improve the existing functions, like make the UPnP AV MediaServer in MythTV UPnP AV v2.0 compliant by the new UPnP AV v2 specifications, see upnp.org). Note that one nice thing about the UPnP standards it is extendable by design, meaning each UPnP product can have value-added services layered on top of the basic device architecture by the individual manufacturers.

UPnP (Universal Plug and Play) is a set of royalty-free computer network protocols from the UPnP Forum. UPnP is built upon open, internet-based communication standards such as SSDP, HTTP, XML, SOAP, etc. (which means that any developer/programmer can make a device or software for any operating-system/platform in any programming-language by following the UPnP standards and it should automatically be compatible with all other UPnP devices). UPnP achieves this by defining and publishing UPnP device control protocols (also called profiles). One profile called UPnP Gateway is what routers implements to let computers automatically discover them or even control them by opening/closing ports on a firewall for example. Another profile which is not to be confused with the previous one is UPnP AV (for audio/video) which defines a set of functionalities to share/control and render content on a local network. There are typically three types of devices in UPnP AV (Audio/Video); a MediaServer which is a 'slave' device which sole purpose is to share content, a MediaRenderer which is a 'slave' device that can render content, and a UPnP MediaServer ControlPoint which is the 'master' that can detect/find UPnP MediaServers and control them (browse). UPnP MediaServers ControlPoint is not an actual UPnP device as it cannot be detected by other UPnP devices. A UPnP MediaRenderer ControlPoint is the 'master' that can detect/find and control UPnP MediaRenderers. A DMP (Digital Media Player) only implements a UPnP MediaServer ControlPoint. The UPnP architecture supports zero-configuration, invisible networking and automatic discovery for a breadth of device categories from a wide range of vendors, whereby a device can dynamically join a network, obtain an IP address, announce its name, convey its capabilities upon request, and learn about the presence and capabilities of other devices. DHCP and DNS servers are optional and are only used if they are available on the network. A device can leave a network smoothly and automatically without leaving any unwanted state information behind.

The current MythTV UPnP AV MediaServer implementation was written from the ground up as an integrated part of mythbackend. The code is extensible and capable of being used for any UPnP applicable service. Another option, if you are a C/C++ programmer and like to add a UPnP MediaServer ControlPoint / UPnP-client (or other UPnP features) to use MythTV then you should also checkout an GPL licenced alternative, like; uShare, and the Platinum UPnP SDK, available on SourceForge.net is a free and open source software development kit (under the GPL licence) that lets you easily create a UPnP MediaServer, MediaRenderer or Contol Point. You should also visit the official UPnP™ Forum, also, other good links for developers can be found at the bottom of the UPnP article on Wikipedia.

  • The UPnP AV (UPnP = Universal Plug and Play Protocol, and AV = Audio/Video) standard is a collection of connectivity and communication protocols, a few of which would suit MythTV:
    • UPnP MediaServer DCP - which is the UPnP-server (a 'slave' device) that share/stream media-data (like audio/video/picture/files) to UPnP-clients on the network).
    • UPnP MediaServer ControlPoint - which is the UPnP-client (a 'master' device) that can auto-detect UPnP-servers on the network to browse and stream media/data-files from them.
    • UPnP Remote User Interface (RUI) client/server - which sends/recieves control-commands beween the UPnP-client and UPnP-server over network, (like record, schedule, play, pause, stop, etc.).
    • UPnP MediaRenderer DCP - which is a 'slave' device that can render content.
    • UPnP RenderingControl DCP - control MediaRenderer settings; volume, brightness, RGB, sharpness...).

UPnP is the future of networked entertainment and are leading the way to an interconnected lifestyle. The UPnP™ Forum currently consists of over 800 members (which consists of vendors, industry leaders in consumer electronics, computing, home automation, home security, appliances, printing, photography, computer networking, and mobile products), including companies such as Microsoft, Intel, AMD, Adobe, Belkin, Cisco, LinkSys, D-Link, 3com, Fujitsu, IBM, NEC, and RealNetworks. UPnP Forum membership is free.

Much information about compatibility can be found on the Digital Living Network Alliance (DLNA) website. DLNA is a specification that allows the sharing of music, photo, and video files over the home network, between different consumer electronics and PC products. The DLNA, like the UPnP Forum, consists of vendors, industry leaders in consumer electronics, etc. Their goal make sure different UPnP devices work together without problem, they feature a "DLNA CERTIFIED™" certificate for products that have passed their interoperability testing standards, that includes guidelines which should be followed when making a UPnP device. DLNA membership is free.

PS! Feature request to any willing developers out there; "UPnP Remote User Interface Client (UPnP RUI)" support in both MythTV back-end and front-end, so that both the MythTV front-end and other UPnP-clients which also support the "UPnP Remote User Interface Server (UPnP RUI)" protocol could use it to fully control MythTV back-end using the same standard, such as HTPC applications like SnapStream BeyondTV (and possible MediaPortal in the future) and other PVR softwares/devices, (control functions and commands such as record, schedule, play, pay, stop, fast-forward, etc.)

External Links