Re: mjpeg_logging.h conflicts with syslog.h
"Steven M. Schultz" <[email protected]>
| Newsgroups | gmane.comp.video.mjpeg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 1 Apr 2007, Mark Nauwelaerts wrote:
> > Why do LOG_* symbols need to be visible out side of MJPEGtools at
> > all?
>
> For instance, GStreamer wrappers use a custom log handler, and have to "map"
> mjpegtools log levels to GStreamer log levels.
That mapping can be done without having conflicting (with syslog.h)
LOG_* macros or by having renamed MJPEG_LOG_* macros.
LOG_* are no longer exported by mjpeg_logging.h
The helper function
log_level_t
mjpeg_loglev_t(const char *level)
Can be called with "error", "info", "warn", "debug" if you really
require the internal value (the old LOG_ERROR, LOG_WARN, etc)
log_level_t t;
t = mjpeg_loglev_t("error");
will return 4 (which was the old LOG_ERROR).
The main use of the function is within mjpegtools itself to map the
string names to int values for the function y4m_log_stream_info().
No more conflict with syslog.h . 'course with mpeg2enc being
essentially not usable it doesn't really matter if LOG_ERROR conflicts
or not, does it?
Cheers,
Steven Schultz
-------------------------------------------------------------------------
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