Edit

Share via


MediaSource Class

Definition

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