MediaSourceAppServiceConnection MediaSourceAppServiceConnection MediaSourceAppServiceConnection MediaSourceAppServiceConnection MediaSourceAppServiceConnection Class

Definition

Enables the implementation of an app service that provides a custom media source that can be consumed by UWP apps.

public : sealed class MediaSourceAppServiceConnection
struct winrt::Windows::Media::Core::MediaSourceAppServiceConnection
public sealed class MediaSourceAppServiceConnection
Public NotInheritable Class MediaSourceAppServiceConnection
var mediaSourceAppServiceConnection = new mediaSourceAppServiceConnection(appServiceConnection);
Attributes

Windows 10 requirements

Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

This feature must be implemented in a background task. When the background task is launched and the Run, the app should create a new instance of this class, register a handler for the InitializeMediaStreamSourceRequested event, and call Start to notify the system that the app service is ready to handle stream source requests.

The system passes an IRandomAccessStream and an a uninitialized MediaStreamSource object into the InitializeMediaStreamSourceRequested event handler. The app service should parse the IRandomAccessStream to create an IMediaStreamDescriptor. If the requested stream format is supported, then the app service can initialize the MediaStreamSource and begin providing samples.

Constructors

MediaSourceAppServiceConnection(AppServiceConnection) MediaSourceAppServiceConnection(AppServiceConnection) MediaSourceAppServiceConnection(AppServiceConnection) MediaSourceAppServiceConnection(AppServiceConnection) MediaSourceAppServiceConnection(AppServiceConnection)

Initializes a new instance of the MediaSourceAppServiceConnection class.

Methods

Start() Start() Start() Start() Start()

Notifies the system that the app service is ready to receive media stream source requests.

Events

InitializeMediaStreamSourceRequested InitializeMediaStreamSourceRequested InitializeMediaStreamSourceRequested InitializeMediaStreamSourceRequested InitializeMediaStreamSourceRequested

Raised by the system to request the initialization of a new MediaStreamSource.