[gst-devel] Snapshot script - strange gobject/gtype conflict

Stefan Kost ensonic at hora-obscura.de
Wed Jul 22 09:26:53 CEST 2009


hi,

Olivier Aubert schrieb:
> Hello
>
> I have just implemented a snapshot-taking module through a dedicated
> "playbin ! ffmpegcolorspace ! pngenc"  pipeline, ending in a custom sink
> named notifysink, which can then be used to process/save the resulting
> PNGs. It is inspired by the code in Pitivi, but without its dependencies
> on the whole framework which made it un-reusable as is. 
>   
without looking at the code, are you aware that playbin and camerabin
both have a snapshot code too.
gst-plugins-base/gst/playback/gstscreenshot.c
gst-plugins-bad/gst/camerabin/camerabinpreview.c

Stefan
> The code is available at
> http://svn.gna.org/viewcvs/advene/trunk/lib/advene/util/snapshotter.py
> and it works well in standalone mode as a script, invoked by
>
> snapshotter.py movie.avi 1200 5400 2800 [list of timestamps...]
>
> or in interactive mode (through a pygtk evaluator which allows
> interactive use, download also
> http://svn.gna.org/viewcvs/advene/trunk/lib/advene/gui/evaluator.py
> if  you want to try it interactively).
>
> However, a problem arises when I try to use the module in my
> application, which already has a running gst pipeline (to play the
> video). Simply adding these two lines to the script (see the comment at
> the end of snapshotter.py) exhibits the same issue:
>         pipe=gst.parse_launch('playbin uri=file:///media/video/Bataille.avi')
>         pipe.set_state(gst.STATE_PLAYING)
>
> It raises various warnings/errors, and locks the snapshot pipeline (a
> player.get_state() not even returns) :
>
> sys:1: Warning: cannot register existing type `GstSelectorPad'
> sys:1: Warning: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_event_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_getcaps_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_chain_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_internal_link_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_bufferalloc_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_active: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_element_add_pad: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_event_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_getcaps_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_chain_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_internal_link_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_bufferalloc_function: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_pad_set_active: assertion `GST_IS_PAD (pad)' failed
>
> (snap.py:26756): GStreamer-CRITICAL **: gst_element_add_pad: assertion `GST_IS_PAD (pad)' failed
>
>
> I did not manage to find out if it was a gobject-specific issue, or a
> gst-specific one. Does anyone have a clue ?
>
> Thanks
> Olivier
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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