Windows Media Format SDK banner art
PreviousNext

Service Provider Interfaces

This section describes the COM interfaces that make up the Service Provider (SP) plug-in module, which allows Windows Media Device Manager to enumerate and control media devices. These interfaces are implemented by the SP, and are acquired by the application.

The IMDServiceProvider interface is the top-level interface of the SP. It is the first interface accessed by an application, and all other SP interfaces are acquired through it.

Media devices do not necessarily implement all of the interfaces listed in this section. For example, a media device that does not have on-board storage does not implement the interfaces that are used to control or expose content.

The Service Provider automates operations, such as opening and closing media devices and storage objects on media devices. When an application acquires an interface for a media device, that media device is open, and the methods of the interface representing it can be called. When the application is finished with the interface, it must call the standard COM Release method of the interface, which will close the media device and release the interface.

This logic holds true for all of the interfaces that make up the Service Provider. This means that it is not only important to properly release SP interfaces as operating-system resources, but also to properly close devices and storage objects.

A Service Provider can include the following interfaces.

Interface Description
IMDServiceProvider Provides the application with enumeration and communication services for all media devices registered with the system. This interface is the primary container for Windows Media Device Manager.
IMDSPDevice Provides an instance-based association with a media device. Using this interface, you can enumerate the storage media on the device and manage the control functions of the device.
IMDSPDeviceControl Provides methods for controlling devices. Once acquired from a specific instance of the IMDSPDevice interface, the control methods are used for remote device control, streaming audio playback, record, pause, stop, and seek operations on that device.
IMDSPEnumDevice Enumerates the media devices.
IMDSPEnumStorage Enumerates the storage media on a device and the contents on a storage medium.
IMDSPObject Manages the transfer of data to and from storage media.
IMDSPObjectInfo Sets or gets play length, play position, play offset, or total length of playable objects on a storage medium.
IMDSPStorage Provides an instanced-based association with a storage medium on a device. This interface creates storage objects, retrieves information about them, and provides access to the IMDSPEnumStorage interface.
IMDSPStorageGlobals Retrieves global information about a storage medium. This might include the amount of free space, the total number of files, and so on.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.