Skip to content

Scoped logging helper functions #89

Closed Answered by asticode
fortytw2 asked this question in Q&A
Discussion options

You must be logged in to vote

First off thanks for the kind words ❤️

The way ffmpeg logging works, you won't be able to correlate logs to a block of code directly. You will however be able to correlate them to certain objects, and if those objects are specific to your block of code, you will be able to correlate logs to your block of code indirectly.

The ffmpeg log callback is global therefore you can only have one. Its signature is func(c Classer, l LogLevel, fmt, msg string) and what is the most important for you is the first argument c Classer. A Classer is an object with a method Class() *Class. Objects implementing this interface are for instance CodecContext or FormatContext.

Therefore if in your block of code y…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by asticode
Comment options

You must be logged in to vote
1 reply
@asticode
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #88 on October 19, 2024 08:11.