<br><br><div class="gmail_quote">On Tue, Nov 24, 2009 at 12:14 AM, Honolulu <span dir="ltr">&lt;<a href="mailto:Honolulu1986@gmail.com">Honolulu1986@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
Hi, all<br>
I have a pipeline . I use ximagesink for display.<br>
It works fine in gst-launch..----&gt;:<br>
gst-launch-0.10 filesrc location=/home/lvwenwen/princess.avi ! decodebin !<br>
Xvimagesink<br>
<br>
but when I run the C program that looks like this :<br>
<br>
int main(int argc,char *argv[])<br>
{<br>
    GMainLoop *loop;<br>
    GstElement *pipeline,*source,*parser,*decoder,*con,*sink;<br>
    GstBus *bus;<br>
    char *path=&quot;/home/lvwenwen/princess.avi&quot;;<br>
<br>
    gst_init(&amp;argc,&amp;argv);<br>
<br>
    loop = g_main_loop_new(NULL,FALSE);<br>
<br>
    pipeline=gst_pipeline_new(&quot;avi&quot;);<br>
    source=gst_element_factory_make(&quot;filesrc&quot;,&quot;file-source&quot;);<br>
    decoder=gst_element_factory_make(&quot;decodebin&quot;,&quot;decoder&quot;);<br>
    sink=gst_element_factory_make(&quot;xvimagesink&quot;,&quot;file-output&quot;);<br>
<br>
    if(!pipeline || !source || !decoder || !sink){<br>
       g_print(&quot;One element could not be created\n&quot;);<br>
       return -1;<br>
    }<br>
<br>
    g_object_set(G_OBJECT(source),&quot;location&quot;,path,NULL);<br>
    gst_bin_add_many(GST_BIN(pipeline),source,decoder,sink,NULL);<br>
    gst_element_link_many(source,decoder,sink,NULL);<br></div></blockquote><div><br></div><div>You can&#39;t link decodebin here, you&#39;ll need to listen for pad-added signals, read the chapter in the manual about dynamic pads and you&#39;ll understand.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
</div>    g_print(&quot;Setting to play....\n&quot;);<br>
<div class="im"><br>
    gst_element_set_state(pipeline,GST_STATE_PLAYING);<br>
</div>    g_print(&quot;Running...\n&quot;);<br>
<div><div></div><div class="h5"><br>
    g_main_loop_run(loop);<br>
<br>
    return 0;<br>
}<br>
<br>
When I try to run this, it does not show the video image output. There is<br>
just no response. What may be the issue ?<br>
<br>
<br>
Any help will be useful.<br>
<br>
Thanks &amp; Best regards,<br>
<br>
Honolulu<br>
--<br>
View this message in context: <a href="http://old.nabble.com/Can%27t-play-video-well-using-gstreamer-tp26489499p26489499.html" target="_blank">http://old.nabble.com/Can%27t-play-video-well-using-gstreamer-tp26489499p26489499.html</a><br>


Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what&#39;s new with<br>
Crystal Reports now.  <a href="http://p.sf.net/sfu/bobj-july" target="_blank">http://p.sf.net/sfu/bobj-july</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thiago Sousa Santos<br>