Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1.6 KB

mediasourceappserviceconnection.md

File metadata and controls

23 lines (15 loc) · 1.6 KB
-api-id -api-type
T:Windows.Media.Core.MediaSourceAppServiceConnection
winrt class

Windows.Media.Core.MediaSourceAppServiceConnection

-description

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

-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.

-see-also

-examples