Re: mjpeg_logging.h conflicts with syslog.h
Mark Nauwelaerts <[email protected]>
| Newsgroups | gmane.comp.video.mjpeg.devel |
|---|---|
| Message-ID | <[email protected]> |
Steven M. Schultz wrote: > On Sun, 1 Apr 2007, Bernhard Praschinger wrote: > >> Hallo >> >> I found in the tracker one problem with the mjpegtools: >> [ mjpeg-Bugs-1683109 ] mjpeg_logging.h conflicts with syslog.h >> https://sourceforge.net/tracker/?func=detail&atid=105776&aid=1683109&group_id=5776 >> >> With the short code in he posted I was able to reproduce the problem. >> >> One solution would be to change the >> log_level_t to: >> MJPEG_LOG_NONE = 0, >> MJPEG_LOG_DEBUG, >> MJPEG_LOG_INFO, >> MJPEG_LOG_WARN, >> MJPEG_LOG_ERROR > > Why do LOG_* symbols need to be visible out side of MJPEGtools at > all? If some external application using mjpegtools' libmplex or libmpeg2enc wants/needs to provide a custom log handler, rather than the default one; some case'ing on LOG_* is then usually required. For instance, GStreamer wrappers use a custom log handler, and have to "map" mjpegtools log levels to GStreamer log levels. > The logging API has routines: > > mjpeg_warn(), mjpeg_info(), ... > > should use those instead of mjpeg_log(LOG_* > > I am checking in some changes to greatly reduce the use of LOG_ > > With a little more work I think we could avoid conflict with > syslog.h by not having LOG_* symbols in mjpeg_logging.h at all Regards, Mark. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV