Michael Niedermayer (HE12025-08-03): > well, you may have deep call stacks > > user_app->libavfilter->libavformat->libavcodec->decoder->jpeg_decoder->... > > and the user of the user_app needs to know what file had what failure > so the error details must pass through all this. > > Some of the API calls failing here can be final calls that are > expected to leave nothing allocated on a failure return. > > also other subsequent and prior errors may have occured in some contexts > I thiink we want to be able to distingish what caused teh current error from > the previous or next
Before we dig deeper into the technical details, we need to clarify what exactly you need to do. The subject of the thread evokes error messages. Error messages are meant for users, to give them the information they need to fix their issue: did they make a typo in the file name? did they forget to enable wifi? do they need to free some space on their hard drive? is there no solution because the file is too damaged? But what you describe along this discussion looks more like debug messages: messages that the user transmits to the developer to let them fix a bug when they cannot offer a test case to reproduce the issue. They might look like two instances of the same thing from a developer point of view, but they are not. Anybody who has spent time helping clueless users (of FFmpeg or anything else) or teaching realizes they are more antithetical: any extra detail that might help a developer figure out a bug is likely to panic a clueless user and prevent them from reading the part that would be useful to them. For debug messages, I think av_log() is mostly fine. We might want to extend it somewhat, for example add a stack backtrace at debug log level, but I do not think a change in architecture is required. What I want to improve is error messages, to make it easier for applications to separate them from the noise of logs and display them in nice dialog boxes. We might get a few features helping debug at the same time, but it is not the main objective, and chasing two hares is a recipe for catching zero. I have quite a lot to answer to the technical points you made below and that I will now snip, but before that I think it is important we check we are on the same page about the goals. Regards, -- Nicolas George _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".