几秒钟后,MediaPlayer.Play会导致MF_MEDIA_ENGINE_ERR_DECODE [英] MediaPlayer.Play causes MF_MEDIA_ENGINE_ERR_DECODE after a couple of seconds

查看:56
本文介绍了几秒钟后,MediaPlayer.Play会导致MF_MEDIA_ENGINE_ERR_DECODE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


当我试图在几秒钟后通过MediaPlayer类播放本地AVI文件时(总是在每个AVI文件中的相同位置)具有"MF_MEDIA_ENGINE_ERR_DECODE"的MediaFailed事件调用并播放中止。


我调用的简化主要部分:


StorageFolder TheFolder =
等待 KnownFolders 。VideosLibrary.GetFolderAsync( ""MyFolder"
);

StorageFile TheFile =
await TheFolder.GetFileAsync(  "MyFile.avi"
);

IRandomAccessStreamWithContentType TheStream
=
等待 TheFile.OpenReadAsync();

VideoPlayer.SetSource(TheStream,TheStream.ContentType) ; $
VideoPlayer.Play();


有没有人知道为什么MediaPlayer类似乎会破坏播放?它在那里可能是AVI文件存在一些容忍问题?



提前致意


-Simon

解决方案

嗨西蒙,


1.这是否与MediaElement重复还是只是MediaPlayer?


2.你提到它是每个AVI文件和相同的位置?你在寻找还是只是在玩?你能告诉我更多的信息吗?关于文件的编码和内容类型,以便我们可以帮助诊断问题?



谢谢,



Hi there,

when I'm trying to play local AVI files via the MediaPlayer class after a couple of seconds (always at the same position in every AVI file) the MediaFailed event with "MF_MEDIA_ENGINE_ERR_DECODE" is called and the playback is aborted.

The simplified main part of my calls:

StorageFolderTheFolder = awaitKnownFolders.VideosLibrary.GetFolderAsync( "MyFolder" );
StorageFileTheFile = awaitTheFolder.GetFileAsync( "MyFile.avi" );
IRandomAccessStreamWithContentTypeTheStream = awaitTheFile.OpenReadAsync();
VideoPlayer.SetSource( TheStream, TheStream.ContentType );
VideoPlayer.Play();

Does anybody have any idea why the MediaPlayer class appears to break playback? It there probably some tolerance issue with AVI files?

Best regards in advance

-Simon

解决方案

Hi Simon,

1. Does this repro with MediaElement as well or just MediaPlayer?

2. You mentioned it is every AVI file and the same position? Are you seeking or is it just playing through? Can you let me know a little more information about the encoding of the files and the content type so we can help diagnose the issue?

Thanks,

Marco


这篇关于几秒钟后,MediaPlayer.Play会导致MF_MEDIA_ENGINE_ERR_DECODE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆