July 28, 2014
Assembly: System.Windows (in System.Windows.dll)
The MediaStreamSource is not setup for protected playback and the DRMAlgorithmID on the sample is set, then an exception is thrown for all cases except when the DRMAlgorithmID is equal to "Unprotected".
Or the following conditions are true:
This method should be called after a request to GetSampleAsync unless ErrorOccurred was called instead. ReportGetSampleProgress could be called before this to indicate that a sample is not ready yet but this method must eventually be called.
If the MediaStreamSample contains a valid Stream object, Windows Phone will seek the stream’s pointer to the specified offset. When this method returns, the specified count of bytes will have been read, and the current position of the stream will have advanced past those bytes.
To report the end of a stream, construct a MediaStreamSample object with a null stream and pass it into . Reporting the end of a stream lets the MediaElement know that no additional samples for that stream will be available. Once the MediaElement has rendered all possible samples for all streams, it automatically transition into the Paused or Stopped state and raise a MediaEnded event.
State Transitions: Calling on any stream indicates buffering is complete for the media and retracts permissions to be in the Buffering state. If the MediaElement is in the Buffering state, the call to this method will cause it to transition back to the Playing state.
When returns, the underlying video codec no longer holds any ownership to the memory pointed to by the MediaStreamSample which was passed in. Depending on your implementation, that memory may now be considered ready for recycling or disposal at any point after the call has been made.