コード例 #1
0
ファイル: MediaOutputForm.cs プロジェクト: kbitc/oeip
 private void Pipe_OnProcessEvent(int layerIndex, IntPtr data, int width, int height, int outputIndex)
 {
     if (!mediaOutput.IsOpen)
     {
         return;
     }
     if (layerIndex == cameraControl1.VideoPipe.OutYuvIndex)
     {
         OeipHelper.setVideoFrame(data, width, height, cameraControl1.VideoPipe.YUVFMT, ref videoFrame);
         videoFrame.timestamp = DateTime.Now.Ticks / 10000 - openTime;
         LogHelper.LogMessage("video time:" + videoFrame.timestamp);
         mediaOutput.PushVideoFrame(ref videoFrame);
     }
 }
コード例 #2
0
 public bool PushVideoFrame(int index, IntPtr data, int width, int height, OeipYUVFMT fmt)
 {
     lock (obj)
     {
         if (!bLogin)
         {
             return(false);
         }
         ref OeipVideoFrame videoFrame = ref mainVideoFrame;
         if (index == 1)
         {
             videoFrame = ref auxVideoFrame;
         }
         OeipHelper.setVideoFrame(data, width, height, fmt, ref videoFrame);
         return(OeipLiveHelper.pushVideoFrame(index, ref videoFrame));
     }