0

我正在使用 Lumia 920 设备。我有一个 H264 视频 (*.mp4) 文件存储在我的应用程序的本地存储中。我需要逐帧访问它的内容。WP8 对此有什么规定吗?

这是我现有的代码:

// Create the file stream and attach it to the MediaElement.
IsolatedStorageFileStream isoVideoFile = new IsolatedStorageFileStream("CameraMovieRec.mp4",
                                FileMode.Open, FileAccess.Read,
                                IsolatedStorageFile.GetUserStoreForApplication());

VideoPlayer.SetSource(isoVideoFile);

// Add an event handler for the end of playback.
VideoPlayer.MediaEnded += new RoutedEventHandler(VideoPlayerMediaEnded);


// Start video playback.
 VideoPlayer.Play();

而不是VideoPlayer.Play()我需要像逐帧访问这样的东西。我将非常感谢这方面的任何帮助。

4

1 回答 1

0
VideoPlayer.GetTexture().SaveAsPng(stream,width,height)

不幸的是,VideoPlayer.GetPosition 是一个只读属性,所以如果你需要每一帧,你就会陷入暂停和播放 VideoPlayer 的困境。

于 2013-07-09T08:09:45.723 回答