librtmp in multi threaded applications and interruption
Hi all. Is it possible to refactor interruption system to allow using librtmp in multi threaded applications? FFmpeg's interruption system is very easy and useful. We can create similar callback to handle interruptions. Mikhail.
Mikhail I. Izmestev wrote:
Hi all.
Is it possible to refactor interruption system to allow using librtmp in multi threaded applications? FFmpeg's interruption system is very easy and useful. We can create similar callback to handle interruptions.
I don't understand the question, please explain in more depth. What does multi-threading have to do with interruptions? I presume by "interruption" you mean "signal" - signals and threaded code do not mix well.
Mikhail I. Izmestev wrote:
Hi all.
Is it possible to refactor interruption system to allow using librtmp in multi threaded applications? FFmpeg's interruption system is very easy and useful. We can create similar callback to handle interruptions.
I don't understand the question, please explain in more depth. What does multi-threading have to do with interruptions? I presume by "interruption" you mean "signal" - signals and threaded code do not mix well. I mean when I use librtmp in my application where I want to open several streams in separated
24.06.2010 23:24, Howard Chu wrote: threads, I want to be opportunity to interrupt one of them if it blocked due to network error. But in current interrupt system I can't to interrupt only one of streams. Mikhail.
On Thu, Jun 24, 2010 at 12:24 PM, Howard Chu <hyc@highlandsun.com> wrote:
Mikhail I. Izmestev wrote:
Hi all.
Is it possible to refactor interruption system to allow using librtmp in multi threaded applications? FFmpeg's interruption system is very easy and useful. We can create similar callback to handle interruptions.
I don't understand the question, please explain in more depth. What does multi-threading have to do with interruptions? I presume by "interruption" you mean "signal" - signals and threaded code do not mix well.
He means have librtmp let users register a call-back function that librtmp calls whenever it is in a loop that might 'block' on network access. See url_set_interrupt_cb in FFmpeg's libavformat/avio.h file. - Art -- http://www.xuggle.com/ xu‧ggle (zŭ' gl) v. To freely encode, decode, and experience audio and video. Use Xuggle to get the power of FFmpeg in Java.
25.06.2010 00:22, Art Clarke wrote:
He means have librtmp let users register a call-back function that librtmp calls whenever it is in a loop that might 'block' on network access. See url_set_interrupt_cb in FFmpeg's libavformat/avio.h file.
- Art You are right.
I tried to implement call-back function similar to FFmpeg's, seems to be works for me. But currently it very dirty and doesn't support encrypted connections (I have never worked with it). Mikhail.
participants (3)
-
Art Clarke -
Howard Chu -
Mikhail I. Izmestev