Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Carl Eugen Hoyos
Andrey Utkin writes: > Yes, except if multithreaded decoder/encoder will log something from > its thread pool. > Their multithreading is disabled by default, I don't think this is correct anymore. Carl Eugen ___ Libav-user mailing list Libav-user@ff

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread wl2776
stions-about-using-libav-in-a-multi-threaded-application-tp4297394p4299288.html Sent from the libav-users mailing list archive at Nabble.com. ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread wl2776
irdek.pardus.org.tr/~ismail/ffmpeg-docs/libavcodec_2options_8c-source.html#l00449 Define your own avclass structure and set its pointer to AVFormatContext or AVCodecContext right after their creation. -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Question

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread wl2776
ibav-user-Questions-about-using-libav-in-a-multi-threaded-application-tp4297394p4299271.html Sent from the libav-users mailing list archive at Nabble.com. ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Andrey Utkin
2012/1/16 Tr3wory : > So basically the only possible way of doing this, is to use the > parent_log_context_offset from AVClass, and go upwards from child to > parent until I found the topmost context which is an AVFormatContext > or an AVCodecContext what I used when I called the libav functions. I

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Tr3wory
So basically the only possible way of doing this, is to use the parent_log_context_offset from AVClass, and go upwards from child to parent until I found the topmost context which is an AVFormatContext or an AVCodecContext what I used when I called the libav functions. Is that right? Will it work?

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Andrey Utkin
2012/1/16 Tr3wory : > But I don't call the av_log myself. I just call some libav function to > decode a video, and during the processing it calls the av_log. > I can register my own log callback, but because I run more than one > decoding, I don't know where the log information came from. > > In ot

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Andrey Utkin
2012/1/16 wl2776 : > Yes, y > Tr3wory wrote >> >> Can't I just set some pointer in a context or somewhere else what I >> can use in the callback like in most other callback driven library? >> > > Yes, you can. > Generally, you call av_log(/*log level*/, /* context pointer */, "message", > /*other a

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Hendrik Leppkes
Hi, On 1/16/12, Tr3wory wrote: > Is this possible somehow in libav? Not for the logging callback, no. - Hendrik ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Tr3wory
efault log callback casts context pointer from void * to AVClass * and > extracts all necessary information from it. > You can create your own variable of type AVClass and pass its pointer to the > log. > > > -- > View this message in context: > http://libav-use

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread wl2776
arguments*/ ); Default log callback casts context pointer from void * to AVClass * and extracts all necessary information from it. You can create your own variable of type AVClass and pass its pointer to the log. -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Que

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Tr3wory
Can't I just set some pointer in a context or somewhere else what I can use in the callback like in most other callback driven library? tr3w On Mon, Jan 16, 2012 at 10:56 AM, Andrey Utkin wrote: > 2012/1/16 Tr3wory : >> In the callback will the current thread be the same as the thread >> where I

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Andrey Utkin
2012/1/16 Tr3wory : > In the callback will the current thread be the same as the thread > where I called the libav functions? Yes, except if multithreaded decoder/encoder will log something from its thread pool. Their multithreading is disabled by default, currently. -- Andrey Utkin

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread Tr3wory
bav-users.943685.n4.nabble.com/Libav-user-Questions-about-using-libav-in-a-multi-threaded-application-tp4297394p4298956.html > Sent from the libav-users mailing list archive at Nabble.com. > ___ > Libav-user mailing list

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-16 Thread wl2776
read identifier in a log message. -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Questions-about-using-libav-in-a-multi-threaded-application-tp4297394p4298956.html Sent from the libav-users mailing list arc

Re: [Libav-user] Questions about using libav in a multi-threaded application

2012-01-15 Thread Andrey Utkin
2012/1/15 Tr3wory : > Hi all! > > I started writing a multi-threaded program which can read multiple > videos simultaneously. > Basically every thread read it's own video, and use it's own > AVFormatContext and AVCodecContext so no libav related shared data > exist. > What is not clear to me: is th

[Libav-user] Questions about using libav in a multi-threaded application

2012-01-15 Thread Tr3wory
Hi all! I started writing a multi-threaded program which can read multiple videos simultaneously. Basically every thread read it's own video, and use it's own AVFormatContext and AVCodecContext so no libav related shared data exist. What is not clear to me: is this scenario supported by default, o