<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>Le samedi 16 mars 2019 à 20:02 +0000, Wudo Balmus a écrit :</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Hello,<br>I'm trying to understand the example in Gstreamer tutorial with appsrc: <a href="https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html">https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html</a><br><br>There is written a sentence:<br><br>"We configure a video stream with a variable framerate (0/1) and we set the timestamps on the outgoing buffers in such a way that we play 2 frames per second."<br><br>then caps with variable framerate are set to appsrc:<br><br>g_object_set (G_OBJECT (appsrc), "caps",<br>        gst_caps_new_simple ("video/x-raw",<br>                     "format", G_TYPE_STRING, "RGB16",<br>                     "width", G_TYPE_INT, 384,<br>                     "height", G_TYPE_INT, 288,<br>                     "framerate", GST_TYPE_FRACTION, 0, 1, <-- variable framerate<br>                     NULL), NULL);<br><br>and then when we generate each buffer, the duration is set for each buffer to 0.5s:<br><br>GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale_int (1, GST_SECOND, 2);<br><br>The question is, why do we set the framerate to be variable (0/1)? Shouldn't we set it to constant 2 FPS instead as we generate 2 buffers each second?<br></div></div></blockquote><div><br></div><div>I believe this is simply to show that you don't have to use fixed framerate and can use variable framerate. GStreamer synchronisation uses the timestamp, not the framerate for videos.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><br>Best regards,<br>Wudo<br></div></div>
<pre>_______________________________________________</pre><pre>gstreamer-devel mailing list</pre><a href="mailto:gstreamer-devel@lists.freedesktop.org"><pre>gstreamer-devel@lists.freedesktop.org</pre></a><pre><br></pre><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"><pre>https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</pre></a></blockquote></body></html>