Pipeline thread id

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

Pipeline thread id

llama
Hello!

As i am launching multiple pipelines with different src element. Like some pipelines are with shmsrc, some with rtspsrc and some filesrc, i need some common way to understand if specific pipeline streaming thread still works.

As i know, if rtspsrc based on TCP-timeout in time 20s does not receive any data, rtspsrc will send eos, and stream will cash. Some other sources could handle this differently. I dont know it for sure. And once that eos signaled, thread will be dead as i suppose. Is it possible to get information on each pipeline streaming thread id to create some mapping of live streams ?

Maybe there is some better ways to handle streaming thread ?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline thread id

Sebastian Dröge-3
On Fri, 2016-12-09 at 01:36 -0800, LC wrote:

> Hello! 
>
> As i am launching multiple pipelines with different src element. Like some
> pipelines are with shmsrc, some with rtspsrc and some filesrc, i need some
> common way to understand if specific pipeline streaming thread still works. 
>
> As i know, if rtspsrc based on TCP-timeout in time 20s does not receive any
> data, rtspsrc will send eos, and stream will cash. Some other sources could
> handle this differently. I dont know it for sure. And once that eos
> signaled, thread will be dead as i suppose. Is it possible to get
> information on each pipeline streaming thread id to create some mapping of
> live streams ? 
>
> Maybe there is some better ways to handle streaming thread ?
What is it that you want to do with the threads? One way to get
notified about them is via the stream-status messages.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline thread id

llama
That thread id i am going to set in map , so that i can monitor time to time if that thread is alive. So that i can understand the situation where the pipeline is crashed, no streaming thread available or so.
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline thread id

Sebastian Dröge-3
On Fri, 2016-12-09 at 02:03 -0800, LC wrote:
> That thread id i am going to set in map , so that i can monitor time
> to time if that thread is alive. So that i can understand the
> situation where the pipeline is crashed, no streaming thread
> available or so.

How would you check if a thread is alive though?


If something is crashing, that's a bug and should be reported and
fixed. Same if something just deadlocks or otherwise hangs.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline thread id

llama
In reply to this post by llama
Sure, i can use different approach, that is to reconstruct the pipe if i receive eos of specific pipeline. But if there is no eos, just crash. Can i be sure that any source element in pipeline will send eos after ~5s ? If yes, i can monitor just pipeline state.
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline thread id

Sebastian Dröge-3
On Fri, 2016-12-09 at 02:29 -0800, LC wrote:
> Sure, i can use different approach, that is to reconstruct the pipe if i
> receive eos of specific pipeline. But if there is no eos, just crash. Can i
> be sure that any source element in pipeline will send eos after ~5s ? If
> yes, i can monitor just pipeline state.

What do you mean with crash, what is it that you want to detect?

If you want to detect no data flowing, you could make use of the
watchdog element, which will send you a message if nothing happened for
a while. Or the timeout property on udpsrc.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline thread id

llama
Thanks for hint using watchdog. I will check this out.
Maybe i am using that word crash in a wrong way, but i mean - stream than can not be recovered and resources release. Something close to bin state NULL.