<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
ol
        {margin-bottom:0cm}
ul
        {margin-bottom:0cm}
-->
</style>
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am trying to create an application that records RTSP/RTP stream to a MP4 file.
</p>
<p class="MsoNormal">I am able to record the stream using gst-launch in the following way as mentioned below.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><i>gst-launch-0.10.exe rtspsrc location=rtsp://streaming1.osu.edu/media2/ufsap/ufsap.mov !  rtph264depay byte-stream=false ! capsfilter caps="video/x-h264,width=320,height=240,framerate=(fraction)25/1" ! mp4mux ! filesink location=d:\\test\\dump.mp4</i></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-autospace:none">Recording is not working, when I follow same steps in my application. I get NULL caps, when I make “gst_pad_get_negotiated_caps” call on<span style="font-size:9.0pt; font-family:Consolas">
</span>rtph264depay source pad after linking rtph264depay and mp4mux elements.</p>
<p class="MsoNormal" style="text-autospace:none">The dot files generated using my application and gst-launch are also slightly different. The .dot files are also attached to this message.<span style="font-size:9.0pt; font-family:Consolas"></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Can someone please help me with this?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Please find the source file attached. Here are the steps I followed in the application.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">main function </p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Creates rtspsrc, rtph264depay, mp4mux and elements </p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Sets location property of rtspsrc to “rtsp://streaming1.osu.edu/media2/ufsap/ufsap.mov”</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Attaches a signal handler “pad_added_handler” to pad-added on rtspsrc</p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt; font-family:Consolas"> </span></p>
<p class="MsoNormal">pad_added_handler function</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Checks if it is application/x-rtp and H264 type</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Sets byte-stream property on rtph264depay to false</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Links new pad and sink pad on rtph264depay</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Creates cap element with gst_caps_new_simple( "video/x-h264", ”width", G_TYPE_INT, 320, "height", G_TYPE_INT, 240,"framerate", GST_TYPE_FRACTION, 25, 1, NULL)</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Links rtph264depay and mp4mux using created caps</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="font-family:Symbol"><span style="">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span>Links mp4mux and filesink</p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt; font-family:Consolas; color:#A31515"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt; font-family:Consolas; color:#A31515"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt; font-family:Consolas; color:#A31515"> </span></p>
<p class="MsoNormal">Regards,</p>
<p class="MsoNormal">Raja</p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
<br>
Statement Of Confidentiality:<br>
<br>
This electronic message transmission, and all attachments, contains information from Extron Electronics which is confidential and privileged. The information is for the exclusive viewing or use of the intended recipient. If you are not the intended recipient,
 be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender immediately by a "reply to sender only" message and destroy all
 electronic and hard copies of the communication, including attachments.<br>
</font>
</body>
</html>