Media Query Engine
Other versions of this page are also available for the following:
8/27/2008
The Media Query Engine (MQE) is a static library provided by Windows Embedded CE. The MQE simplifies development of networked media devices by hiding some of the complexity of UPnP from the device developer. The MQE manages the following:
- Available content providers
- Media servers
- Media metadata
- Event notifications
The MQE communicates with the Windows Media Connect media server, which provides metadata for media stored on the media server. A networked media device can display this metadata to the user, who can select media from it for playback.
The networked media device can then access this media data using 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 as follows:
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 networked media device, you can use the GenericUCP tool sample to investigate UPnP device discovery and connection issues. For more information, see Servers Modules.
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 maximum batch size is 100. If you want to change the maximum batch size, you must change in the MQE header file and recompile the code.
If the server is flooded with denial of service calls, such as repeated "New Content" calls, the MQE could possibly send bad notifications to the calling program. The MQE code does offer some protection because the MQE notifies the calling program only once and does not send notifications every time there is a call.
In This Section
- Managing Media Servers
Describes how the MQE finds and manages the list of available UPnP media servers on the local network.
- Media Query Engine Architecture
Describes the structure and components of the MQE.
- Media Query Engine Reference
Contains reference information on the APIs that are exposed by the MQE.