[gst-devel] [gstreamer] : gst-launch is not working on scratchbox

Awadhesh Kumar awadhesh.kumar123 at gmail.com
Sat Apr 24 14:38:03 CEST 2010


Hi,
Please tell me about, how to add autovideosink to Mameo5 sdk. I have written
my own code in cpp using Qt+gstreamer.

code:   /* create a new bin to hold the elements */
  bin = gst_pipeline_new ("pipeline");

  /* create a disk reader */
  filesrc = gst_element_factory_make ("filesrc", "disk_source");
  g_assert (filesrc);

  g_object_set (G_OBJECT (filesrc), "location", "d.mpg", NULL);

  vdecoder = gst_element_factory_make ("decodebin2", "decode");
  if (!vdecoder) {
    g_print ("could not find plugin \"decodebin\"");
    exit (0);
  }

  colorspace = gst_element_factory_make ("ffmpegcolorspace", "color_space");
  g_assert (colorspace);

  videosink = gst_element_factory_make ("autovideosink", "play_video");
  g_assert (videosink);

  /* add objects to the main pipeline */
  gst_bin_add_many (GST_BIN (bin), filesrc, vdecoder, colorspace, videosink,
NULL);

  /* link the elements */
  gst_element_link_many (filesrc, vdecoder, colorspace, videosink, NULL);

  gst_element_set_state (videosink, GST_STATE_READY);

  QApplication::syncX ();
  gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (videosink), frame -> winId
());

  /* start playing */
  gst_element_set_state (bin, GST_STATE_PLAYING);

Error for this code:
[sbox-FREMANTLE_X86: ~/Qt/Qt/my-app/simple-player] > run-standalone.sh
./simple-player
simple-player[12634]: GLIB CRITICAL ** Gtk - gtk_widget_set_sensitive:
assertion `GTK_IS_WIDGET (widget)' failed
simple-player[12634]: GLIB CRITICAL ** GStreamer -
gst_implements_interface_cast: assertion `gst_element_implements_interface
(GST_ELEMENT (from), iface_type)' failed
simple-player[12634]: GLIB CRITICAL ** default -
gst_x_overlay_set_xwindow_id: assertion `overlay != NULL' failed

and it not display the video.

Plaese any one help me.

Thanks,
Awadhesh



On Sat, Apr 24, 2010 at 1:36 PM, Awadhesh Kumar <awadhesh.kumar123 at gmail.com
> wrote:

> Hi,
>
> Thanks for your feedback, suggestion and so early response.
>
> Awadhesh
>
> On Fri, Apr 23, 2010 at 11:10 PM, sudarshan bisht <
> bisht.sudarshan at gmail.com> wrote:
>
>> Hi ,
>> Did you start Xephyr ?  If not then run the following commands  :-
>>
>>  1) export DISPLAY=:2   ( run it in linux terminal)
>>  2) ./start-xephyr&          ( run it in linux terminal)
>>  3) /scratchbox/login      ( now login to scratchbox)
>>  4) af-sb-init.sh start       ( run it in scratchbox)
>>
>> Then run the pipeline in scratchbox .
>>
>> Hopefully you would see some display .
>>
>>
>>
>>
>> On Fri, Apr 23, 2010 at 7:24 PM, Awadhesh Kumar
>> <awadhesh.kumar123 at gmail.com> wrote:
>> > I am using Maemo5 sdk scratchbox on ubuntu9.10
>> >
>> > On Fri, Apr 23, 2010 at 7:13 PM, Kapil Agrawal <kapil.agl at gmail.com>
>> wrote:
>> >>
>> >> Please , describe what environment/platform you are trying ?
>> >>
>> >> On Fri, Apr 23, 2010 at 6:43 PM, Awadhesh Kumar
>> >> <awadhesh.kumar123 at gmail.com> wrote:
>> >>>
>> >>> Hi all,
>> >>>
>> >>> is any one help me. what is problem about below code.
>> >>>
>> >>> 1> gst-launch-0.10 filesrc location = /home/mm4/video/d.mpg !
>> decodebin2
>> >>> ! xvimagesink
>> >>> for 1st command, it is shown
>> >>>
>> >>> Setting pipeline to PAUSED ...
>> >>> ERROR: Pipeline doesn't want to pause.
>> >>> ERROR: from element
>> /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
>> >>> Could not initialise Xv output
>> >>> Additional debug info:
>> >>> xvimagesink.c(1426): gst_xvimagesink_get_xv_support ():
>> >>> /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
>> >>> No port available
>> >>> Setting pipeline to NULL ...
>> >>> Freeing pipeline ...
>> >>> [sbox-FREMANTLE_X86: ~] >
>> >>>
>> >>>
>> >>> 2> gst-launch-0.10 filesrc location = /home/mm4/video/d.mpg !
>> decodebin2
>> >>> ! ximagesink
>> >>> for 2nd command, it is shown
>> >>>
>> >>> Setting pipeline to PAUSED ...
>> >>> Pipeline is PREROLLING ...
>> >>>
>> >>>
>> >>> for both commnads, Nothing output.
>> >>> Any one suggest me, how to show video on scratchbox using gst-launch.
>> >>>
>> >>>
>> >>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>>
>> >>> _______________________________________________
>> >>> gstreamer-devel mailing list
>> >>> gstreamer-devel at lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> http://www.linkedin.com/in/kapilagrawal
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >>
>> >> _______________________________________________
>> >> gstreamer-devel mailing list
>> >> gstreamer-devel at lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>> >>
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > gstreamer-devel mailing list
>> > gstreamer-devel at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>> >
>> >
>>
>>
>>
>> --
>> Regards,
>>
>> Sudarshan Bisht
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100424/2fde5bc2/attachment.htm>


More information about the gstreamer-devel mailing list