迁移到消费者预览的媒体元素问题 [英] Media Element Issues with Migration to Consumer Preview

查看:70
本文介绍了迁移到消费者预览的媒体元素问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有一个应用程序在开发者预览版上工作,现在它已经在消费者预览版中,事情已经发生了变化。

I had an app working on the Developer Preview, and now that it's on the Consumer Preview, things have changed.

我的应用非常依赖于播放视频并在这些视频之间无缝交换。在DP中,没有任何问题,但现在在CP中,当我交换时,我在两个视频之间出现了灰色框架的问题,而且如果我想要
,则启动视频而不是开始(比如150帧),它会闪烁视频的第一帧。因此,当我更改视频时,我会看到一段灰色,然后是视频第一帧的闪光。后不存在任何问题

My app is very heavily based on playing videos and swapping seamlessly between those videos. In the DP, there were no issues with this but now in CP I'm having issues with a frame of grey in between the two videos as I swap them, and also if I wanted to start a video not at the beginning (say 150 frames in), it flashes the first frame of the video. So, when I change a video I get a flash of grey and then a flash of the first frame of the video. After that there are no problems.

我使用更改视频的方法是:MediaElement->源=这个 - > BaseUri-> CombineUri(QUOT;的字符串的引用系统上的新视频文件");

The method I'm using to change videos is: MediaElement->Source = this->BaseUri->CombineUri( "String that references new video file on system" );

我将不胜感激这个问题的任何帮助。谢谢。

I would appreciate any help in this issue. Thanks.

推荐答案

Hello DLAlex,

Hello DLAlex,

每次设置媒体元素的源时,您都在重建基础Media Foundation拓扑。这样做会自然地使帧服务器正在使用的D3D表面无效。听起来好像交换是在第一个
帧视频排队之前发生的。这很可能就是XAML丰富的合成器与Media Engine的帧服务器交互的方式。老实说,如果问题出现在交换链中,我想不出一个简单的方法来解决这个问题。

Every time you set the Media Element's source you are rebuilding the underlying Media Foundation topology. Doing this naturally invalidates the D3D surface that was being used by the frame server. It sounds like the swap is occuring before the first frame of video is queued. This is likely just the way the XAML rich compositor is interacting with the Media Engine's frame server. I honestly can't think of an easy way to fix this if the problem is in the swap chain.

这就是说我不知道​​为什么你会看到灰色。我会假设表面在初始化时默认为全黑。

That said I don't know why you would be seeing grey. I would assume that the surface would default to all black on initialization.

这是否以任何方式回答您的问题,或者我只是在杂草中?

Does this in any way answer your question or am I just off in the weeds?

我希望这有帮助,

詹姆斯


这篇关于迁移到消费者预览的媒体元素问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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