aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/layer_image.cpp2
-rw-r--r--src/main.cpp2
-rw-r--r--src/osc_graphics.h6
-rw-r--r--src/osc_server.cpp2
-rw-r--r--src/recorder.cpp12
5 files changed, 12 insertions, 12 deletions
diff --git a/src/layer_image.cpp b/src/layer_image.cpp
index b09361c..3c8f020 100644
--- a/src/layer_image.cpp
+++ b/src/layer_image.cpp
@@ -17,7 +17,7 @@ Layer::CtorInfo LayerImage::ctor_info = {"image", "s" /* file */};
* Macros
*/
#define SDL_IMAGE_ERROR(FMT, ...) \
- ERROR(FMT ": %s", ##__VA_ARGS__, IMG_GetError())
+ ERROR_MSG(FMT ": %s", ##__VA_ARGS__, IMG_GetError())
LayerImage::LayerImage(const char *name, SDL_Rect geo, float opacity,
const char *file) :
diff --git a/src/main.cpp b/src/main.cpp
index 690933c..c66de65 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -262,7 +262,7 @@ main(int argc, char **argv)
#if DEFAULT_SDL_FLAGS & SDL_HWSURFACE
if (!(screen->flags & SDL_HWSURFACE))
- WARNING("Hardware surfaces not available!");
+ WARNING_MSG("Hardware surfaces not available!");
#endif
SDL_ShowCursor(show_cursor);
diff --git a/src/osc_graphics.h b/src/osc_graphics.h
index d1260c4..b634913 100644
--- a/src/osc_graphics.h
+++ b/src/osc_graphics.h
@@ -54,18 +54,18 @@ public:
} \
} while (0)
-#define WARNING(FMT, ...) do { \
+#define WARNING_MSG(FMT, ...) do { \
fprintf(stderr, "%s(%d): Warning: " FMT "\n", \
__FILE__, __LINE__, ##__VA_ARGS__); \
} while (0)
-#define ERROR(FMT, ...) do { \
+#define ERROR_MSG(FMT, ...) do { \
fprintf(stderr, "%s(%d): Error: " FMT "\n", \
__FILE__, __LINE__, ##__VA_ARGS__); \
} while (0)
#define SDL_ERROR(FMT, ...) \
- ERROR(FMT ": %s", ##__VA_ARGS__, SDL_GetError())
+ ERROR_MSG(FMT ": %s", ##__VA_ARGS__, SDL_GetError())
/*
* Declarations
diff --git a/src/osc_server.cpp b/src/osc_server.cpp
index 4dbc17f..cdbbf2a 100644
--- a/src/osc_server.cpp
+++ b/src/osc_server.cpp
@@ -40,7 +40,7 @@ extern LayerList layers;
static void
error_handler(int num, const char *msg, const char *path)
{
- ERROR("liblo server error %d in path %s: %s", num, path, msg);
+ ERROR_MSG("liblo server error %d in path %s: %s", num, path, msg);
}
/* catch any incoming messages and display them. returning 1 means that the
diff --git a/src/recorder.cpp b/src/recorder.cpp
index 9b9454c..fd41a9e 100644
--- a/src/recorder.cpp
+++ b/src/recorder.cpp
@@ -28,7 +28,7 @@ extern "C" {
char buf[255]; \
\
av_strerror(AVERROR, buf, sizeof(buf)); \
- ERROR(FMT ": %s", ##__VA_ARGS__, buf); \
+ ERROR_MSG(FMT ": %s", ##__VA_ARGS__, buf); \
} while (0)
extern "C" {
@@ -127,7 +127,7 @@ Recorder::start(const char *filename, const char *codecname)
stream = av_new_stream(ffmpeg, 0);
if (!stream) {
- ERROR("Could not open stream!");
+ ERROR_MSG("Could not open stream!");
exit(EXIT_FAILURE);
}
@@ -180,9 +180,9 @@ Recorder::start(const char *filename, const char *codecname)
else
videoCodec = avcodec_find_encoder(ffmpeg->oformat->video_codec);
if (!videoCodec) {
- ERROR("Could not find encoder %s (%d)!",
- codecname ? : "NULL",
- ffmpeg->oformat->video_codec);
+ ERROR_MSG("Could not find encoder %s (%d)!",
+ codecname ? : "NULL",
+ ffmpeg->oformat->video_codec);
exit(EXIT_FAILURE);
}
stream->codec->codec_id = videoCodec->id;
@@ -199,7 +199,7 @@ Recorder::start(const char *filename, const char *codecname)
}
if (stream->codec->pix_fmt != screen_fmt) {
- WARNING("Pixel format conversion necessary!");
+ WARNING_MSG("Pixel format conversion necessary!");
/* NOTE: sizes shouldn't differ */
sws_context = sws_getContext(screen->w, screen->h, screen_fmt,