<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;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
mso-fareast-language:EN-GB;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@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-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello everyone<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have encountered a problem using udpsink in windows and wonder if anyone can help.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am not sure if the issue is down to me (as I have ported it use the current V1.0 release), or it is in fact a bug.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The problem that I have is that the udpsink is not sending any packets at all. The code catches the following warning message being emitted from the pipeline:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoPlainText">WarningMessage:- Error sending UDP packet<o:p></o:p></p>
<p class="MsoPlainText">DebugInfo:- gstmultiudpsink.c(545): gst_multiudpsink_= render (): /GstPipeline:pipeline0/GstUDPSink:rtpsink:<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:72.0pt;text-indent:36.0pt">Reason: Error sending message: The system detected an invalid pointer address in attempting to use a pointer argument in a call.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have run the equivalent pipeline from a launch line on a virtual machine running Ubuntu V12.04 and everything works fine. I can even connect to this stream using windows but the same message is emitted by the udpsink in this pipeline
that is used for the rtcp connection.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any help or information would be appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kind Regards<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jon<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The code that I have ported is as follows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/*</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * A Hands-On Course in GStreamer Development</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * Copyright 2008 Wim Taymans <wim.taymans@gmail.com></span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * </span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * Permission is hereby granted, free of charge, to any person obtaining a</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * copy of this software and associated documentation files (the "Software"),</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * to deal in the Software without restriction, including without limitation</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * and/or sell copies of the Software, and to permit persons to whom the</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * Software is furnished to do so, subject to the following conditions:</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * The above copyright notice and this permission notice shall be included in</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * all copies or substantial portions of the Software.</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * DEALINGS IN THE SOFTWARE.</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">#include</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB"><gst/gst.h></span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/*</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * A simple RTP server</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * sends the output of alsasrc as alaw encoded RTP on port 5002, RTCP is sent on</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * port 5003. The destination is 127.0.0.1.</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * the receiver RTCP reports are received on port 5007</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * .-------. .-------. .-------. .----------. .-------.</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * | src | |alawenc| |pcmapay| | rtpbin | |udpsink| RTP</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * | src->sink src->sink src->send_rtp send_rtp->sink | port=5002</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * '-------' '-------' '-------' | | '-------'</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * | |</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * | | .-------.</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * | | |udpsink| RTCP</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * | send_rtcp->sink | port=5003</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * .-------. | | '-------' sync=false</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * RTCP |udpsrc | | | async=false</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * port=5007 | src->recv_rtcp |</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * '-------' '----------'</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">static</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">void</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">on_ssrc_active_cb (</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GObject</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">session</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GObject</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">source</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gpointer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">user_data</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">{<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstStructure</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *stats;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gchar</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *str;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* get the source stats */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_object_get (</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">source</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"stats"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, &stats, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* simply dump the stats structure */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> str = gst_structure_to_string (stats);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"source stats: %s\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, str);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_structure_free (stats);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_free (str);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">}<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">static</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">void</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">on_sending_rtcp_cb (</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GObject</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">session</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstBuffer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">buffer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gboolean</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">early</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gpointer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">user_data</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">{<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstMapInfo</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> info;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"we're sending RTCP\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">if</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">(gst_buffer_map(</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">buffer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, &info, </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_MAP_READ</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">))<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_util_dump_mem (info.data, gst_buffer_get_size(</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">buffer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">));<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_buffer_unmap(</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">buffer</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, &info);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">}<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">int</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">main (</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">int</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">argc</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">char</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">argv</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">[])<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">{<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstElement</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *pipeline, *src, *enc, *pay;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstElement</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *rtpbin, *rtpsink, *rtcpsink, *rtcpsrc;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GError</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *error = </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstStateChangeReturn</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> res;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstBus</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *bus;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gboolean</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> done, eres;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstPadLinkReturn</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> lres;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstPad</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *srcpad, *sinkpad;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GObject</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *session;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gchar</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *host = </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"127.0.0.1"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* must be called first */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_init (&</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">argc</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, &</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">argv</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">if</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">(</span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">argc</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> > 1)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> host = </span><span style="font-size:10.0pt;font-family:Consolas;color:gray;mso-fareast-language:EN-GB">argv</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">[1];<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Creating pipeline\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* create the pipeline */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* "audiotestsrc ! alawenc ! rtppcmapay ! udpsink port=5002 host=127.0.0.1" */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> pipeline = gst_pipeline_new (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"pipeline"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (pipeline);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> src = gst_element_factory_make (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"audiotestsrc"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"src"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (src);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> enc = gst_element_factory_make (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"alawenc"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"enc"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (enc);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> pay = gst_element_factory_make (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"rtppcmapay"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"pay"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (pay);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* add capture and payloading to the pipeline and link */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_bin_add_many (</span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_BIN</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (pipeline), src, enc, pay, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> eres = gst_element_link_many (src, enc, pay, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (eres == </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">TRUE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* the rtpbin element */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> rtpbin = gst_element_factory_make (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"rtpbin"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"rtpbin"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (rtpbin);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_bin_add (</span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_BIN</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (pipeline), rtpbin);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* the udp sinks and source we will use for RTP and RTCP */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> rtpsink = gst_element_factory_make (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"udpsink"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"rtpsink"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (rtpsink);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_object_set (rtpsink, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"port"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, 5002, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"host"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, host, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> rtcpsink = gst_element_factory_make (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"udpsink"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"rtcpsink"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (rtcpsink);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_object_set (rtcpsink, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"port"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, 5003, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"host"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, host, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* no need for synchronisation or preroll on the RTCP sink */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_object_set (rtcpsink, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"async"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">FALSE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"sync"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">FALSE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> rtcpsrc = gst_element_factory_make (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"udpsrc"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"rtcpsrc"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (rtcpsrc);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_object_set (rtcpsrc, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"port"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, 5007, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_bin_add_many (</span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_BIN</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (pipeline), rtpsink, rtcpsink, rtcpsrc, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* now link all to the rtpbin, start by getting an RTP sinkpad for session 0 */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> sinkpad = gst_element_get_request_pad (rtpbin, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"send_rtp_sink_0"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> srcpad = gst_element_get_static_pad (pay, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"src"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> lres = gst_pad_link (srcpad, sinkpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (lres == </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_PAD_LINK_OK</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_object_unref (srcpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* get the RTP srcpad that was created when we requested the sinkpad above and</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * link it to the rtpsink sinkpad*/</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> srcpad = gst_element_get_static_pad (rtpbin, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"send_rtp_src_0"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> sinkpad = gst_element_get_static_pad (rtpsink, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"sink"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> lres = gst_pad_link (srcpad, sinkpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (lres == </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_PAD_LINK_OK</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_object_unref (srcpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_object_unref (sinkpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* get an RTCP srcpad for sending RTCP to the receiver */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> srcpad = gst_element_get_request_pad (rtpbin, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"send_rtcp_src_0"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> sinkpad = gst_element_get_static_pad (rtcpsink, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"sink"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> lres = gst_pad_link (srcpad, sinkpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (lres == </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_PAD_LINK_OK</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_object_unref (sinkpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* we also want to receive RTCP, request an RTCP sinkpad for session 0 and</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB"> * link it to the srcpad of the udpsrc for RTCP */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> srcpad = gst_element_get_static_pad (rtcpsrc, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"src"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> sinkpad = gst_element_get_request_pad (rtpbin, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"recv_rtcp_sink_0"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> lres = gst_pad_link (srcpad, sinkpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_assert</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (lres == </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_PAD_LINK_OK</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_object_unref (srcpad);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Starting playback until EOS\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* start playing */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> res = gst_element_set_state (pipeline, </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_STATE_PLAYING</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">if</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (res == </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_STATE_CHANGE_FAILURE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">) {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"An error occured\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">//return -1;</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_BIN</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">(pipeline), </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_DEBUG_GRAPH_SHOW_ALL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"RTP Server"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* wait for EOS on the bus here */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* get the bus from the pipeline */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> bus = gst_pipeline_get_bus (</span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_PIPELINE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (pipeline));<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* setup callback for activity */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_signal_emit_by_name (rtpbin, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"get-internal-session"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, 0, &session);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">g_signal_connect</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (session, </span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"on-ssrc-active"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, (</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GCallback</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">) on_ssrc_active_cb,<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* we're going to loop here until we get the EOS message */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> done = </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">FALSE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">while</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (!done) {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GstMessage</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *message;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> message = gst_bus_timed_pop (bus, -1);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">switch</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (</span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_MESSAGE_TYPE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (message)) {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">case</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_MESSAGE_ERROR</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">:<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GError</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *err;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gchar</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *debug;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_message_parse_error (message, &err, &debug);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Error: %s\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, err->message);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">if</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (debug != </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_printerr (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Additional debug info:\n%s\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, debug);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_error_free (err);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_free (debug);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> done = </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">TRUE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">break</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">case</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_MESSAGE_WARNING</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">:<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">GError</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *err;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#2B91AF;mso-fareast-language:EN-GB">gchar</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> *debug;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_message_parse_warning (message, &err, &debug);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Warning: %s\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, err->message);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">if</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> (debug != </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_printerr (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Additional debug info:\n%s\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, debug);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_error_free (err);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_free (debug);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">break</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">case</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_MESSAGE_EOS</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">:<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"got EOS!\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> done = </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">TRUE</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">break</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">default</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">:<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* don't really care about other messages */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print(</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Unhandled %s Message.\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">, </span><span style="font-size:10.0pt;font-family:Consolas;color:#6F008A;mso-fareast-language:EN-GB">GST_MESSAGE_TYPE_NAME</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">(message));<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">
</span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">break</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_message_unref (message);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_object_unref (bus);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> g_print (</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515;mso-fareast-language:EN-GB">"Ending playback and stopping pipeline\n"</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* stop the pipeline */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_element_set_state (pipeline, </span><span style="font-size:10.0pt;font-family:Consolas;color:darkslategray;mso-fareast-language:EN-GB">GST_STATE_NULL</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:green;mso-fareast-language:EN-GB">/* Unreffing the pipeline will clean up all its children too */</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> gst_object_unref (pipeline);<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;font-family:Consolas;color:blue;mso-fareast-language:EN-GB">return</span><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"> 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB">}<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>