What happens to a bus, when a bin is inserted into another bin?

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

What happens to a bus, when a bin is inserted into another bin?

wl2776
Administrator
I am working on playing an audio stream from a separate file.

My approach is to construct an instance of the playbin2, listen to the messages on its bus, analyze them and their sources, and decide if both audio and video streams are present.

Then, if the audio stream is in the separate file, construct missing parts of the playbin2 - one more uridecodebin, playsink and connecting elements (audiotee, inputselector, etc) - and add them to the playbin2 instance.

So, the question is.
The uridecodebin and the playsink are bins, therefore, they have their own buses.
What should I do with these buses?

Next stage will be clock, I'll deal with it later.
Reply | Threaded
Open this post in threaded view
|

Re: What happens to a bus, when a bin is inserted into another bin?

wl2776
Administrator
wl2776 wrote
I am working on playing an audio stream from a separate file.

My approach is to construct an instance of the playbin2, listen to the messages on its bus, analyze them and their sources, and decide if both audio and video streams are present.

Then, if the audio stream is in the separate file, construct missing parts of the playbin2 - one more uridecodebin, playsink and connecting elements (audiotee, inputselector, etc) - and add them to the playbin2 instance.

So, the question is.
The uridecodebin and the playsink are bins, therefore, they have their own buses.
What should I do with these buses?

Next stage will be clock, I'll deal with it later.
Can anyone comment on this?
Nobody?

Ok... For the meantime I just call gst_element_set_bus(uridecodebin,m_bus).
Reply | Threaded
Open this post in threaded view
|

Re: What happens to a bus, when a bin is inserted into another bin?

Stefan Sauer
In reply to this post by wl2776
wl2776 wrote:

> I am working on playing an audio stream from a separate file.
>
> My approach is to construct an instance of the playbin2, listen to the
> messages on its bus, analyze them and their sources, and decide if both
> audio and video streams are present.
>
> Then, if the audio stream is in the separate file, construct missing parts
> of the playbin2 - one more uridecodebin, playsink and connecting elements
> (audiotee, inputselector, etc) - and add them to the playbin2 instance.
>
> So, the question is.
> The uridecodebin and the playsink are bins, therefore, they have their own
> buses.
> What should I do with these buses?
>
> Next stage will be clock, I'll deal with it later.
>  
The application should only use the bus of the toplevel bin akak the
pipleine. gstreamer handles the aggregation and forwarding internaly.
Thats why you don't specify a concrete bus when doing
gst_element_post_message().

Stefan


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: What happens to a bus, when a bin is inserted into another bin?

wl2776
Administrator
Stefan Kost wrote
> So, the question is.
> The uridecodebin and the playsink are bins, therefore, they have their own
> buses.
The application should only use the bus of the toplevel bin akak the
pipleine. gstreamer handles the aggregation and forwarding internaly.
Thats why you don't specify a concrete bus when doing
gst_element_post_message().
Thank you for the answer, I'll keep it in mind.
However, it appeared to be much simpler.
A uridecodebin instance, created with gst_element_factory_make(), simply didn't have any buses, its bus field was NULL.
Reply | Threaded
Open this post in threaded view
|

Re: Stopping a live capture

Thiago Sousa Santos-2
In reply to this post by Stefan Sauer


On Thu, Apr 8, 2010 at 10:44 AM, Wesley J. Miller <[hidden email]> wrote:

When executing a gst-launch-ed pipeline that is capturing a live feed, what's the best way to stop it other than ctrl-C?  Windows and Linux answers are needed if they differ.

gst-launch stops whenever it gets EOS, an error or the user presses ctrl-c AFAIK.

When capturing live, it is useful to use -e option to force the pipeline to push an EOS through the pipeline to make elements finalize their work properly when ctrl-c is pressed.
 

Thanks,

Wes

PS Sorry about the mangled previous posting - pressed the wrong button.  :-(

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Thiago Sousa Santos

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Stopping a live capture

Zhao, Halley

For test use, you can specific ‘-num-buffers=n’ for camera src.

For real case, you’d better send EOS to camera src to quit the pipeline.

 

From my experience, ‘ctrl+c’ made my mp4 file corrupted, though it works for ogg file.

Not sure v4l2src support EOS or not, I added it in my camera src to make sure the hw stop in order.

 

 

 


From: [hidden email] [mailto:[hidden email]]
Sent: 2010
412 1:33
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Stopping a live capture

 

 

On Thu, Apr 8, 2010 at 10:44 AM, Wesley J. Miller <[hidden email]> wrote:


When executing a gst-launch-ed pipeline that is capturing a live feed, what's the best way to stop it other than ctrl-C?  Windows and Linux answers are needed if they differ.

 

gst-launch stops whenever it gets EOS, an error or the user presses ctrl-c AFAIK.

 

When capturing live, it is useful to use -e option to force the pipeline to push an EOS through the pipeline to make elements finalize their work properly when ctrl-c is pressed.

 


Thanks,

Wes

PS Sorry about the mangled previous posting - pressed the wrong button.  :-(

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Thiago Sousa Santos


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Stopping a live capture

Thiago Sousa Santos-2


2010/4/11 Zhao, Halley <[hidden email]>

For test use, you can specific ‘-num-buffers=n’ for camera src.

For real case, you’d better send EOS to camera src to quit the pipeline.

 

From my experience, ‘ctrl+c’ made my mp4 file corrupted, though it works for ogg file.

Corrupted how? Unfinished? Have you used -e option?
 

Not sure v4l2src support EOS or not, I added it in my camera src to make sure the hw stop in order. 

 

 

 


From: [hidden email] [mailto:[hidden email]]
Sent: 2010
412 1:33
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Stopping a live capture

 

 

On Thu, Apr 8, 2010 at 10:44 AM, Wesley J. Miller <[hidden email]> wrote:


When executing a gst-launch-ed pipeline that is capturing a live feed, what's the best way to stop it other than ctrl-C?  Windows and Linux answers are needed if they differ.

 

gst-launch stops whenever it gets EOS, an error or the user presses ctrl-c AFAIK.

 

When capturing live, it is useful to use -e option to force the pipeline to push an EOS through the pipeline to make elements finalize their work properly when ctrl-c is pressed.

 


Thanks,

Wes

PS Sorry about the mangled previous posting - pressed the wrong button.  :-(

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Thiago Sousa Santos


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Thiago Sousa Santos

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel