4월, 2012의 게시물 표시

웹캠 캡쳐

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using DirectShowLib; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; namespace CastCommon {     public class WebCamCapturer     {         // a small enum to record the graph state         enum PlayState         {             Stopped,             Paused,             Running,             Init         };         // Application-defined message to notify app of filtergraph events         public const int WM_GRAPHNOTIFY = 0x8000 + 1;         IVideoWindow videoWindow = null;         IMediaControl mediaControl = null;   ...