microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.74k stars 308 forks source link

MediaPlayer Vorbis COMException (0xC00DB3B0) #3305

Open christosk92 opened 1 year ago

christosk92 commented 1 year ago

Describe the bug

I am experiencing an issue with the vorbis decoder in the media player. The audio plays for a short time, but after roughly 30 seconds the audio stops and the MediaFailed event (regardless of position, if the audio is played at 00:01:00 for example, the error is raised at 00:01:28~30) is raised with the following error:

args.ExtendedErrorCode = "Connection to app service providing a media extension failed. (0xC00DB3B0)"
args.Error = "Decoding Error"

This issue only occurs with vorbis files and does not happen with MP3 files. Moreover I have tested this in UWP and the error does not occur. Only in WinAppSdk. The same file that gives an error in WinAppSdk also plays fine in the New Media Player, which I assume is made with UWP.

Steps to reproduce the bug

  1. Create a media player with a vorbis file as the source. In my case:
    //audioStreamStream is an arbitrary Stream class.
    var randomAccessStream = audioStreamStream.AsRandomAccessStream();
    var source = MediaSource.CreateFromStream(randomAccessStream , "audio/ogg");
  2. Play the audio
  3. Observe the audio stopping after roughly 30 seconds and the MediaFailed event being raised

Expected behavior

The audio should play continuously without stopping and the MediaFailed event should not be raised, but the audio stops after roughly 30 seconds and the MediaFailed event is raised.

Screenshots

N/A

NuGet package version

Windows App SDK 1.2.2: 1.2.221209.1

Packaging type

Packaged (MSIX)

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022

Additional context

No response

christosk92 commented 1 year ago

https://github.com/christosk92/VorbisPlayerWinUI3

I have created a sample project with a perfectly fine OGG file from Wikipedia (https://commons.wikimedia.org/wiki/File:Median_test.ogg)

Hit the Play button and you can see the Debugger breaking in the MediaFailed function (Debugger.Break())

codendone commented 1 year ago

Logged tracking bug for media pipeline team: internal bug

christosk92 commented 1 year ago

Thank you. I am looking forward to the next release as this is breaking for me right now. I switched to Libvlc but am missing out on native platform features now.

christosk92 commented 1 year ago

FYI: I'm still seeing this error in 1.4.230518007-experimental1

Baka632 commented 1 year ago

Any progress? It has been SIX months!

christosk92 commented 12 months ago

@codendone Apologies for the ping but it’s been quite some time now. Has there been any updates on this? Will there be a bugfix that’s planned for an upcoming release?

Thanks !

codendone commented 11 months ago

@christosk92 The media pipeline team says this is feature work to support these media extensions outsides of UWP. They agree this would be valuable to implement but don't currently have a timeline to share.

christosk92 commented 11 months ago

@christosk92 The media pipeline team says this is feature work to support these media extensions outsides of UWP. They agree this would be valuable to implement but don't currently have a timeline to share.

Thanks for the update. I see the team has been very busy with improving WinAppSdk. Thanks for your time to respond to this issue, I’ll be on the look for any updates!

christosk92 commented 11 months ago

@codendone I have tested this in an Avalonia project (By targeting to net8.0-windows10.0.19041.0), and the MediaPlayer seems to play fine without failing the vorbis file.

So, it does seem like it's an issue that's localized to WinAppSdk, not necessarily the fact that its outside of UWP.

I hope this helps.

christosk92 commented 7 months ago

Any updates on this? It's almost been a year now.

patnels commented 7 months ago

@christosk92 we are actively working on this, but still no firm timeline to share.

christosk92 commented 7 months ago

Thanks

christosk92 commented 4 months ago

Is there some sort of timeline available yet as to when we can expect this to be fixed? Just tested this in the latest version and I am still experiencing this.

patnels commented 3 months ago

@christosk92 yes, not resolved yet, and we are still actively working on it. still no timeline to share.