MediaSource Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The MediaSource class is the base class for all media sources and provides an encapsulation for all media.
public ref class MediaSource abstract
public abstract class MediaSource
type MediaSource = class
Public MustInherit Class MediaSource
- Inheritance
-
MediaSource
- Derived
Remarks
MediaSource has a one-to-many relationship with Player in that one MediaSource can be attached to one or more Players, but Player can be attached to only one MediaSource. MediaSource.Close() must be called after the application is finished using the object. If Close() is not called, the underlying unmanaged object will not be disposed, causing a memory leak for the application.
Properties
Duration |
Gets the duration, in milliseconds, of the source. |
Methods
BeginPrepareSource(MediaSourceOpenMode, AsyncCallback, Object) |
Prepares the media source. |
Close() |
Closes the source. |
EndPrepareSource(IAsyncResult) |
Ends the operation initiated by BeginPrepareSource. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for