public void Stop() { if (null == CurrentDevice || null == GraphBuilder) { return; } IMediaControl ctrl = (IMediaControl)GraphBuilder; ctrl.Stop(); State = MEDIA_STATE.STOP; }
public void ResetRenderWindow(IntPtr render_handle, Rectangle render_rect) { IMediaControl ctrl = (IMediaControl)GraphBuilder; MEDIA_STATE old_state = this.State; if (null != GraphBuilder && old_state == MEDIA_STATE.RUNNING) { ctrl.Stop(); } SetupRenderWindow((IVMRFilterConfig9)VmrRenderer, render_handle, render_rect); if (null != GraphBuilder && old_state == MEDIA_STATE.RUNNING) { ctrl.Run(); } }
public bool Start() { if (null != CurrentDevice) { Stop(); } if (null == GraphBuilder) { return(false); } IMediaControl ctrl = (IMediaControl)GraphBuilder; ctrl.Run(); State = MEDIA_STATE.RUNNING; return(true); }