IWMSServer::get_MediaParsers
Previous | Next |
IWMSServer::get_MediaParsers
The get_MediaParsers method retrieves an IWMSPlugins interface containing a collection of media parser plug-ins.
Syntax
HRESULT get_MediaParsers( IWMSPlugins** pVal );
Parameters
pVal
[out] Pointer to a pointer to an IWMSPlugins interface containing the media parser plug-in collection.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Number | Description |
E_POINTER | 0x80004003 | Indicates that pVal is a NULL pointer argument. |
Remarks
This method calls AddRef internally. To avoid memory leaks, you must call Release when you are finished using the interface.
You can use media parser plug-ins to format and interpret the data retrieved from the storage system by data source plug-ins.
The following system plug-ins can be accessed using the get_MediaParsers method.
Plug-in | Description |
WMS JPEG Media Parser | Enables the Windows Media server to stream JPEG image files. |
WMS MP3 Media Parser | Enables the Windows Media server to stream MPEG Layer-3 audio (MP3) files. |
WMS Windows Media Parser | Enables the Windows Media server to stream Windows Media files with the following extensions: .asf, .wma, .wmv, and .wm. |
Example Code
#include <windows.h> #include "wmsserver.h" // Declare variables and interfaces. IWMSServer *pServer; IWMSPlugins *pPlugins; HRESULT hr; // Initialize the COM library and retrieve a pointer // to an IWMSServer interface. hr = CoInitialize(NULL); hr = CoCreateInstance(CLSID_WMSServer, NULL, CLSCTX_ALL, IID_IWMSServer, (void **)&pServer); if (FAILED(hr)) goto EXIT; // Retrieve a pointer to an IWMSPlugins interface // containing media parser plug-ins. hr = pServer->get_MediaParsers(&pPlugins); if (FAILED(hr)) goto EXIT; EXIT: // TODO: Release temporary COM objects and uninitialize COM.
Requirements
Header: wmsserver.h.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
Previous | Next |