Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
ISO/IEC 29341-3-3:2011 defines the UPnP MediaServer:3 device template, a cornerstone of the Universal Plug and Play Audio/Video architecture. This standard specifies how a media server device discovers, browses, and transfers digital media content across a home network. The MediaServer:3 device encapsulates three core services: the Content Directory Service (CDS) for organizing and navigating media items, the Connection Manager Service (CMS) for managing data transport between devices, and the Audio/Video Transport Service (AVT) for controlling playback of individual media streams.
From an engineering perspective, the MediaServer:3 device is designed around a push-model architecture where the server publishes its capabilities and content hierarchy through standardized UPnP actions. Control points (clients) invoke actions on the server to browse containers, search for items, and initiate transfers. The standard mandates support for key state variables including ContainerUpdateIDs, TransferIDs, and ArgumentType, which collectively enable robust session management.
The CDS is the heart of the MediaServer. It exposes a hierarchical tree of containers and items, similar to a filesystem. Each object carries metadata including Dublin Core properties (title, creator, date), UPnF-specific properties (class, protocol info), and resource references (bitrate, resolution, duration). The Browse() action supports both direct child enumeration and deep metadata retrieval, while Search() enables query-by-filter using a subset of the DIDL-Lite XML schema.
Browse() action’s Filter argument allows clients to request only the metadata fields they need. This dramatically reduces XML payload size — a critical optimization for bandwidth-constrained networks like powerline or Wi-Fi.The CMS manages the data plane between the media server and renderer. It maintains a list of active connections, each identified by a ConnectionID. The PrepareForConnection() action allocates resources before a transfer begins, while GetCurrentConnectionInfo() returns the transport protocol and delivery state. The CMS also exposes GetProtocolInfo() so control points can negotiate mutually supported transport protocols (HTTP GET, RTSP, RTP).
| State Variable | Type | Description |
|---|---|---|
| ProtocolInfo | string (CSV) | Comma-separated list of supported protocols (e.g., http-get:*:audio/mpeg:*) |
| CurrentConnectionIDs | string | List of active connection identifiers |
| SourceProtocolInfo | string | Protocols the media server can originate |
| SinkProtocolInfo | string | Protocols the media server can receive |
The AVT controls the playback state of individual transport streams. Its state machine includes STOPPED, PLAYING, PAUSED, TRANSITIONING, and NO_MEDIA_PRESENT. Actions like Play(), Pause(), Stop(), Seek(), and Next()/Previous() map directly to media player controls. The GetPositionInfo() and GetTransportInfo() queries report playback progress in real time.
Seek() actions during TRANSITIONING state can produce undefined behavior. Production implementations must serialize seek requests through a mutex-guarded command queue, checking CurrentTransportState before dispatching any transport action.When implementing an ISO/IEC 29341-3-3 compliant media server, engineers should pay close attention to eventing architecture. The MediaServer uses UPnP General Event Notification Architecture (GENA) to push state changes to subscribed control points. The LastChange event variable in the AVT service aggregates all transport state transitions into a single XML document, reducing network chatter. For embedded devices with limited memory, consider a two-thread architecture: a low-priority event subscription manager and a high-priority transport engine.
Another critical consideration is the TransferIDs state variable in the CMS. Each transfer must be tracked with a unique 4-byte integer identifier, and the server must garbage-collect completed transfers to avoid ID exhaustion. A circular buffer of 256 entries is sufficient for most residential use cases. Additionally, the CMS protocol negotiation must handle MIME-type wildcards — a common source of interoperability failures between different vendor implementations.
ProtocolInfo to include rtsp:*:*:* and use the AVT’s Seek() action with rel_time for live stream buffer control.ConnectionIDs. Each client session is independent, but the total number of concurrent connections is implementation-defined. A typical residential server supports 4-8 concurrent connections. Exceeding this limit causes PrepareForConnection() to return an error code.