List Info

Thread: plugin cannot be encapsulated in a bin




plugin cannot be encapsulated in a bin
user name
2007-02-08 02:40:59
Hi all,
 
I'm developed a deocder plugin, connect with other elements (demux, videosink... ) and it works well.
But while I add this plugin into a bin and ghost its src and sink pads, link this bin as before, it does not work...
 
e.g.,
the pipes
Pipe1: decoder->videosink
and
Pipe2: bin(containing decoder)->videosink
 
should be equivalent.

However the Pipe2 connection does not work.
 
I debugged and found that in decoder element chain_function, the buffer received are all with 0 size. So is there anything I should do in the plugin to support this??
 
Thanks in advance!!
 
- Max
Re: plugin cannot be encapsulated in a bin
country flaguser name
France
2007-02-08 02:46:12
Diqing Zhong wrote:
> Hi all,
>  
> I'm developed a deocder plugin, connect with other
elements (demux,
> videosink... ) and it works well.
> But while I add this plugin into a bin and ghost its
src and sink
> pads, link this bin as before, it does not work...
>  
> e.g.,
> the pipes
> Pipe1: decoder->videosink
> and
> Pipe2: bin(containing decoder)->videosink
>  
> should be equivalent.
>
> However the Pipe2 connection does not work.
>  
> I debugged and found that in decoder element
chain_function, the
> buffer received are all with 0 size. So is there
anything I should do
> in the plugin to support this??
>  
this is hard to see if we can be of help without seeing what
you wrote
down in your app for instance...
could you please post the code in which you use a bin to
encapsulate
your element ?

Ben


------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel

Re: plugin cannot be encapsulated in a bin
country flaguser name
France
2007-02-08 03:19:58
Hi,
(please keep list in copy... the more, the merrier ;) )

Diqing Zhong wrote:
> Hi,
>  
> Here's the code, thanks so much for the help.  
>  
>  - Max
>  
>
------------------------------------------------------------
-------------------------------
>     static GstElement *decbin     = NULL;
>     static GstElement *video_decode     = NULL;
>
>    
video_decode=gst_element_factory_make("mpeg2_video_dec&
quot;, NULL);
>     decbin = gst_bin_new("decbin");
>     if ( gst_bin_add(GST_BIN(decbin), video_decode) ==
FALSE) {
>           g_print("Error add video decode to
bin"); 
>     }
>
>     GstPad *video_decode_sinkpad;
>     video_decode_sinkpad =
gst_element_get_pad(video_decode, "sink");
>     if (gst_element_add_pad (decbin, gst_ghost_pad_new
("sink",
> video_decode_sinkpad)) == FALSE) {
>           g_print("Error gst element add sink
pad"); 
>     }
>
do you link your sink pad with anything ?

>     GstPad *video_decode_srcpad;
>     video_decode_srcpad =
gst_element_get_pad(video_decode, "src");
>     if (gst_element_add_pad (decbin, gst_ghost_pad_new
("src",
> video_decode_srcpad))== FALSE) {
>           g_print("Error gst element add source
pad"); 
>     }
>
>     gst_object_unref (GST_OBJECT
(video_decode_sinkpad));
>     gst_object_unref (GST_OBJECT
(video_decode_srcpad));
>
>     gst_bin_add_many(GST_BIN(bin), decbin, video_sink,
NULL);
>
>     if(gst_element_link(decbin, video_sink) == FALSE)
{
>         g_print("Error linking
decbin->video_sinkn");
>         g_assert(0);
>     }
>
Ben


------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )