Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
The problem is that name resolution is a blocking operation here.. and gst_*src_start() shouldn't be blocking. That would mean moving the thing to the async api .. with gst_base_src_set_async() and then create a thread if the name resolution is blocking and then call gst_base_src_start_complete() when it's done.
I guess for the sink it's already in the streaming thread, so it doesn't matter as much.
Also, we awnt to merge clientsink/serversink into a srtsink and the same at the source, there is a branch on github that does vaguely that.
The problem is that name resolution is a blocking operation here.. and
gst_*src_start() shouldn't be blocking. That would mean moving the thing to
the async api .. with gst_base_src_set_async() and then create a thread if
the name resolution is blocking and then call gst_base_src_start_complete()
when it's done.
I guess for the sink it's already in the streaming thread, so it doesn't
matter as much.
I guess the point which you are worrying about is that source's start()/stop() is most likely app thread and (i.e., triggering set_state()) blocking the app thread might cause problem, right?
If my understanding is correct, I think "blocking" could be ugly and agree with your point, but I'm wondering whether it's really critical or not, because async source element also looks tricky. The problem is,
I couldn't find any async source element for now, and even some elements which are using name resolving (such as udp/tcp source) are not async. So, there seems no good example for me. And when I saw basesrc's impl., finding proper room for calling gst_base_src_start_complete() seems to be a little tricky, because we should meet following two conditions (if it's wrong, please correct me)
gst_base_src_start_complete() shouldn't be called in gst_base_src_get_range() thread (loop thread) since both are taking stream_lock.
gst_base_src_start_complete() should be called before gst_base_src_get_range() in order for create()/fill() methods not to return null buffer.
I couldn't find any async source element for now, and even some elements
which are using name resolving (such as udp/tcp source) are not async. So,
there seems no good example for me. And when I saw basesrc's impl., finding
proper room for calling gst_base_src_start_complete() seems to be a little
tricky, because we should meet following two conditions (if it's wrong,
please correct me)
gst_base_src_start_complete() shouldn't be called in
gst_base_src_get_range() thread (loop thread) since both are taking
stream_lock.
gst_base_src_start_complete() should be called before
gst_base_src_get_range() in order for create()/fill() methods not to return
null buffer.
In theory yes, but I can't find any other element that uses it, so maybe it's not useable as-is.. Lets ignore this for now.
In theory yes, but I can't find any other element that uses it, so maybe
it's not useable as-is.. Lets ignore this for now.
Ok :). I'm doing refacto srtbasesrc and it's subclasses to make them actually cancellable with unit test code. I'll update them at once in this ticket soon.
(possibly reworked srtbasesink also updated)
... instead of doing it ourselves. Otherwise, we should add more
logic here (such as checking GstClock and etc) which was already provided by
GstBaseSrc.