On Thu, Apr 17, 2014 at 3:22 PM, Jean-Baptiste Kempf <[email protected]>wrote:
> > But please make it thread-safe, not like the famous libavcodec stuff. > I was thinking about doing something very simple, like a global function pointer. void (*libdvdnav_log)(void *opaque, const char *fmt, ...); And then just have a default implementation that prints to stderr. Then if the app uses multiple threads for DVD playback it will need to sort out locking by itself. I also suggest dropping all \n from the log messages. This would make the default log-to-stderr either a bit racy (it would have to first print the log message and then fprintf(stderr, "\n"); or it would need to append a \n to the format string before passing it into vfnprintf() Thoughts welcome. _______________________________________________ DVDnav-discuss mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
