Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
A version of this page is also available for
4/8/2010
Using the UPnP AV Framework to develop a UPnP AV control point involves finding MediaRenderer and MediaServer devices and then invoking actions and receiving state variable change notifications.
UPnP AV control point applications that use the UPnP AV Framework typically perform the operations in the following list.
- Locate UPnP AV MediaRenderer and/or MediaServer devices.
The UPnP AV Framework provides no special-purpose functionality for locating devices. Instead, you use the standard UPnP Control Point API.
To find MediaRenderer devices, use this search target string:
Copy Code urn:schemas-upnp-org:device:MediaRenderer:1
Copy Code urn:schemas-upnp-org:device:MediaServer:1
- Use the
IUPnPDevicepointers you obtained in Step 1 to create instances
of the
MediaRendererDeviceand/or
MediaServerDeviceclasses. The constructors for these classes
take
IUPnPDevicepointers.
- Use
MediaRendererDevice::GetConnectionManager,
MediaServerDevice::GetConnectionManager, and
MediaServerDevice::GetContentDirectoryto obtain pointers to
IConnectionManager(on both devices) and
IContentDirectory(on the MediaServer device) implementations.
- Use the appropriate methods of the
IConnectionManagerand
IContentDirectoryimplementations to perform all control
point tasks.
For example, to browse the content made available by a ContentDirectory service, use IContentDirectory::BrowseMetadataor IContentDirectory::BrowseChildren. Then use the DIDL-Lite XML returned by these methods with the parser (UPnP AV)class to enumerate and examine all object properties.
Or, to start a media stream from a MediaServer to a MediaRenderer, use IConnectionManager::PrepareForConnection. PrepareForConnectionreturns IAVTransportand IRenderingControlimplementations you use to initiate and control the display properties of the transferred media.
For information about the control flow and action invocations required when working with ConnectionManager, AVTransport, RenderingControl, and ContentDirectory services, see UPnP AV DCP Documentation.