diff options
author | wm4 <wm4@nowhere> | 2013-12-21 23:15:32 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 23:15:32 +0100 |
commit | 0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2 (patch) | |
tree | b70f214f8c3fc802d6d6edbf8395273c854ac0fd /stream/stream_dvd_common.c | |
parent | a4fe95b0d8d339ba5afbdb5346ad8fd367a4a1c1 (diff) | |
parent | 245e5b844177e9ad9a9c07eff5efab7c3fccdebc (diff) | |
download | mpv-0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2.tar.bz2 mpv-0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2.tar.xz |
Merge branch 'msg_refactor'
This branch changes mp_msg() so that it doesn't require global context.
The changes are pretty violent.
Diffstat (limited to 'stream/stream_dvd_common.c')
-rw-r--r-- | stream/stream_dvd_common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stream/stream_dvd_common.c b/stream/stream_dvd_common.c index 31d045ae5b..6c29d446c5 100644 --- a/stream/stream_dvd_common.c +++ b/stream/stream_dvd_common.c @@ -49,7 +49,7 @@ const char * const dvd_audio_stream_channels[6] = { "mono", "stereo", "unknown", int dvd_speed=0; /* 0 => don't touch speed */ -void dvd_set_speed(char *device, unsigned speed) +void dvd_set_speed(stream_t *stream, char *device, unsigned speed) { #if defined(__linux__) && defined(SG_IO) && defined(GPCMD_SET_STREAMING) int fd; @@ -69,13 +69,13 @@ void dvd_set_speed(char *device, unsigned speed) return; case -1: /* restore default value */ if (dvd_speed == 0) return; /* we haven't touched the speed setting */ - mp_msg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... "); + MP_INFO(stream, "Restoring DVD speed... "); break; default: /* limit to <speed> KB/s */ // speed < 100 is multiple of DVD single speed (1350KB/s) if (speed < 100) speed *= 1350; - mp_msg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed); + MP_INFO(stream, "Limiting DVD speed to %dKB/s... ", speed); break; } @@ -108,14 +108,14 @@ void dvd_set_speed(char *device, unsigned speed) fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC); if (fd == -1) { - mp_msg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n"); + MP_INFO(stream, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n"); return; } if (ioctl(fd, SG_IO, &sghdr) < 0) - mp_msg(MSGT_OPEN, MSGL_INFO, "failed\n"); + MP_INFO(stream, "failed\n"); else - mp_msg(MSGT_OPEN, MSGL_INFO, "successful\n"); + MP_INFO(stream, "successful\n"); close(fd); #endif |