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 other libraries, I can set a pointer called userData or something when I register a callback, and I can use this pointer in the callback because I get it as a parameter. Is this possible somehow in libav? tr3w On Mon, Jan 16, 2012 at 12:13 PM, wl2776 <[email protected]> wrote: > 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 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-Questions-about-using-libav-in-a-multi-threaded-application-tp4297394p4299173.html > Sent from the libav-users mailing list archive at Nabble.com. > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
