title: Streaming video between processes?
body: <p>This is related to <a href="https://stackoverflow.com/questions/23530705/increasing-wcf-duplex-callback-maxsize">this question</a> which I asked earlier. </p>
  
  <p>I am trying to use a <a href="http://msdn.microsoft.com/en-us/library/ms731064%28v=vs.110%29.aspx" rel="nofollow noreferrer">WCF Duplex service</a> to control (start, stop, enable feature) a number of Kinect devices. Beyond this, I would also like to stream the video feed I receive  from a Windows Service to a client WPF app. I am doing this because I need the properties of a Windows Service such as automatic startup for the application.</p>
  
  <p>Having tried to use Duplex service callbacks to stream the data and run into some issues as described in the other question. I'm starting to wonder if a <a href="http://msdn.microsoft.com/en-us/library/dd997372.aspx" rel="nofollow noreferrer">Memory-Mapped File</a> is a better approach.</p>
  
  <p>The device will roughly 30 times a second issue the following call.</p>
  
  <pre><code>private byte[] _ColorPixels;
  
  private void Sensor_AllFramesReady(object sender, Microsoft.Kinect.AllFramesReadyEventArgs e)
  {
      using (ColorImageFrame frame = e.OpenColorImageFrame())
      {
          frame.CopyPixelDataTo(_ColorPixels);
          //_ColorPixels will now have a large array which is the video stream
      }
  }
  </code></pre>
  
  <p>at which point I have an array that contains at least 1,228,800 elements. I'd now like to forward this data to another process.</p>
  
  <p>So what is the best way to stream live video data between processes in C#?</p>