Writing a new plugin from template/existing plugin

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Writing a new plugin from template/existing plugin

Ionut Dediu
Hi all,

I am an absolute beginner to gstreamer; I want to write a transform filter. For this I took as an example the edgetv filter and modified it. The code is exactly the same, except canging the name of the plugin and functions/structures to reflect the new name, but the rest of the code is unchanged. It's based on GstVideoFilter. When I test the plugin I get the following error:

$gst-launch -v videotestsrc ! gimpcartoon ! ffmpegcolorspace ! autovideosink

** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_base_init


** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_class_init

Setting pipeline to PAUSED ...

** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_start

/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)320, height=(int)240, framerate=(fraction)30/1
Pipeline is PREROLLING ...

** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_set_caps

/GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:src: caps = video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)320, height=(int)240, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:sink: caps = video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)320, height=(int)240, framerate=(fraction)30/1

** (gst-launch-0.10:15527): WARNING **: gimpcartoon0: could not get in_size
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2330): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL
FREEING pipeline ...

** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_finalize

After setting GST_DEBUG I got more info:

** (gst-launch-0.10:15523): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_set_caps

/GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:src: caps = video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)320, height=(int)240, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:sink: caps = video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)320, height=(int)240, framerate=(fraction)30/1

** (gst-launch-0.10:15523): WARNING **: gimpcartoon0: could not get in_size
0:00:00.273914500 15523  0x9953f20 ERROR        basetransform gstbasetransform.c:1383:gst_base_transform_prepare_output_buffer:<gimpcartoon0> unknown output size
0:00:00.274001592 15523  0x9953f20 WARN         basetransform gstbasetransform.c:1925:gst_base_transform_handle_buffer:<gimpcartoon0> could not get buffer from pool: error
0:00:00.274025967 15523  0x9953f20 INFO               basesrc gstbasesrc.c:2278:gst_base_src_loop:<videotestsrc0> pausing after gst_pad_push() = error
0:00:00.274063891 15523  0x9953f20 WARN               basesrc gstbasesrc.c:2330:gst_base_src_loop:<videotestsrc0> error: Internal data flow error.
0:00:00.274084354 15523  0x9953f20 WARN               basesrc gstbasesrc.c:2330:gst_base_src_loop:<videotestsrc0> error: streaming task paused, reason error (-5)
0:00:00.274114735 15523  0x9953f20 INFO      GST_ERROR_SYSTEM gstelement.c:1675:gst_element_message_full:<videotestsrc0> posting message: Internal data flow error.
0:00:00.274165859 15523  0x9953f20 INFO      GST_ERROR_SYSTEM gstelement.c:1698:gst_element_message_full:<videotestsrc0> posted error message: Internal data flow error.
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
0:00:00.274342697 15523  0x9953f20 INFO            GST_STATES gstbin.c:2738:bin_handle_async_done:<autovideosink0> committing state from READY to PAUSED, old pending PAUSED
0:00:00.274367002 15523  0x9953f20 INFO            GST_STATES gstbin.c:2753:bin_handle_async_done:<autovideosink0> completed state change, pending VOID
0:00:00.274396894 15523  0x9953f20 INFO            GST_STATES gstbin.c:2738:bin_handle_async_done:<pipeline0> committing state from READY to PAUSED, old pending PAUSED
0:00:00.274420570 15523  0x9953f20 INFO            GST_STATES gstbin.c:2753:bin_handle_async_done:<pipeline0> completed state change, pending VOID
ERROR: pipeline doesn't want to preroll.

What is strange is that other than refactoring edgetv and adding some warnings my filter looks exactly like edgetv that works ok... Is there some configure.ac/Makefile.am magic I did not enchant ?

I am stuck on this, help :D

Thanks



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing a new plugin from template/existing plugin

Stefan Sauer
Ionut Dediu schrieb:

> Hi all,
>
> I am an absolute beginner to gstreamer; I want to write a transform
> filter. For this I took as an example the edgetv filter and modified it.
> The code is exactly the same, except canging the name of the plugin and
> functions/structures to reflect the new name, but the rest of the code
> is unchanged. It's based on GstVideoFilter. When I test the plugin I get
> the following error:
>
> $gst-launch -v videotestsrc ! gimpcartoon ! ffmpegcolorspace ! autovideosink
>
> ** (gst-launch-0.10:15527): WARNING **:
> !!!!!!!!!!!gst_gimp_cartoon_base_init
>
>
> ** (gst-launch-0.10:15527): WARNING **:
> !!!!!!!!!!!gst_gimp_cartoon_class_init
>
> Setting pipeline to PAUSED ...
>
> ** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_start
>
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
> video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24,
> red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216,
> width=(int)320, height=(int)240, framerate=(fraction)30/1
> Pipeline is PREROLLING ...
>
> ** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_set_caps
>
> /GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:src: caps =
> video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24,
> red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216,
> width=(int)320, height=(int)240, framerate=(fraction)30/1
> /GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:sink: caps =
> video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24,
> red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216,
> width=(int)320, height=(int)240, framerate=(fraction)30/1
>
> ** (gst-launch-0.10:15527): WARNING **: gimpcartoon0: could not get in_size
> ERROR: from element
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow
> error.
> Additional debug info:
> gstbasesrc.c(2330): gst_base_src_loop ():
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
> streaming task paused, reason error (-5)
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> /GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:src: caps = NULL
> /GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:sink: caps = NULL
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL
> FREEING pipeline ...
>
> ** (gst-launch-0.10:15527): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_finalize
>
> After setting GST_DEBUG I got more info:
>
> ** (gst-launch-0.10:15523): WARNING **: !!!!!!!!!!!gst_gimp_cartoon_set_caps
>
> /GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:src: caps =
> video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24,
> red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216,
> width=(int)320, height=(int)240, framerate=(fraction)30/1
> /GstPipeline:pipeline0/GstGimpCartoon:gimpcartoon0.GstPad:sink: caps =
> video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24,
> red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216,
> width=(int)320, height=(int)240, framerate=(fraction)30/1
>
> ** (gst-launch-0.10:15523): WARNING **: gimpcartoon0: could not get in_size
> 0:00:00.273914500 15523  0x9953f20 ERROR
>        basetransform
> gstbasetransform.c:1383:gst_base_transform_prepare_output_buffer:<gimpcartoon0>
> unknown output size
> 0:00:00.274001592 15523  0x9953f20 WARN 
>        basetransform
> gstbasetransform.c:1925:gst_base_transform_handle_buffer:<gimpcartoon0>
> could not get buffer from pool: error
> 0:00:00.274025967 15523  0x9953f20 INFO 
>              basesrc
> gstbasesrc.c:2278:gst_base_src_loop:<videotestsrc0> pausing after
> gst_pad_push() = error
> 0:00:00.274063891 15523  0x9953f20 WARN 
>              basesrc
> gstbasesrc.c:2330:gst_base_src_loop:<videotestsrc0> error: Internal
> data flow error.
> 0:00:00.274084354 15523  0x9953f20 WARN 
>              basesrc
> gstbasesrc.c:2330:gst_base_src_loop:<videotestsrc0> error:
> streaming task paused, reason error (-5)
> 0:00:00.274114735 15523  0x9953f20 INFO 
>     GST_ERROR_SYSTEM
> gstelement.c:1675:gst_element_message_full:<videotestsrc0> posting
> message: Internal data flow error.
> 0:00:00.274165859 15523  0x9953f20 INFO 
>     GST_ERROR_SYSTEM
> gstelement.c:1698:gst_element_message_full:<videotestsrc0> posted
> error message: Internal data flow error.
> ERROR: from element
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow
> error.
> 0:00:00.274342697 15523  0x9953f20 INFO 
>           GST_STATES
> gstbin.c:2738:bin_handle_async_done:<autovideosink0> committing
> state from READY to PAUSED, old pending PAUSED
> 0:00:00.274367002 15523  0x9953f20 INFO 
>           GST_STATES
> gstbin.c:2753:bin_handle_async_done:<autovideosink0> completed
> state change, pending VOID
> 0:00:00.274396894 15523  0x9953f20 INFO 
>           GST_STATES
> gstbin.c:2738:bin_handle_async_done:<pipeline0> committing state
> from READY to PAUSED, old pending PAUSED
> 0:00:00.274420570 15523  0x9953f20 INFO 
>           GST_STATES
> gstbin.c:2753:bin_handle_async_done:<pipeline0> completed state
> change, pending VOID
> ERROR: pipeline doesn't want to preroll.
>
> What is strange is that other than refactoring edgetv and adding some
> warnings my filter looks exactly like edgetv that works ok... Is there
> some configure.ac/Makefile.am magic I did not enchant ?
>
> I am stuck on this, help :D

Can you post the source?

Stefan

>
> Thanks
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel