{
  "id": 22648755,
  "title": "A DLNA control point in Kotlin: discovery and eight SOAP actions",
  "url": "https://urgent.news/2026/11/29/a-dlna-control-point-in-kotlin-discovery-and-eight-soap-actions",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-29T20:00:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/yonto/a-dlna-control-point-in-kotlin-discovery-and-eight-soap-actions-4ghb"
  },
  "original_language": null,
  "account": "In Yonto Player for Android, a DLNA control point is implemented in Kotlin on the sender side, responsible for discovery and eight SOAP actions. The protocol code is written in plain Kotlin and integrated into the app's HTTP transport, with only the UDP search itself relying on the Android libraries.\n\nTo find a renderer, the control point sends an SSDP (Simple Service Discovery Protocol) request to the multicast group (port 1900) and listens for unicast answers. The request, known as an M-SEARCH, includes the UPnP standard defined values and is sent twice due to potential UDP packet loss. The renderers respond unicast to the socket that initially requested the discovery, and the datagrams are only retrieved if the host matches the originating address.\n\nUpon receiving the device description, the control point reads it once per location, checking if the host matches the originating address. The description is then used to identify the renderer, obtain its UDN (Unique Device Name), and control URLs for specific services such as AVTransport (for playing videos) and ConnectionManager (for managing connections and available media types).\n\nThe control point supports eight SOAP actions, including SetAVTransportURI, which sets the address of the video to play; Play, Pause, Stop, and Seek for controlling playback; GetTransportInfo for obtaining the current playback state; GetPositionInfo for retrieving the current position and duration of the video; and GetProtocolInfo for obtaining a list of supported media types. The CurrentURIMetaData field provides a small DIDL-Lite item, containing information such as the video title, class, and media type.\n\nFor sending the video, the control point relies on the renderer to fetch the file from the server using an HTTP address. If the renderer does not support a specific container format, the control point handles the re-encoding of the file based on the renderer's requirements. The control point also maintains a mapping of media container spellings to the correct formats supported by the renderer.\n\nFinally, the control point uses polling to monitor playback state, position, and duration. This is achieved by sending GetTransportInfo and GetPositionInfo SOAP requests approximately once per second while a session is active. This polling mechanism, lacking the event-driven GENA mechanism, allows for efficient monitoring of the playback session on the local network.",
  "summary": "When you press Cast in Yonto Player on an Android phone, one of the sections in the picker is DLNA: TVs, Kodi boxes and AV receivers that take a video address and play it. DLNA is UPnP underneath, and for a sender that means UDP multicast, a couple of XML documents and a handful of HTTP POSTs. This post is about the sender side, what UPnP calls a control point, and how I wrote ours in Kotlin. Why…",
  "summary_source": "publisher",
  "key_points": [
    "Kotlin implementation of DLNA control point in Yonto Player for Android",
    "SSDP M-SEARCH requests sent twice for potential UDP packet loss"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}