IWMStatusCallback::OnStatus method

The OnStatus method is called when status information must be communicated to the application.

Syntax


HRESULT OnStatus(
  [in]  WMT_STATUS Status,
  [in]  HRESULT hr,
  [in]  WMT_ATTR_DATATYPE dwType,
  [in]  BYTE *pValue,
  [in]  void *pvContext
);

Parameters

Status [in]

One member of the WMT_STATUS enumeration type. For a description of possible WMT_STATUS values, see the tables in the Remarks section.

hr [in]

HRESULT error code. If this indicates failure, you should not process the status as normal, as some error has occurred. Use if (FAILED(hr)) to check for a failed value. See the topic Error Codes for a list of possible results.

dwType [in]

Member of the WMT_ATTR_DATATYPE enumeration type. This value specifies the type of data in the buffer at pValue.

pValue [in]

Pointer to a byte array containing the value. The contents of this array depend on the value of Status and the value of dwType.

pvContext [in]

Generic pointer provided by the application, for its own use. This pointer matches the context pointer given to the IWMReader::Open, IWMIndexer::StartIndexing, and other methods. The SDK makes no assumptions about the use of this pointer; it is simply provided by the application and passed back to the application when a callback is made.

Return value

This method is implemented by the application. It should always return S_OK.

Remarks

The contents of pParam depend on those of Status.

The following WMT_STATUS values can be passed to this method by the reader.

Member Description
WMT_ACQUIRE_LICENSEThe license acquisition process is complete. If the license acquisition is unsuccessful, an error is returned in the hr parameter. If the license acquisition is successful, S_OK is returned in the hr parameter, and a WM_GET_LICENSE_DATA data structure is returned in the pvalue parameter.
WMT_BUFFERING_STARTThe reader has started buffering data.
WMT_BUFFERING_STOPThe reader has stopped buffering data.
WMT_CLOSEDThe reader has closed the file.
WMT_CONNECTINGThe reader is connecting to a server.
WMT_END_OF_FILEThe reader has reached the end of the file.
WMT_END_OF_SEGMENTWhen the Start method is called with a duration argument, WMT_END_OF_SEGMENT is returned when playback has been completed after the specified period. The argument is a QWORD indicating duration of playback in 100-nanosecond units.
WMT_END_OF_STREAMINGThe file has finished streaming.
WMT_EOFThe reader has reached the end of the file.
WMT_ERRORAn error occurred in reading the file.
WMT_INDIVIDUALIZEThe individualization process is in progress or has completed. This event is sent repeatedly during the individualization process. pvalue contains a WM_INDIVIDUALIZE_STATUS structure that contains status information about the progress of the download.
WMT_LOCATINGThe reader is locating a server.
WMT_MISSING_CODECThe reader does not have the appropriate codec to decompress this file.
WMT_NEEDS_INDIVIDUALIZATIONThe client needs a security update.
WMT_NEW_METADATAThe metadata has changed for the current source.
WMT_NEW_SOURCEFLAGSThere has been a change to the settings for the current source.
WMT_NO_RIGHTSThe reader has tried to play back DRM version 1 content and the computer does not have an appropriate license to play it.
WMT_NO_RIGHTS_EXThe reader has tried to play back DRM version 7 content and the computer does not have an appropriate license to play it.
WMT_OPENEDThe file has been opened for reading.
WMT_SAVEAS_STARTStarting to save the file to disk.
WMT_SAVEAS_STOPStopped saving the file to disk.
WMT_SOURCE_SWITCHThere has been a change in source file or stream.
WMT_STARTEDThe reader has started reading the file. The pValue parameter points to a QWORD that indicates the starting timestamp. If it is -1 the starting timestamp is 0. When the value is any other negative number, it should be converted to a positive to give the starting timestamp.
WMT_STOPPEDThe reader has stopped reading the file.
WMT_TIMERA timer event has occurred.

 

The following WMT_STATUS values can be passed to the callback by the writer file sink.

Member Description
WMT_ERRORAn error occurred in writing the file.
WMT_OPENEDThe file has been opened for writing.
WMT_STARTEDThe writer has started writing the file. The pValue parameter points to a QWORD that indicates the starting timestamp. If it is -1 the starting timestamp is 0. When the value is any other negative number, it should be converted to a positive to give the starting timestamp.
WMT_STOPPEDThe writer has stopped writing the file.
WMT_CLOSEDThe writer has closed the file.

 

The following WMT_STATUS enumeration values can be passed to the callback by the writer network sink.

Member Description
WMT_CLIENT_CONNECTA client has connected to the broadcast. The dwType parameter is WMT_TYPE_BINARY, and the pValue parameter points to a WM_CLIENT_PROPERTIES structure.
WMT_CLIENT_DISCONNECTA client has disconnected from the broadcast. The dwType parameter is WMT_TYPE_BINARY, and the pValue parameter points to a WM_CLIENT_PROPERTIES structure.

 

The following WMT_STATUS enumeration values can be passed to the callback by the indexer.

Member Description
WMT_ERRORAn error occurred in reading the file.
WMT_OPENEDThe file has been opened for indexing.
WMT_STARTEDThe indexer has started indexing the file. The pValue parameter points to a QWORD that indicates the starting timestamp. If it is -1 the starting timestamp is 0. When the value is any other negative number, it should be converted to a positive to give the starting timestamp.
WMT_STOPPEDThe indexer has stopped indexing the file.
WMT_CLOSEDThe indexer has closed the file.
WMT_INDEX_PROGRESSIndicates the progress of the current indexing operation. The argument is a DWORD that indicates percentage completed, ranging from 0 to 100.

 

The following WMT_STATUS enumeration values can be passed to the callback by the backup restorer.

Member Description
WMT_BACKUPRESTORE_BEGINSent when backing up or restoring licenses to indicate the process has started.
WMT_BACKUPRESTORE_ENDSent when backing up or restoring licenses to indicate the process has completed successfully.
WMT_BACKUPRESTORE_CONNECTINGSent only when restoring licenses, to indicate the clients credentials are being validated.
WMT_BACKUPRESTORE_DISCONNECTINGSent only when restoring licenses to indicate the clients credentials were validated successfully.
WMT_ERROR_WITHURLSent only when restoring licenses to indicate the client does not have the rights to do this.
WMT_RESTRICTED_LICENSESent only when backing up licenses to indicate the licenses are restricted and cannot be backed up.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Version

Windows Media Format 7 SDK, or later versions of the SDK

Header

Wmsdkidl.h (include Wmsdk.h)

See also

IWMStatusCallback Interface
WMT_STATUS

 

 

Community Additions

ADD
Show:
© 2014 Microsoft