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

Algarve Branqueira branqueira at gmail.com
Thu Mar 24 12:59:06 EET 2022


I tried this method but it doesn't work with ffmpeg on windows with mingw.
I must have forgotten a few things.

 what disturbs me the most is that at the end of the video conversion,
ffmpeg kills its threads for decoding and encoding but we don't have a
simple solution to execute an end method.

I attached the jvm so I basically need to destroy the thread called a
simple "DetachCurrentThread" method.

Any idea :)

Le mar. 15 mars 2022 à 12:33, Algarve Branqueira <branqueira at gmail.com> a
écrit :

>
>
> 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/20220324/7d95ff53/attachment.htm>


More information about the Libav-user mailing list