<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Same behaviour.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I just noted that “need-data” is only called once with ffplay, and twice with gst-launch (probably once udp and once tcp)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="FR">From:</span></b><span lang="FR"> Michael Gruner <michael.gruner@ridgerun.com>
<br>
<b>Sent:</b> Thursday, September 21, 2023 2:45 PM<br>
<b>To:</b> Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org><br>
<b>Cc:</b> LEVY David <David.Levy@ino.ca><br>
<b>Subject:</b> Re: Issue with rtsp server source h264 encoded<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Try sending periodic I frames, "x264enc key-int-max=10" or, programmatically:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">    </span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_object_set</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">( </span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lEncoder</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">, </span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"key-int-max"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">, 1</span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">0</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">, </span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> );</span><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955"> //
 4 = zerolatency</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">10 is just a made up number to send a reference frame every second (given that your framerate is 10/1). You may space them according to your needs.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Michael.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 21 Sep 2023, at 09:59, LEVY David via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hello,<br>
i'm new to gstreamer / rtsp so, sorry if it's a basic mistake.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Im trying to set up a pipeline that end with an appsink that push data into a rtsp server starting with an appsrc.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">It would be:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">videotestsrc -> x264enc -> appsink (push data to src as soon as received)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">and<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">appsrc -> rtph264pay<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I can’t find any example similar, but I found this one:<br>
<a href="https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-appsrc.c"><span style="color:#0563C1">https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-appsrc.c</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Which does:<br>
appsrc-> videoconvert -> x264enc -> rtph264pay (and uses “need-data”)<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I have successfully tweaked it to<br>
videotestsrc -> appsink<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">appsrc-> videoconvert -> x264enc -> rtph264pay (and uses “need-data”)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">My next step would be<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Videotestsrc -> x264enc -> appsink<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">appsrc-> rtph264pay (and uses “need-data”)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">but when I try to read the stream from either<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    gst-launch-1.0 --gst-debug=rtspsrc:2 rtspsrc location=<a href="rtsp://127.0.0.1:8554/test"><span style="color:#0563C1">rtsp://127.0.0.1:8554/test</span></a><span class="apple-converted-space"> </span>! queue ! rtph264depay ! h264parse
 ! avdec_h264 ! videoconvert ! videoscale ! autovideosink<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">or ffplay<span class="apple-converted-space"> </span><a href="rtsp://127.0.0.1:8554/test"><span style="color:#0563C1">rtsp://127.0.0.1:8554/test</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I don’t have any playback:<br>
<br>
Setting pipeline to PAUSED ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Pipeline is live and does not need PREROLL ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (open) Opening Stream<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Pipeline is PREROLLED ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Prerolled, waiting for progress to finish...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (connect) Connecting to<span class="apple-converted-space"> </span><a href="rtsp://127.0.0.1:8554/test"><span style="color:#0563C1">rtsp://127.0.0.1:8554/test</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (open) Retrieving server options<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (open) Retrieving media info<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (request) SETUP stream 0<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (open) Opened Stream<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Setting pipeline to PLAYING ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">New clock: GstSystemClock<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (request) Sending PLAY request<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Redistribute latency...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (request) Sending PLAY request<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Redistribute latency...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Progress: (request) Sent PLAY request<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Redistribute latency...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Redistribute latency...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">0:00:05.945770874 15996 0x55c83ec97f60 WARN                 rtspsrc gstrtspsrc.c:5964:gst_rtspsrc_reconnect:<rtspsrc0> warning: Could not receive any UDP packets for 5.0000 seconds, maybe your firewall is blocking it. Retrying using a tcp
 connection.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">WARNING: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Additional debug info:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">../gst/rtsp/gstrtspsrc.c(5964): gst_rtspsrc_reconnect (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Could not receive any UDP packets for 5.0000 seconds, maybe your firewall is blocking it. Retrying using a tcp connection.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Redistribute latency...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">And it is stuck here<br>
<br>
I’m using the code below:<br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">#include</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178"><gst/gst.h></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">#include</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178"><gst/app/gstappsink.h></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">#include</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178"><gst/app/gstappsrc.h></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">#include</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178"><gst/rtsp-server/rtsp-server.h></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstElement</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">gSink</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">nullptr</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">static</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">void</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">InitPipeline</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">()</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">{</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstElement</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lPipeline</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_pipeline_new</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"x264-pipeline"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstElement</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSource</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_element_factory_make</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"videotestsrc"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"source"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstElement</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lEncoder</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_element_factory_make</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"x264enc"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"x264-encoder"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstElement</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSink</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> 
  </span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_element_factory_make</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"appsink"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"appsink"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_bin_add_many</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">GST_BIN</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lPipeline</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">),<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSource</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lEncoder</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSink</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955">    // gst_bin_add_many( GST_BIN( lPipeline ), lSource, lSink, NULL );</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_object_set</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lEncoder</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"tune"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">4</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955">//
 4 = zerolatency</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstCaps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lCaps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">       <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_caps_new_simple</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"video/x-raw"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"width"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">G_TYPE_INT</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">384</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"height"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">G_TYPE_INT</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">288</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"framerate"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">GST_TYPE_FRACTION</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">10</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">1</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">if</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">!</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_element_link_filtered</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSource</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lEncoder</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lCaps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)
 )</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955">    // if( !gst_element_link_filtered( lSource, lSink, lCaps ) )</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">    {</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">       <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_caps_unref</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lCaps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">       <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">throw</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">    }</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_caps_unref</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lCaps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_element_link</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lEncoder</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSink</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstStateChangeReturn</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">ret</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_element_set_state</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lPipeline</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4FC1FF">GST_STATE_PLAYING</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">if</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">ret</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">==</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4FC1FF">GST_STATE_CHANGE_FAILURE</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">    {</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">       <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">throw</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">    }</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">gSink</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSink</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">static</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">void</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">need_data</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstElement</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">guint</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">unused</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">void</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">aUnused</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">{</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstSample</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSample</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_app_sink_pull_sample</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">GST_APP_SINK_CAST</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">gSink</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)
 );</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstFlowReturn</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lRet</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_app_src_push_sample</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">GST_APP_SRC</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">),<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSample</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_sample_unref</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">lSample</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">return</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">static</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">void</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">media_configure</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstRTSPMediaFactory</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">factory</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstRTSPMedia</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">media</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">gpointer</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">user_data</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">{</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstElement</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">element</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">element</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_rtsp_media_get_element</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">media</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_bin_get_by_name_recurse_up</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">GST_BIN</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">element</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">),<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"mysrc"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_util_set_object_arg</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">G_OBJECT</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">),<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"format"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"time"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">if</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstPad</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">pad</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_element_get_static_pad</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">gSink</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"sink"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)
 )</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">    {</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">       <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_print</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"Got
 pad</span><span style="font-size:10.5pt;font-family:Consolas;color:#D7BA7D">\n</span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">       <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstCaps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">caps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_pad_get_current_caps</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">pad</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">       <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">if</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">caps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">        {</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">           <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">auto</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">caps_str</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_caps_to_string</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">caps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">           <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_print</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"Got
 caps<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">%s</span><span style="font-size:10.5pt;font-family:Consolas;color:#D7BA7D">\n</span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">caps_str</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">           <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_object_set</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">G_OBJECT</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">),<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"caps"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">caps</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">           <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_caps_unref</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">caps</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">        }</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">    }</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">g_signal_connect</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"need-data"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,
 (</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GCallback</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">need_data</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_object_unref</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">appsrc</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_object_unref</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">element</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">int</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">main</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">int</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argc</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">char</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argv</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">[]
 )</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">{</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GMainLoop</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">loop</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstRTSPServer</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">server</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstRTSPMountPoints</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">mounts</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GstRTSPMediaFactory</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">*</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">factory</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_init</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">&</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argc</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">&</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argv</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">loop</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_main_loop_new</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">FALSE</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">InitPipeline</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">();</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">server</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_rtsp_server_new</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">();</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">mounts</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_rtsp_server_get_mount_points</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">server</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">factory</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">=</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_rtsp_media_factory_new</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">();</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955">    // gst_rtsp_media_factory_set_launch( factory, "( appsrc name=mysrc ! videoconvert ! x264enc ! rtph264pay name=pay0 pt=96
 )" );</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_rtsp_media_factory_set_launch</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">factory</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"(
 appsrc name=mysrc ! rtph264pay name=pay0 pt=96 )"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">g_signal_connect</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">factory</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"media-configure"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,
 (</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">GCallback</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">)</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">media_configure</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_rtsp_mount_points_add_factory</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">mounts</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"/test"</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">factory</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_object_unref</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">mounts</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">gst_rtsp_server_attach</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">server</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">,<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">NULL</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_print</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"stream
 ready at<span class="apple-converted-space"> </span><a href="rtsp://127.0.0.1:8554/test/n"><span style="color:#0563C1">rtsp://127.0.0.1:8554/test</span></a></span><span style="font-size:10.5pt;font-family:Consolas;color:#D7BA7D"><a href="rtsp://127.0.0.1:8554/test/n"><span style="color:#0563C1">\n</span></a></span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">g_main_loop_run</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">(<span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">loop</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">   <span class="apple-converted-space"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">return</span><span class="apple-converted-space"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC"> </span></span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">0</span><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:14.25pt;background:#1F1F1F"><span style="font-size:10.5pt;font-family:Consolas;color:#CCCCCC">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Is it a good idea to convert before the appsink?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for your time<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>