Hi,<br>I'm developing a gst-app with MFC: I'm currently trying to show an mpeg4 stream with gst.<br>I'm using the windows gst one from <a href="http://perso.orange.es/moutte983/gstreamer/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://perso.orange.es/moutte983/gstreamer/
</a>.<br>My goal is to use a fakesrc in which getting mpeg4 packet (done) and show with gst the video but I get this message: "<span style="font-weight: bold;">ffdec_mpeg4:input format was not set before data start</span>
".<br>Here's my gst core:<br><br>.....<br><br>GstElement *pipeline, *fakesrc, *flt, *conv, *videosink,*decoder,*videoscale,*par;<br> GstBus* bus;<br> GMainLoop *loop;<br><br> /* init GStreamer */<br> gst_init (NULL,NULL);
<br> loop = g_main_loop_new (NULL, FALSE);<br><br> pipeline = gst_pipeline_new ("pipeline");<br> fakesrc = gst_element_factory_make ("fakesrc", "source");<br> decoder = gst_element_factory_make ("ffdec_mpeg4","mpeg4-decoder");
<br> videoscale = gst_element_factory_make ("videoscale", "scaling-video");<br> par = gst_element_factory_make ("capsfilter", "dimens");<br><br> g_object_set (G_OBJECT(par), "caps",
<br> gst_caps_new_simple( "video/x-raw-yuv",<br> "width", G_TYPE_INT, 720,<br> "height", G_TYPE_INT, 576,NULL),<br> NULL );<br><br> conv = gst_element_factory_make ("ffmpegcolorspace", "converter");
<br> videosink = gst_element_factory_make ("directdrawsink", "directdraw");<br> if (!pipeline || !fakesrc || !decoder || !videoscale || !par || !conv || !videosink) {<br> g_print ("One element could not be created\n");
<br> return -1;<br> }<br><br> /* put all elements in a bin */<br> gst_bin_add_many (GST_BIN (pipeline),<br> fakesrc, decoder,videoscale ,par, conv, videosink, NULL);<br><br> /* link together */
<br> gst_element_link_many (fakesrc,decoder,videoscale, par, conv, videosink, NULL);<br><br><br> bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));<br> gst_bus_add_watch (bus, bus_call, loop);<br> gst_object_unref (bus);
<br><br> g_object_set (G_OBJECT (fakesrc),<br> "signal-handoffs", TRUE,<br> "sizemax", 720 * 288 * 2,<br> "sizetype", 2, NULL);<br><br> g_signal_connect (fakesrc, "handoff", G_CALLBACK (cb_handoff), pParam);
<br><br> <br> /* Now set to playing and iterate. */<br> gst_element_set_state (pipeline, GST_STATE_PLAYING);<br> g_main_loop_run (loop);<br><br> /* clean up nicely */<br> gst_element_set_state (pipeline, GST_STATE_NULL);
<br> gst_object_unref (GST_OBJECT (pipeline));<br><br> return 0;<br>}<br><br>...<br clear="all"><br><br>The mpeg4 stream is via tcp but I can't use tcp plugin with gstwin32 (I can't find it!), so I must use the callback.
<br><br>Thank's.<br>-- <br>Riccardo Corona