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

Andrey Utkin andrey.krieger.utkin at gmail.com
Mon Jan 16 12:29:45 CET 2012


2012/1/16 wl2776 <wl2776 at gmail.com>:
> 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.

I suggest topicstarter needs to identify log calls that come from
inside of libs, not his own loggings.
But logging facility is not meant to provide such identification with
corresponding task, unfortunately.

-- 
Andrey Utkin


More information about the Libav-user mailing list