Search code examples
mediaupnpdlna

Can DLNA Media Renderer also act as a controller as well?


I am little confused in this regard. I stream Youtube Video from my android phone (using a controller app called AllConnect) to my TV (renderer). During the playback, I can see the progress bar on the app being updated and I am able to seek in the time. Till here, I understand everything which is; My phone has discovered a DLNA renderer (TV) and is "pushing" the content to it.

Things start getting confusing, when I am also able to seek the content using my TV's remote, by pressing the back & forward buttons, which I guess seeks by +-10 secs. How does this flow work ?? and the app is also aware of the seeks performed by the TV remote as the progress bar on the app moves accordingly.

Following are the specs on my TV:

1) RemoteControlReceiver.xml

<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:sec="http://www.sec.co.kr/dlna" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:samsung.com:device:RemoteControlReceiver:1</deviceType>
<friendlyName>[TV]UA32D5000</friendlyName>
<manufacturer>Samsung Electronics</manufacturer>
<manufacturerURL>http://www.samsung.com/sec</manufacturerURL>
<modelDescription>Samsung TV RCR</modelDescription>
<modelName>UA32D5000</modelName>
<modelNumber>1.0</modelNumber>
<modelURL>http://www.samsung.com/sec</modelURL>
<serialNumber>20090804RCR</serialNumber>
<UDN>uuid:9aaf1aa7-b2c9-f9d5-6b21-2df55015c03a</UDN>
<sec:deviceID>BDCISIPC2MN3M</sec:deviceID>
<serviceList>
<service>
<serviceType>urn:samsung.com:service:TestRCRService:1</serviceType>
<serviceId>urn:samsung.com:serviceId:TestRCRService</serviceId>
<controlURL>/RCR/control/TestRCRService</controlURL>
<eventSubURL>/RCR/event/TestRCRService</eventSubURL>
<SCPDURL>TestRCRService.xml</SCPDURL>
</service>
</serviceList>
</device>
</root>

2) PersonalMessageReceiver.xml

<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:sec="http://www.sec.co.kr/dlna">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:samsung.com:device:PersonalMessageReceiver:1</deviceType>
<friendlyName>[TV]UA32D5000</friendlyName>
<manufacturer>Samsung Electronics</manufacturer>
<manufacturerURL>http://www.samsung.com/sec</manufacturerURL>
<modelDescription>Samsung TV PMR</modelDescription>
<modelName>UA32D5000</modelName>
<modelNumber>1.0</modelNumber>
<modelURL>http://www.samsung.com/sec</modelURL>
<serialNumber>20081224PMR</serialNumber>
<UDN>uuid:fc866c7a-5ace-8368-600f-711705796dd8</UDN>
<sec:deviceID>BDCISIPC2MN3M</sec:deviceID>
<iconList>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/pmr/icon_SML.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/pmr/icon_LRG.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/pmr/icon_SML.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/pmr/icon_LRG.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:samsung.com:service:MessageBoxService:1</serviceType>
<serviceId>urn:samsung.com:serviceId:MessageBoxService</serviceId>
<controlURL>/PMR/control/MessageBoxService</controlURL>
<eventSubURL>/PMR/event/MessageBoxService</eventSubURL>
<SCPDURL>MessageBoxService.xml</SCPDURL>
</service>
</serviceList>
</device>
</root>

3) SamsungMRDesc.xml

<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11" xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation" xmlns:sec="http://www.sec.co.kr/dlna">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<pnpx:X_compatibleId>MS_DigitalMediaDeviceClass_DMR_V001</pnpx:X_compatibleId>
<df:X_deviceCategory>Display.TV.LCD Multimedia.DMR</df:X_deviceCategory>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50</dlna:X_DLNADOC>
<friendlyName>[TV]UA32D5000</friendlyName>
<manufacturer>Samsung Electronics</manufacturer>
<manufacturerURL>http://www.samsung.com/sec</manufacturerURL>
<modelDescription>Samsung TV DMR</modelDescription>
<modelName>UA32D5000</modelName>
<modelNumber>AllShare1.0</modelNumber>
<modelURL>http://www.samsung.com/sec</modelURL>
<serialNumber>20081224DMR</serialNumber>
<UDN>uuid:6f4e620e-f056-581b-752b-1c0ce33bc370</UDN>
<sec:deviceID>BDCISIPC2MN3M</sec:deviceID>
<iconList>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/dmr/icon_SML.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/dmr/icon_LRG.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/dmr/icon_SML.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/dmr/icon_LRG.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<controlURL>/upnp/control/RenderingControl1</controlURL>
<eventSubURL>/upnp/event/RenderingControl1</eventSubURL>
<SCPDURL>RenderingControl1.xml</SCPDURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<controlURL>/upnp/control/ConnectionManager1</controlURL>
<eventSubURL>/upnp/event/ConnectionManager1</eventSubURL>
<SCPDURL>ConnectionManager1.xml</SCPDURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<controlURL>/upnp/control/AVTransport1</controlURL>
<eventSubURL>/upnp/event/AVTransport1</eventSubURL>
<SCPDURL>AVTransport1.xml</SCPDURL>
</service>
</serviceList>
</device>
</root>

Solution

  • Actually, in DLNA 1.0, only DMP(Digital Media Player) and DMS is introduced. DMP acts as both player and controller, so the pattern is well known as 2-box-pull. In DLNA 1.5, DMC(Digital Media Controller) is separated and now DMC control DMR(Digital Media Renderer) rendering, and this pattern is known as 3-box-push

    It's OK that DMR controls current media (may be a song, or a playlist) like stop, seek and so on, but after any changes, DMR would send notification to DMC and DMC update the playing state then.

    In more detail, after pressing seek buttons, TV change state from PLAYING to TRANSITIONING, and when seek finishes, change back to PLAYING. Meanwhile, when DMC got notification from TV, it will do AVTransport::GetPositionInfo to sync position with TV.