<pre><span style="color: rgb(0, 128, 0);"><br>Hi All,<br>I have two issues regarding neonhttpsrc<br><br><br>1. When I tried to playback the file using<br><br>gst-launch -v playbin uri=<a href="https://193.164.132.164/servlet/redirect.srv/s1/s0/s0/s721/p1/p-rat.ts" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
<br>http://127.0.0.1/p-rat.ts</a> it works fine.<br><br>But instead of playbin if i will use<br>gst-launch -v neonhttpsrc location=<a href="https://193.164.132.164/servlet/redirect.srv/s1/s0/s0/s721/p1/p-rat.ts" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
<br>http://127.0.0.1/p-rat.ts</a> ! queue ! filesink location=/root/temp.ts<br><br><br><br>OR<br><br><br><br><br>#include &lt;stdio.h&gt;</span><br><span style="color: rgb(0, 128, 0);">#include &lt;gst/gst.h&gt;</span><br>
<span style="color: rgb(0, 128, 0);"><br>#include &lt;string.h&gt;</span><br><br><span style="color: rgb(128, 0, 0);">static</span> GstElement *bin,*httpSource,*sink_file,*queue;<br>GstElement *pipeline;<br><span style="color: rgb(128, 0, 0);">
static</span> GMainLoop *loop;<br><br>GstBus *bus;<br><span style="color: rgb(128, 0, 0);">char</span> url[<span style="color: rgb(0, 0, 255);">255</span>];<br><span style="color: rgb(128, 0, 0);">char</span> outfile[<span style="color: rgb(0, 0, 255);">
255<br></span>]=<span style="color: rgb(221, 0, 0);">&quot;Test.dump&quot;</span>;<br><br>gboolean callback_bus(GstBus *bus, GstMessage *message, gpointer data);<br><span style="color: rgb(128, 0, 0);"></span><span style="color: rgb(128, 0, 0);">
<br></span><br><span style="color: rgb(128, 0, 0);">int</span> main(<span style="color: rgb(128, 0, 0);">int</span> argc,<span style="color: rgb(128, 0, 0);">char</span> *argv[])<br>{<br><br>        GstStateChangeReturn Ret=GST_STATE_CHANGE_ASYNC;
<br><br><br>//        <span style="color: rgb(128, 128, 128);"><i>printf(&quot;\nEnter the http url\n&quot;);</i></span><br><span style="color: rgb(128, 128, 128);"><i>  //      scanf(&quot;%s&quot;,url);</i></span><br>        
<br><span style="color: rgb(128, 128, 128);"><i>strcpy(url,&quot;<a href="https://193.164.132.164/servlet/redirect.srv/s1/s0/s0/s721/p1/p-rat.ts" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://127.0.0.1/p-rat.ts
<br></a>&quot;);</i></span><br><br>        gst_init(NULL,NULL);<br>       <br>        loop = g_main_loop_new(NULL,FALSE);<br>        g_assert(loop!=NULL);<br>       <br>        queue=gst_element_factory_make(<span style="color: rgb(221, 0, 0);">
<br>&quot;queue&quot;</span>,<span style="color: rgb(221, 0, 0);">&quot;queue&quot;</span>);<br>        g_assert(queue!=NULL);      <br>        <br>       <br>        sink_file=gst_element_factory_make(<span style="color: rgb(221, 0, 0);">
<br>&quot;filesink&quot;</span>,<span style="color: rgb(221, 0, 0);">&quot;sink_file&quot;</span>); <br>        g_assert(sink_file!=NULL);    <br>            <br>        <br>      <br>         pipeline=gst_pipeline_new(<span style="color: rgb(221, 0, 0);">
<br>&quot;pipeline&quot;</span>);<br>      <br>         httpSource=gst_element_factory_make(<span style="color: rgb(221, 0, 0);">&quot;neonhttpsrc&quot;</span>,<span style="color: rgb(221, 0, 0);">&quot;httpSource&quot;</span>
<br>);<br>         g_assert(httpSource!= NULL);<br>          <br>        gst_bin_add_many(GST_BIN(pipeline),httpSource,queue,sink_file,NULL);<br><span style="color: rgb(128, 128, 128);"></span><br>       <br>        <b>if
</b><br>(! gst_element_link_many(httpSource,queue,sink_file,NULL))<br>           {  printf(<span style="color: rgb(221, 0, 0);">&quot;</span><span style="color: rgb(255, 0, 255);">\n</span><span style="color: rgb(221, 0, 0);">
Failed to link elements<br></span><span style="color: rgb(255, 0, 255);"><br>\n</span><span style="color: rgb(221, 0, 0);">&quot;</span>);<br>              exit(<span style="color: rgb(0, 0, 255);">0</span>);<br>           }
<br>       gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(pipeline)),callback_bus,NULL);<br><br><br>       g_object_set(G_OBJECT(httpSource),<span style="color: rgb(221, 0, 0);">&quot;location&quot;</span>,<span style="color: rgb(0, 0, 255);">
</span>url,NULL);<br>       g_object_set(G_OBJECT(sink_file),<span style="color: rgb(221, 0, 0);"><br>&quot;location&quot;</span>,outfile,NULL);<br><br>      g_print(<span style="color: rgb(221, 0, 0);">&quot;Setting the state of gstreamer to play&quot;
</span>);<br>       gst_element_set_state(pipeline,GST_STATE_PLAYING);<br><br>       <br><span style="color: rgb(128, 128, 128);"><i>//       g_timeout_add(3000,(GSourceFunc)(Test_pause),NULL);</i></span><br><br>       g_main_loop_run(loop);
<br><br><b>return</b> <span style="color: rgb(0, 0, 255);"><br>1</span>;<br><br><br>}<br><br>        <br>gboolean callback_bus(GstBus *bus, GstMessage *message, gpointer data)<br>{<br>    GstState current, pending;<br>  <span style="color: rgb(128, 128, 128);">
<i>/* GstStreamInfo *info = data;*/<br></i></span><br>    GstStateChangeReturn ret = GST_STATE_CHANGE_ASYNC;<br>    <br>    <b>switch</b>(GST_MESSAGE_TYPE (message))<br>    {<br>    <b>case</b> GST_MESSAGE_EOS:<br>        
<span style="color: rgb(128, 128, 128);"><br><i>/* change the state of gstreamer to ready */</i></span><br>        gst_element_set_state (pipeline ,GST_STATE_NULL);<br>       <span style="color: rgb(128, 128, 128);"><i>/* g_main_loop_quit(loop);*/
</i></span><br>        <br><span style="color: rgb(128, 128, 128);"><i>/* Checking the set successfully changed */</i></span><br>        <b>while</b>(GST_STATE_CHANGE_SUCCESS != ret)<br>        {<br>            ret = gst_element_get_state (pipeline, &amp;current, &amp;pending, 
<br><span style="color: rgb(0, 0, 255);">0</span>);<br>        } <br>        <br><br>        g_main_loop_quit(loop);<br><br>        <b>break</b>;<br>        <br>    <b>case</b> GST_MESSAGE_ERROR:<br>        {<br>            gchar *pi8Debug;
<br><br><br>            GError *pstErr;<br>            <br>            gst_message_parse_error (message, &amp;pstErr, &amp;pi8Debug);<br>            g_free (pi8Debug);<br>            g_print (<span style="color: rgb(221, 0, 0);">
<br>&quot;Error: %s</span><span style="color: rgb(255, 0, 255);">\n</span><span style="color: rgb(221, 0, 0);">&quot;</span>, pstErr-&gt;message);<br>            g_error_free (pstErr);<br>            g_main_loop_quit (loop);
<br><br>            <b>break</b>;<br>        }<br>    <b>default</b>:<br>        <b>break</b>;<br>    }<br>    <b>return</b> <span style="color: rgb(0, 0, 255);">1</span>;<br>} <span style="color: rgb(128, 128, 128);"><i>
/* End of Function */<br></i></span><br><br><br>    It  gives an error like<br><br>Error: Could not initialize supporting library.<br><br>2.  <br>Pipeline to play the mpegts file <br>gst-launch filesrc location=file:///../../ed24p_00.ts ! flutsdemux ! ffdec_mpeg2video ! queue ! videoscale ! ffmpegcolorspace ! xvimagesink
<br><br>Works fine.<br>But same pipeline doesnt work for neonhttpsrc<br><br>gst-launch neonhttpsrc location=<a href="http://127.0.0.1/ed24p_00.ts">http://127.0.0.1/ed24p_00.ts</a> ! flutsdemux ! ffdec_mpeg2video ! queue ! videoscale ! ffmpegcolorspace ! xvimagesink
<br><br>Error:<br><br>Setting pipeline to PAUSED ...<br>ERROR: Pipeline doesn&#39;t want to pause.<br>ERROR: from element /pipeline0/neonhttpsrc0: Could not initialize supporting library.<br>Additional debug info:<br>gstneonhttpsrc.c
(598): gst_neonhttp_src_start (): /pipeline0/neonhttpsrc0:<br>Could not begin request (0)<br>Setting pipeline to NULL ...<br>FREEING pipeline ...<br><br>what can be the cause of this..<br><br>Thanks..<br><br></pre>