GetProtocolInfo IMO is bad.
Coming back to this statement, I know bob will hate me for pointing this out (again), but today (as one does) I was reading again the UPnP AV Architecture Specifications
http://upnp.org/specs/av/UPnP-av-AVArchitecture-v1-20020625.pdf and I just happened to notice chapter 5.3 again which explains the functions expected of a UPnP Control Point.
In my opinion MC does properly fulfill the UPnP architecture expectations concerning functions 1, 2
1), 5
2), 6, 7, 8, 9
3) and 10
2) but
it does not fulfill the architecture expectations concerning functions 3 and 4.
5.3. Control PointControl Points coordinate the operation of the MediaServer and the MediaRenderer, usually in response to user interaction with the Control Point’s UI. The following describes a generic Control Point algorithm that can be used to interact with a wide variety of MediaServer and MediaRenderer implementations.
1. Discover AV Devices: Using UPnP’s Discovery mechanism, MediaServers and MediaRenderers in the home network are discovered.
2. Locate Desired Content: Using the Server’s ContentDirectory::Browse() or Search() actions, a desired Content Item is located. The information returned by Browse()/Search() includes the transfer protocols and data formats that the MediaServer supports to transfer the content to the home network.
3. Get Renderer’s Supported Protocols/Formats: Using the MediaRenderer’s ConnectionManager::GetProtocolInfo() action a list of transfer protocols and data formats supported by the MediaRenderer is returned to the Control Point.
4. Compare/Match Protocols/Formats: The protocol/format information returned by the ContentDirectory for the desired Content Item is matched with the protocol/format information returned by the MediaRenderer’s GetProtocolInfo() action. The Control Point selects a transfer protocol and data format that are supported by both the MediaServer and MediaRenderer.5. Configure Server/Renderer: [REDACTED]
6. Select Desired Content: Using the AVTransport service (whose InstanceID is returned by either the Server or Renderer), invoke the SetAVTransportUR() action to identify the content item that needs to be transferred.
7. Start Content Transfer: Using the AVTransport service, invoke one of the transport control actions as desired by the user (e.g. Play, Stop, Seek, etc).
8. Adjust Rendering Characteristics: Using the MediaRenderer’s Rendering Control service, invoke any rendering control actions as desired by the user (e.g. adjust brightness, contrast, volume, mute, etc).
9. Repeat: Select Next Content: Using either the AVTransport::SetAVTransportURI() or AVTransport::SetNextAVTRansportURI() actions, identify the next content item that is to be transferred from the same Server to the same Renderer. Repeat as needed.
10. Cleanup Server/Renderer: [REDACTED]
Notes:
1) as the MC control point is also a server, obviously MC does need to call the Browse() or Search() actions on itself
2) these functions are actually not required for HTTP playback
3) the per renderer settings in MC determine whether SetAVTransportURI() or SetNextAVTRansportURI() are used