EOS : which element should receive this signal?

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

EOS : which element should receive this signal?

florian iragne-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

i've a multithreaded soft that launchs several gstreamer pipelines. I
store references to the created bus and pipelines in order to be able to
 post eos signal and thus, properly stop the pipelines (and thread, etc)

You've probably guessed that it doesn't work. The eos signal is well
send and well received (the listening function properly handle the
signal, stop the GMainLoop and tell me that everything is fine), but the
produced files are unusable (i produce h264/mp4 files and the moov atom
is not in the file).

If i launch the pipelines with gst-launch, everything is fine.

So, i wonder whether i'm sending the eos to the proper element or not.
I've tried these cases :
 * send eos to the pipeline : doesn't work
 * send eos to the sink elements of the pipeline : KO
 * send eos to the sources : KO
 * send eos to all elements : KO


any idea is welcome!

cheers

Florian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpI1sQACgkQO8DE9K7b371PygCeLsQRAV1QcItHMdiEQqSbXt9f
Cd4AoJ7fbHXcoK95cNPQJE5QxA1TxTfk
=eo4C
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: EOS : which element should receive this signal?

Thiago Sousa Santos-2


On Mon, Jun 29, 2009 at 11:59 AM, florian iragne <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

i've a multithreaded soft that launchs several gstreamer pipelines. I
store references to the created bus and pipelines in order to be able to
 post eos signal and thus, properly stop the pipelines (and thread, etc)

You've probably guessed that it doesn't work. The eos signal is well
send and well received (the listening function properly handle the
signal, stop the GMainLoop and tell me that everything is fine), but the
produced files are unusable (i produce h264/mp4 files and the moov atom
is not in the file).

Maybe you can post the relevant parts of your code in pastebin and let us take a look.
 Also, what pipeline are you using? That will help us help you.


If i launch the pipelines with gst-launch, everything is fine.

So, i wonder whether i'm sending the eos to the proper element or not.
I've tried these cases :
 * send eos to the pipeline : doesn't work

Sending to the pipeline should work, you can use: gst_element_send_event (pipeline, gst_event_new_eos()),
and then you should wait for the EOS to be posted at the bus. gst-launch does exactly this, maybe you should take a look at its code here.
 

 * send eos to the sink elements of the pipeline : KO
 * send eos to the sources : KO
 * send eos to all elements : KO


any idea is welcome!

cheers

Florian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpI1sQACgkQO8DE9K7b371PygCeLsQRAV1QcItHMdiEQqSbXt9f
Cd4AoJ7fbHXcoK95cNPQJE5QxA1TxTfk
=eo4C
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Thiago Sousa Santos

Embedded Systems and Pervasive Computing Lab (Embedded)
Center of Electrical Engineering and Informatics (CEEI)
Federal University of Campina Grande (UFCG)

------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: EOS : which element should receive this signal?

florian iragne-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

thiagoss a écrit :
>> Sending to the pipeline should work, you can use: gst_element_send_event
>> (pipeline, gst_event_new_eos()),

with your command, it works :
gst_element_send_event (&*busIt->second, gst_event_new_eos());

previously, i was doing : gst_bus_post( &*busIt->first,
gst_message_new_eos( ( GstObject* ) &*busIt->second ) );

busIt->first is a GstBus and ->second is a pipeline (GstElement).

Is there any obvious reason i don't see to explain that it didn't work
with my way?


Anyway, thanks for your help!

cheers

Florian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpJrm8ACgkQO8DE9K7b370fuACgzWiZ52rLFzMNyIs2rBRF5toq
xz4AoKtHp04P60E1Ka1BZ0P+jRzdukex
=01wd
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: EOS : which element should receive this signal?

Thiago Sousa Santos-2


On Tue, Jun 30, 2009 at 3:19 AM, florian iragne <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

thiagoss a écrit :
>> Sending to the pipeline should work, you can use: gst_element_send_event
>> (pipeline, gst_event_new_eos()),

with your command, it works :
gst_element_send_event (&*busIt->second, gst_event_new_eos());

previously, i was doing : gst_bus_post( &*busIt->first,
gst_message_new_eos( ( GstObject* ) &*busIt->second ) );

busIt->first is a GstBus and ->second is a pipeline (GstElement).

Is there any obvious reason i don't see to explain that it didn't work
with my way?

Yes, if you look at the GstBus documentation we have "The GstBus is an object responsible for delivering GstMessages in a first-in first-out way from the streaming threads to the application.".

GstBus is used for delivering messages from the pipeline/elements to your application, posting a message to the bus doesn't make the elements receive, An EOS message is posted at the bus by an element to inform the application that an EOS event has happened at the pipeline.

For sending/forcing EOS to the pipeline, you send an GstEvent to it. Take a look at the following links for further details.
 



Anyway, thanks for your help!

cheers

Florian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpJrm8ACgkQO8DE9K7b370fuACgzWiZ52rLFzMNyIs2rBRF5toq
xz4AoKtHp04P60E1Ka1BZ0P+jRzdukex
=01wd
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Thiago Sousa Santos

Embedded Systems and Pervasive Computing Lab (Embedded)
Center of Electrical Engineering and Informatics (CEEI)
Federal University of Campina Grande (UFCG)

------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel