The MSS populates some metadata from the presentation descriptor and stream descriptor(s), but we're not surfacing any embedded metadata (e.g. title, artist, album, etc).
Thumbnail retrieval race condition
The MSS sets the PKEY_ThumbnailStream property for its property handler asynchronously after the MediaStreamSource.Thumbnail property is set. This creates a window of time where a property handler consumer could query for the PKEY_ThumbnailStream property before it's been set and fail to retrieve the thumbnail.
Hang for files with thumbnails in media source app service scenarios
In media source app service scenarios (e.g. out-of-proc WME) the remote stream reference for the thumbnail property could outlive the app service connection. If the remote stream reference is released in the client app after the app service has been suspended, then the remote release will block until the app service is terminated. This could potentially cause the client app to become unresponsive during this time.
C6302 (Format string mismatch) warnings for trace logging
We're logging narrow character strings, but using %S which specifies wide character strings.
Rare crash due to a null MSS reference in FFmpegInteropMSS::OnClosed() for out-of-proc WME on RS4
This likely indicates an MSS bug as our MSS reference should only be null if the MediaStreamSource::Closed event handler was already invoked, and the MSS should only fire a single MediaStreamSource::Closed event. However, we've only seen this crash hit on RS4 which is out of support.
What changed?
Added support for surfacing embedded metadata (e.g. title, artist, album, etc)
The MSS marks some properties read-only which prevents us from setting them.
Set a thumbnail on the MSS via the PKEY_ThumbnailStream property on the MSS property handler instead of the MediaStreamSource.Thumbnail property to mitigate the race condition with thumbnail retreival
Note that the MSS doesn't check its property handler for the PKEY_ThumbnailStream property when a consumer gets the MediaStreamSource.Thumbnail property... This isn't an issue if the MSS consumer is another Windows Media component though, as MF uses the IPropertyHandler interface rather than the IMediaStreamSource interface for retrieving metadata.
Don't set a thumbnail on the MSS in media source app service scenarios
Media source app services should set the IsMediaSourceAppService property on the FFmpegInteropMSSConfig provided to FFmpegInteropMSS::InitializeFromStream() / FFmpegInteropMSS::InitializeFromUri().
Updated trace logging to use %hs for narrow character strings
Use event revokers instead event tokens for unregistering event handlers
Event revokers hold a weak reference to the event source (i.e. the MSS) and check if it still exists before revoking the delegate.
How was the change tested?
I validated the following scenarios:
Out-of-proc WME
Embedded metadata (e.g. title, artist, album, etc) is surfaced for Ogg files in File Explorer
Thumbnails are only generated for Ogg files with video in File Explorer
Since out-of-proc WME is a media source app service, it no longer surfaces an thumbnail to the MSS. The MSS will try to generate a thumbnail on-demand for files with a video stream, but files that only have an audio stream will not have a thumbnail.
In-proc WME scenarios
Embedded metadata (e.g. title, artist, album, etc) is surfaced for Ogg files in File Explorer
Thumbnails are generated for audio-only Ogg files with an embedded thumbnail in File Explorer
Why is this change being made?
What changed?
How was the change tested?
I validated the following scenarios: