DMC实现(一):Developing UPnP AV Framework Control Points

原文地址:http://msdn.microsoft.com/en-us/library/ms881690.aspx


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.

The AV Control Point sample contains code for all of these steps. For more information about this sample, see UPnP AV Control Point Sample.

UPnP AV control point applications that use the UPnP AV Framework typically perform the operations in the following list.

  1. 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:

    urn:schemas-upnp-org:device:MediaRenderer:1
    

    To find MediaServer devices, use this search target string:

    urn:schemas-upnp-org:device:MediaServer:1
    

    For more information about locating UPnP devices using the UPnP Control Point API, see Device Location.

  2. Use the IUPnPDevice pointers you obtained in Step 1 to create instances of the MediaRendererDevice and/or MediaServerDeviceclasses. The constructors for these classes take IUPnPDevice pointers.
  3. Use MediaRendererDevice::GetConnectionManagerMediaServerDevice::GetConnectionManager, andMediaServerDevice::GetContentDirectory to obtain pointers to IConnectionManager (on both devices) and IContentDirectory (on the MediaServer device) implementations.
  4. Use the appropriate methods of the IConnectionManager and IContentDirectory implementations to perform all control point tasks.

    For example, to browse the content made available by a ContentDirectory service, use IContentDirectory::BrowseMetadata orIContentDirectory::BrowseChildren. Then use the DIDL-Lite XML returned by these methods with the parser class to enumerate and examine all object properties.

    Or, to start a media stream from a MediaServer to a MediaRenderer, use IConnectionManager::PrepareForConnection.PrepareForConnection returns IAVTransport and IRenderingControl implementations 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.

See Also

Developing UPnP AV Framework Devices and Control Points | Using the UPnP Control Point API



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值