Compartir a través de


IWMSDirectory Interface

You can implement the IWMSDirectory interface to navigate a directory. For example, consider the following playlist in which *.wmv indicates that all of the Windows Media files in the c:\wmpub\wmroot directory are to be streamed to the client.

<?wsx version="1.0"?>
<smil>
    <media src = "c:\wmpub\wmroot\*.wmv"/>
</smil>

Because the media element uses the wildcard character "*" to identify all of the Windows Media files in the directory, the server calls IWMSDataSourcePlugin::OpenDirectory on a file system data source plug-in. The plug-in creates an instance of an object that implements the IWMSDirectory interface, enumerates the media files in the directory, and passes the server a pointer to the IWMSDirectory interface when it calls IWMSDataSourcePluginCallback::OnOpenDirectory. The server then calls IWMSPlaylistParser::ReadPlaylistFromDirectory on an enabled playlist parser plug-in and passes in the pointer to the IWMSDirectory interface. The playlist parser plug-in uses the pointer to call GetChildInfo and retrieve information about the files in the directory.

Note

The file system data source plug-in must support enumeration. Also, this interface is available only on Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; and Windows Server 2008.

In addition to the methods inherited from IUnknown, the IWMSDirectory interface exposes the following methods.

Method

Description

GetChildInfo

Retrieves information about a specific media element in a directory.

GetDataSourcePlugin

Retrieves a pointer to the plug-in used to source content from the directory.

GetName

Retrieves the full path of the directory, including the URL scheme.

See Also

Concepts

Custom Plug-in Interfaces (C++)