The Start method causes the reader object to start reading from the specified starting time offset. As data is read, it is passed to the application through the application's IWMReaderCallback::OnSample callback method.
HRESULT Start( QWORD cnsStart, QWORD cnsDuration, float fRate, void *pvContext );
Time within the file at which to start reading, in 100-nanosecond units. If cnsStart is set to WM_START_CURRENTPOSITION, playback starts from the current position.
Duration of the read in 100-nanosecond units, or zero to read to the end of the file.
Playback speed. Normal speed is 1.0. Higher numbers cause faster playback, and numbers less than zero indicate reverse rate (rewinding). The valid ranges are 1.0 through 10.0, and -1.0 through -10.0.
Generic pointer, for use by the application. This pointer is passed back to the OnSample method.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
||The method succeeded.|
||There is not enough available memory.|
||The value for fRate is not within the valid ranges, or the file is not seekable and a non-zero start position has been specified.|
||The method failed for an unspecified reason.|
This method sends a WMT_STARTED status notification to the application's IWMReaderCallback::OnStatus function.
To change the rate but not the current file position, use the Start method with the WM_START_CURRENTPOSITION value.
Any call to Start while paused is treated as a seek through the file, and incurs a buffering penalty from network files. This is true even for calls to Start with the WM_START_CURRENTPOSITION value. To continue playing from the current paused position with no buffering penalty, call Resume.
If the application is providing the clock (by calling IWMReaderAdvanced::SetUserProvidedClock), it should usually set the cnsDuration parameter to zero. If the application specifies a non-zero value, then it must call the IWMReaderAdvanced::DeliverTime method exactly once, and the value passed to DeliverTime must be either the stop time or
(QWORD)-1. The reader object will then deliver samples up to the specified duration.
|Minimum supported client||Windows 2000 Professional [desktop apps only],Windows Media Format 7 SDK, or later versions of the SDK|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||wmsdkidl.h (include Wmsdk.h)|
|Library||Wmvcore.lib; WMStubDRM.lib (if you use DRM)|