Phone中使用MediaStreamSource播放H

Phone中使用MediaStreamSource播放H

本文介绍了如何在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);
                } 

推荐答案



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

08-15 23:03