public VideoPipe(string pipeName)
{
mediaDataSize = 0;
this.pipeName = pipeName;
this.pipedStream = new NamedPipeClientStream(".", pipeName, PipeDirection.InOut, PipeOptions.Asynchronous);
//初始化定时器
this.namedPipeHasVideoDataTimer.AutoReset = true;
this.namedPipeHasVideoDataTimer.Elapsed += new ElapsedEventHandler(namePipeDataCheck_Elapsed);
//管道监控时间间隔,1秒
this.namedPipeHasVideoDataTimer.Interval = CgwConst.Thread_Sleep_Time;
this.namedPipeHasVideoDataTimer.Start();
}