[gst-devel] ffdec_mpeg4 win32gst problem

Michal Benes michal.benes at itonis.tv
Wed May 16 17:01:21 CEST 2007


Hi,

	you need to set correct caps on the buffers you send.  Use gst-inspect
ffdec_mpeg4 to check which caps are expected.

	Michal

PS.: From where are you getting the mpeg4 packets? What you are doing
seems rather strange, consider creating a proper source element.

Riccardo Corona píše v Po 14. 05. 2007 v 17:30 +0200:
> Hi,
> I'm developing a gst-app with MFC: I'm currently trying to show an
> mpeg4 stream with gst.
> I'm using the windows gst one from
> http://perso.orange.es/moutte983/gstreamer/.
> My goal is to use a fakesrc in which getting mpeg4 packet (done) and
> show with gst the video but I get this message: "ffdec_mpeg4:input
> format was not set before data start ".
> Here's my gst core:
> 
> .....
> 
> GstElement *pipeline, *fakesrc, *flt, *conv,
> *videosink,*decoder,*videoscale,*par;
>     GstBus* bus;
>     GMainLoop *loop;
> 
>     /* init GStreamer */
>     gst_init (NULL,NULL); 
>     loop = g_main_loop_new (NULL, FALSE);
> 
>     pipeline = gst_pipeline_new ("pipeline");
>     fakesrc = gst_element_factory_make ("fakesrc", "source");
>     decoder = gst_element_factory_make
> ("ffdec_mpeg4","mpeg4-decoder"); 
>     videoscale = gst_element_factory_make ("videoscale",
> "scaling-video");
>     par = gst_element_factory_make ("capsfilter", "dimens");
> 
>     g_object_set (G_OBJECT(par), "caps", 
>       gst_caps_new_simple( "video/x-raw-yuv",
>         "width", G_TYPE_INT, 720,
>         "height", G_TYPE_INT, 576,NULL),
>       NULL );
> 
>     conv = gst_element_factory_make ("ffmpegcolorspace",
> "converter"); 
>     videosink = gst_element_factory_make ("directdrawsink",
> "directdraw");
>     if (!pipeline || !fakesrc || !decoder || !videoscale || !par || !
> conv || !videosink) {
>         g_print ("One element could not be created\n"); 
>         return -1;
>     }
> 
>     /* put all elements in a bin */
>     gst_bin_add_many (GST_BIN (pipeline),
>             fakesrc, decoder,videoscale ,par, conv, videosink, NULL);
> 
>     /* link together */ 
>     gst_element_link_many (fakesrc,decoder,videoscale, par, conv,
> videosink, NULL);
> 
> 
>     bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
>     gst_bus_add_watch (bus, bus_call, loop);
>     gst_object_unref (bus); 
> 
>     g_object_set (G_OBJECT (fakesrc),
>         "signal-handoffs", TRUE,
>         "sizemax", 720 * 288 * 2,
>         "sizetype", 2, NULL);
> 
>     g_signal_connect (fakesrc, "handoff", G_CALLBACK (cb_handoff),
> pParam); 
> 
>     
>     /* Now set to playing and iterate. */
>     gst_element_set_state (pipeline, GST_STATE_PLAYING);
>     g_main_loop_run (loop);
> 
>     /* clean up nicely */
>     gst_element_set_state (pipeline, GST_STATE_NULL); 
>     gst_object_unref (GST_OBJECT (pipeline));
> 
>     return 0;
> }
> 
> ...
> 
> 
> 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. 
> 
> Thank's.
> -- 
> Riccardo Corona 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list