如何在Windows Phone中使用MediaStreamSource播放H.264原始流 [英] How to playback H.264 raw stream using MediaStreamSource in WindowsPhone

查看:90
本文介绍了如何在Windows Phone中使用MediaStreamSource播放H.264原始流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助!我正在尝试使用WindowsPhone模拟器中的MediaStreamSource播放H.264原始流.我的264流文件是由JM10.1编码器在3.0级基线配置文件中编码的,但是现在该模拟器只能显示该流的第一帧.如何获得其他帧的渲染和显示?
这是我的GetSampleAsync函数代码.我想这个功能有问题,但是我找不到它.

Help! I''m trying to playback H.264 raw stream using MediaStreamSource in the WindowsPhone emulator.My 264 stream file is encoded by JM10.1 encoder on level 3.0 baseline profile.But now the emulator can only display the first frame of the stream. How can I get the other frames rendered and displayed?
Here are my GetSampleAsync function codes.I guess something is wrong in this functon.But I can''t find it out.

protected override void GetSampleAsync(MediaStreamType mediaStreamType)
                {
                    MediaStreamDescription mediaStreamDescription = new MediaStreamDescription(MediaStreamType.Video, mediaStreamAttributes);
                    Dictionary<MediaSampleAttributeKeys, string> mediaSampleAttributes = new Dictionary<MediaSampleAttributeKeys, string>();
                   
                    MediaStreamSample mediaStreamSample = new MediaStreamSample(mediaStreamDescription, mediaStream, 0, mediaStream.Length, 0, mediaSampleAttributes);
                    this.ReportGetSampleCompleted(mediaStreamSample);
                } 

推荐答案



尤其是在诸如视频播放之类的情况下,仿真器通常有故障(不是真正的故障,而是视频/音频编解码器的故障实现).

已经直接在电话上尝试过吗?

出于最佳问候
Hi,

especially in case of things like video playback, emulators are often buggy (not really buggy, but buggy implementation of Video/Audio Codecs).

Already tried it directly on phone?

With Best Regards


MediaElement.AutoPlay属性不得为"false"
MediaElement.AutoPlay Property must not be "false"


这篇关于如何在Windows Phone中使用MediaStreamSource播放H.264原始流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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