<br><br><div class="gmail_quote">On Tue, Nov 24, 2009 at 12:14 AM, Honolulu <span dir="ltr"><<a href="mailto:Honolulu1986@gmail.com">Honolulu1986@gmail.com</a>></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..---->:<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="/home/lvwenwen/princess.avi";<br>
<br>
gst_init(&argc,&argv);<br>
<br>
loop = g_main_loop_new(NULL,FALSE);<br>
<br>
pipeline=gst_pipeline_new("avi");<br>
source=gst_element_factory_make("filesrc","file-source");<br>
decoder=gst_element_factory_make("decodebin","decoder");<br>
sink=gst_element_factory_make("xvimagesink","file-output");<br>
<br>
if(!pipeline || !source || !decoder || !sink){<br>
g_print("One element could not be created\n");<br>
return -1;<br>
}<br>
<br>
g_object_set(G_OBJECT(source),"location",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't link decodebin here, you'll need to listen for pad-added signals, read the chapter in the manual about dynamic pads and you'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("Setting to play....\n");<br>
<div class="im"><br>
gst_element_set_state(pipeline,GST_STATE_PLAYING);<br>
</div> g_print("Running...\n");<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 & 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'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>