diff options
author | wm4 <wm4@nowhere> | 2013-12-21 20:36:45 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 21:43:16 +0100 |
commit | 0335011f11d9d13f70db6c46ed6189a74d48ec67 (patch) | |
tree | 03a146b06b5a8c405f5c521abadeeea35c296920 /stream/stream_file.c | |
parent | 3dbc9007b080028f0aebbbf8b9ab1233cd70c45b (diff) | |
download | mpv-0335011f11d9d13f70db6c46ed6189a74d48ec67.tar.bz2 mpv-0335011f11d9d13f70db6c46ed6189a74d48ec67.tar.xz |
stream: mp_msg conversions
We also drop some slave mode stuff from stream_vcd.
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r-- | stream/stream_file.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c index 9f88e5bf6e..9b27b7bc82 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -107,7 +107,7 @@ static int open_f(stream_t *stream, int mode) else if (mode == STREAM_WRITE) m |= O_RDWR | O_CREAT | O_TRUNC; else { - mp_msg(MSGT_OPEN, MSGL_ERR, "[file] Unknown open mode %d\n", mode); + MP_ERR(stream, "Unknown open mode %d\n", mode); return STREAM_UNSUPPORTED; } @@ -123,13 +123,13 @@ static int open_f(stream_t *stream, int mode) if (!strcmp(filename, "-")) { if (mode == STREAM_READ) { - mp_msg(MSGT_OPEN, MSGL_INFO, "Reading from stdin...\n"); + MP_INFO(stream, "Reading from stdin...\n"); fd = 0; #if HAVE_SETMODE setmode(fileno(stdin), O_BINARY); #endif } else { - mp_msg(MSGT_OPEN, MSGL_INFO, "Writing to stdout\n"); + MP_INFO(stream, "Writing to stdout\n"); fd = 1; #if HAVE_SETMODE setmode(fileno(stdout), O_BINARY); @@ -144,14 +144,14 @@ static int open_f(stream_t *stream, int mode) #endif fd = open(filename, m | O_BINARY, openmode); if (fd < 0) { - mp_msg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n", + MP_ERR(stream, "Cannot open file '%s': %s\n", filename, strerror(errno)); return STREAM_ERROR; } #ifndef __MINGW32__ struct stat st; if (fstat(fd, &st) == 0 && S_ISDIR(st.st_mode)) { - mp_msg(MSGT_OPEN, MSGL_ERR, "File is a directory: '%s'\n", + MP_ERR(stream, "File is a directory: '%s'\n", filename); close(fd); return STREAM_ERROR; @@ -175,7 +175,7 @@ static int open_f(stream_t *stream, int mode) stream->end_pos = len; } - mp_msg(MSGT_OPEN, MSGL_V, "[file] File size is %" PRId64 " bytes\n", len); + MP_VERBOSE(stream, "File size is %" PRId64 " bytes\n", len); stream->fill_buffer = fill_buffer; stream->write_buffer = write_buffer; |