[Libav-user] variable scope into callback av_log_set_callback and multi threading

Algarve Branqueira branqueira at gmail.com
Tue Mar 15 13:33:09 EET 2022

Le lun. 14 mars 2022 à 19:54, Dan Egnor <egnor at ofb.net> a écrit :

> On Mon, Mar 14, 2022 at 11:28 AM Algarve Branqueira <branqueira at gmail.com>
> wrote:
>> the application connects to 10 cameras therefore 10 java threads
>> therefore in JNI also 10 C threads.
>> these 10 threads can create multiple threads each for its processing.
>> Now for some reason we see a problem in the logs during decoding or
>> encoding.
>> even if it's a thread created by the main thread of ffmpeg, it can be
>> interesting to know what is the name of the original Java thread to go back
>> to the right camera.
> Oh yes, I know it would be *nice* to attribute a log event to a particular
> instance in many cases, but as far as I know that's quite difficult to
> accomplish. So... good luck??!
searching a bit aside from modifying the ffmpeg code (it's not a good idea
because it will always modifying for all update ffmpeg, beurg)
I don't see an acceptable solution to hook on "pthread_create", I tried
with dlsym(RTLD_NEXT, "pthread_create") but so far it doesn't work :)
I forgot a few things lol

thanks again

-- egnor
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220315/2ee46dfb/attachment.htm>

More information about the Libav-user mailing list