Compartir a través de


Media Query Engine (Windows CE 5.0)

Send Feedback

The Media Query Engine (MQE) is a static library provided by the Windows CE 5.0 Networked Media Device Feature Pack. It simplifies development of Networked Media Devices (NMD) by hiding some of the complexity of UPnP from the device developer. It manages:

  • Available content providers
  • Media servers
  • Media meta-data
  • Event notifications

The MQE communicates with the Windows Media Connect (WMC) media server. This provides meta-data for media stored on the media server. A Networked Media Device can display this meta-data to its user, who can select media for playback.

The network media device (NMD) can then access this media data via HTTP and play the content on the device.

You must link your application with the MQE and call the interface functions to access the functionality of the MQE.

Adding the MQE to a Custom Application

The MQE is part of the NMD_UI sample application, so if you are basing your application on that code, the MQE is already present. If you are writing a custom application, you can still refer to the NMD_UI project as an example of how to include the MQE. The specific items are broken out below:

SYSGENS

set SYSGEN_UPNP_AV_DEVICE=1
set SYSGEN_UPNP_AV_CTRL=1
set SYSGEN_ETHERNET=1
set SYSGEN_WININET=1

Libraries

TARGETLIBS= \
   $(_PUBLICROOT)\fp_nmd\oak\lib\$(_CPUINDPATH)\MQELib.lib \
   $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\Commctrl.lib \
   $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\coredll.lib \
   $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\iphlpapi.lib \
   $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\uuid.lib \
   $(_PROJECTROOT)\cesysgen\oak\lib\$(_CPUINDPATH)\av_upnp.lib \
   $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\oleaut32.lib \
   $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\ole32.lib  \
   $(_PROJECTROOT)\cesysgen\sdk\lib\$(_CPUINDPATH)\ws2.lib  

Headers

Header files are in $(_PUBLICROOT)\fp_nmd\oak\inc

Debugging UPnP Connection Issues

While you are developing your NMD, you can use the GenericUCP tool sample to investigate UPnP device discovery and connection issues. See Servers Modules for more information.

Limitations of the Media Query Engine

The UPnP stack has a limit of 512K. This is an increase from the 48K limit in Windows CE 5.0 before the Windows CE 5.0 Networked Media Device Feature Pack.

The MQE max batch size is 100. If you wish to change the maximum batch size, you will have to change in the MQE header file and recompile the code.

If the server is flooded with Denial of Service (DoS) calls, such as repeated "New Content" calls, the MQE could possibly send bad notifications to the calling program. The MQE does offer some protection in its code in that it will only notify the calling program once, and will not send notifications every time there is a call. This message may take a very long time, which will make it appear to the user that the device has frozen.

In This Section

Networked Media Device Architecture | How to Develop a Networked Media Device

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.