[gst-devel] Adder element and pipeline rebuilding
marco
marco at teknusi.org
Fri Jan 2 19:17:35 CET 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il giorno 02/gen/09, alle ore 16:09, Wim Taymans ha scritto:
> The sequence is:
>
> 1) leave the bin to READY
> 2) request a new pad from adder
> 3) link the requested pad to the bin
> 4) set the bin to PLAYING
ok, tried this too and i did not succeed into having it to work.
the code is:
void add_sine(){
GstElement *tsine;
int pstate;
GstPad *newpad;
GstPad *toblock;
tsine = get_silence_bin();
gst_bin_add(GST_BIN(pipeline), tsine);
//toblock = gst_ghost_pad_get_target(
// gst_element_get_static_pad(adderbin, "sink0"));
//gst_pad_set_blocked(toblock, TRUE);
newpad = gst_ghost_pad_new("sink1",
gst_element_get_request_pad(adder, "sink%d"));
gst_element_add_pad(adderbin, newpad);
gst_pad_link(gst_element_get_static_pad(tsine, "src"),
gst_element_get_static_pad(adderbin, "sink1"));
gst_element_set_state(tsine, GST_STATE_PLAYING);
//gst_pad_set_blocked(toblock, FALSE);
}
>> i have problems and crash when i try to do the linking, the pipeline
>> stalls and never restart.
>
> Did you do gobject.threads_init() first?
yes, i have g_thread_init(NULL) call and gst_init() for first in the
main (and i think that gst_init() does a conditional call to
g_thread_init() when !g_thread_supported(), or am i wrong?
anyway, thanks for your help, i am sorry to bother the list with so
many mails.
marco
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
iEYEARECAAYFAkleWj8ACgkQ5A1A6ak/SoWoqACfVPL0A0kGakN93oI0eajQD6+K
fu4AnRMCIXTVtjibqXey7N2SIYdmXt4t
=eXZi
-----END PGP SIGNATURE-----
More information about the gstreamer-devel
mailing list