thank you very much. I had read about the pads but you help put it into context for what I was doing and I was able to get things rolling.<br><br><div class="gmail_quote">On Mon, Aug 15, 2011 at 12:04 PM, Sudarshan Bisht <span dir="ltr"><<a href="mailto:bisht.sudarshan@gmail.com">bisht.sudarshan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><span style="background-color:rgb(255, 255, 255)"><font face="arial, sans-serif">In your application rtph264depay and </font>mpegtsmux<font face="arial, sans-serif"> can not be linked automatically because </font>muxers<font face="arial, sans-serif"> have got "request pads", for more information about "request pads" and how you link them with normal pads, have a look at following link;</font><br>
</span><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html" style="color:rgb(0, 0, 204)" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html</a></span><div>
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Aug 15, 2011 at 7:27 PM, android6011 <span dir="ltr"><<a href="mailto:android6011@gmail.com" target="_blank">android6011@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hello everyone, I am trying to replicate the following "gst-launch rtspsrc location=rtsp://<a href="http://10.10.10.3:554" target="_blank">10.10.10.3:554</a> ! rtph264depay ! mpegtsmux ! filesink location=out.ts" .<div>
<br></div>
<div>This line works in producing video output but when the following code is used the output file is always 0 in size. Any pointers on why this might be happening would be appreciated<br><div><br></div><div><div>#include <stdio.h></div>
<div>#include <gst/gst.h></div><div><br></div><div>int main (int argc, char *argv[])</div><div>{</div><div><span style="white-space:pre-wrap">        </span>printf("STARTING %d \n",1);</div><div>
<span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//Init</div><div><span style="white-space:pre-wrap">        </span>gst_init (&argc, &argv);</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//Get Ready</div><div><span style="white-space:pre-wrap">        </span></div>
<div><span style="white-space:pre-wrap">        </span>GstPipeline *pipeline = GST_PIPELINE(gst_pipeline_new("pipeline"));</div><div><span style="white-space:pre-wrap">        </span>printf("Created Pipeline\n");</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//Prep Source</div><div><span style="white-space:pre-wrap">        </span>GstElement *source = gst_element_factory_make("rtspsrc","source");</div>
<div><span style="white-space:pre-wrap">        </span>g_object_set(G_OBJECT(source),"location","rtsp://<a href="http://10.10.10.3:554" target="_blank">10.10.10.3:554</a>",NULL);</div><div><span style="white-space:pre-wrap">        </span>printf("Created SRC\n");</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//Prep Decode</div><div><span style="white-space:pre-wrap">        </span>GstElement *demux =gst_element_factory_make("rtph264depay","demux");</div>
<div><span style="white-space:pre-wrap">        </span>printf("Created Demux\n");</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//Prep Encode</div>
<div><span style="white-space:pre-wrap">        </span>GstElement *mux = gst_element_factory_make("mpegtsmux","mux");</div><div><span style="white-space:pre-wrap">        </span>printf("Created Mux\n");</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//prep output</div><div><span style="white-space:pre-wrap">        </span>GstElement *dest = gst_element_factory_make("filesink","dest");</div>
<div><span style="white-space:pre-wrap">        </span>g_object_set(G_OBJECT(dest),"location","output.ts",NULL);</div><div><span style="white-space:pre-wrap">        </span>printf("Created Output\n");</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//Link</div><div><span style="white-space:pre-wrap">        </span>gst_element_link_many(source,demux,mux,dest,NULL);</div>
<div><span style="white-space:pre-wrap">        </span>printf("Done Linking\n");</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>//Add</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>gst_bin_add_many(GST_BIN(pipeline),source,demux,mux,dest,NULL);</div><div><span style="white-space:pre-wrap">        </span>printf("Added Elements To Pipe\n");</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span></div><div>
<span style="white-space:pre-wrap">        </span>gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);</div><div><span style="white-space:pre-wrap">        </span>printf("CSet State\n");</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>GMainLoop *loop = g_main_loop_new(NULL,FALSE);</div><div><span style="white-space:pre-wrap">        </span>printf("Starting Loop...\n");</div>
<div><span style="white-space:pre-wrap">        </span>g_main_loop_run(loop);</div><div> </div><div><br></div><div> </div><div><span style="white-space:pre-wrap">        </span>printf("done\n");</div>
<div><span style="white-space:pre-wrap">        </span>return 0;</div><div>}</div></div><div><br></div></div>
<br></div></div>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br><font color="#888888"><br>Sudarshan Bisht<br>
</font></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>