如何停止拼接器渲染

时间:2015-12-15 07:23:00

标签: c# .net renderer splicer

我正在使用Splicer 使用c#

here
using (WindowsMediaRenderer renderer = new WindowsMediaRenderer(timeline, "output.wmv", WindowsMediaProfiles.HighQualityVideo))
    {
        renderer.Render();
        // How to Stop this render
    }
}

我找到了使用progressParticipant

的方法
PercentageProgressParticipant progressParticipant = new PercentageProgressParticipant(timeline);
progressParticipant.ProgressChanged += new EventHandler<Splicer.Renderer.ProgressChangedEventArgs>(progressParticipant_ProgressChanged); 

并将渲染器承包商更改为

using (WindowsMediaRenderer renderer =new WindowsMediaRenderer(timeline, "output.wmv", WindowsMediaProfiles.HighQualityVideo, new ICallbackParticipant[] { progressParticipant },null))
{
    renderer.Render();
}

ProgressChanged方法

public void progressParticipant_ProgressChanged(object sender, Splicer.Renderer.ProgressChangedEventArgs e)
   {
       double D = double.Parse(e.Progress.ToString())*100.0;
       int P = (int)D;
       _bw.ReportProgress(P);
   }

我可以使用ICallbackParticipant或其他任何方式停止渲染吗?

0 个答案:

没有答案