.NET视频播放库,它允许改变播放速度? [英] .NET video play library which allows to change the playback rate?
问题描述
我整合了视频播放器,以现有的.NET WinForms应用程序。
我第一次尝试使用Windows媒体播放器控制,这是包含在Windows SDK, 但我无法改变播放速度。
以下是code我写的改变速度。
如果(axWindowsMediaPlayer1.settings.get_isAvailable(速度))
{
axWindowsMediaPlayer1.settings.rate = 3.0;
}
if语句的条件总是不管我用什么视频文件,返回假。没有人有任何想法,为什么我不能改变的速度?这真的需要可改变播放速度,让WMP的控制似乎是一个不错的选择,如果它是不可能这样做的。
或者说,有没有替代的解决方案,让我改变的速度? preferably一个基于.NET的库,不涉及任何非托管code。
谢谢!
解决方案我结束了使用DirectShow.NET
I am integrating a video player to an existing .NET WinForms application.
I first tried to use "Windows Media Player Control" which is included in Windows SDK, but I could not change the playback rate.
The following is the code I wrote to change the rate.
if (axWindowsMediaPlayer1.settings.get_isAvailable("Rate"))
{
axWindowsMediaPlayer1.settings.rate = 3.0;
}
The condition in the if statement always returns "false" no matter what video file I use. Does anyone have any idea why I cannot change the rate? It really needs to be available to change the playback rate, so WMP control seems to be a bad choice if it's impossible to do so.
Or, is there any alternative solution which allows me to change the rate? Preferably a .NET based library which does not involve any unmanaged code.
Thanks!
I ended up using DirectShow.NET (http://directshownet.sourceforge.net/) which is an open-source library. It contains a lot of samples, and it has a sample with playback rate control.
这篇关于.NET视频播放库,它允许改变播放速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!