public virtual void StopGraph()
{
IMediaControl mediaControl = this.graphBuilder as IMediaControl;
FilterState pfs;
mediaControl.GetState(0, out pfs);
if (pfs == FilterState.Running || pfs == FilterState.Paused)
{
int hr = mediaControl.Stop();
ThrowExceptionForHR("Stopping the graph: ", hr);
IsPossibleGraphRun = true;
IsPossibleGraphPause = false;
IsPossibleGraphStop = false;
}
}