MediaSourceAppServiceConnection 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.
Enables the implementation of an app service that provides a custom media source that can be consumed by UWP apps.
public ref class MediaSourceAppServiceConnection sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.Core.IMediaSourceAppServiceConnectionFactory, 327680, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
class MediaSourceAppServiceConnection final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.Core.IMediaSourceAppServiceConnectionFactory), 327680, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
public sealed class MediaSourceAppServiceConnection
function MediaSourceAppServiceConnection(appServiceConnection)
Public NotInheritable Class MediaSourceAppServiceConnection
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v5.0)
|
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) |
Initializes a new instance of the MediaSourceAppServiceConnection class. |
Methods
Start() |
Notifies the system that the app service is ready to receive media stream source requests. |
Events
InitializeMediaStreamSourceRequested |
Raised by the system to request the initialization of a new MediaStreamSource. |
Applies to
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla