title: Gstreamer appsrc to stream OpenGL framebuffer
body: <p>I'm trying to stream OpenGL framebuffer from my OSX App by using GStreamer-1.0 via hlssink. My pipeline is
  <code>appsrc-&gt;decodebin-&gt;videoconvert-&gt;x264enc-&gt;mpegtsmux-&gt;hlssink</code>. The problem is, the feed appears like this and there is at least a 10 second delay.</p>
  <p><a href="https://i.stack.imgur.com/B6UyK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B6UyK.jpg" alt="screen capture on VLC" /></a></p>
  <p>If you see the picture, there is a wrapped up image of my desktop. I just started learning GStreamer and don't have much idea about the encoding/muxing part. One more thing that I noticed is even without the encoding and muxing part <code>i.e.,appsrc-&gt;videoconvert-&gt;osxsink</code> the feed appears just like this.</p>
  <p>What might be the problem? How do I get a clear feed from framebuffer?</p>
  <p>How am I supposed to approach this problem in order to stream it in <strong>realtime</strong> or at least with <strong>minimal delay</strong>?</p>
  <p>Should I use <code>tcpserversink</code> instead of <code>hlssink</code> for decreasing the latency?</p>
  <p>I'm integrating GStreamer with my OSX app which produces the source buffer for appsrc. My end goal is to stream the realtime feed over http / tcp.</p>
  <p>I'm working on this for two weeks now, there is a fair chance I have missed something very basic, so feel free to comment your opinions. Do let me know if anyone needs more info or the source code.</p>
  <p><strong>EDIT</strong>:</p>
  <p>This is the caps that I'm setting for appsrc.</p>
  <pre><code>caps = gst_caps_new_simple (&quot;video/x-raw&quot;,
                              &quot;width&quot;, G_TYPE_INT, 1280,
                              &quot;height&quot;, G_TYPE_INT, 800,
                              &quot;format&quot;, G_TYPE_STRING, &quot;RGB16&quot;, NULL);
  </code></pre>
  <p>The type of data fed is raw data from the framebuffer. This is a screen casting app for mac.</p>
  <p>Is hlssink the right choice if I do realtime screen casting? Should I try tcpserversink?</p>