From 2f582c13386aeb7132c64851233245db4994c63d Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 26 Jan 2010 03:05:00 +0000 Subject: Switch off logging, convert some lprintf() to xine_log(), add a startup warning. --- src/input/input_v4l2.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/input/input_v4l2.c b/src/input/input_v4l2.c index 88156d405..fb27db5dc 100644 --- a/src/input/input_v4l2.c +++ b/src/input/input_v4l2.c @@ -26,9 +26,9 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif - +/* #define LOG - +*/ #include "input_plugin.h" #include "xine_plugin.h" #include "xine_internal.h" @@ -107,7 +107,8 @@ static int v4l2_input_open(input_plugin_t *this_gen) { ret = v4l2_ioctl(this->fd, VIDIOC_QUERYCAP, &(this->cap)); if (ret < 0) { - lprintf ("Capability query failed: %s\n", strerror (-ret)); + xine_log (this->stream->xine, XINE_LOG_MSG, + LOG_MODULE": %s: %s\n", _("capability query failed"), strerror (-ret)); return 0; } if (this->cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) { @@ -123,16 +124,19 @@ static int v4l2_input_open(input_plugin_t *this_gen) { return 1; } else { /* TODO: Fallbacks */ - lprintf("Video streaming setup failed.\n"); + xine_log (this->stream->xine, XINE_LOG_MSG, + LOG_MODULE": %s\n", _("video streaming setup failed")); return 0; } } else { /* TODO: Radio streaming */ - lprintf("Sorry, only video is supported for now.\n"); + xine_log (this->stream->xine, XINE_LOG_MSG, + LOG_MODULE": %s\n", _("sorry, only video is supported for now")); return 0; } } else { - lprintf("Device doesn't support streaming. Prod the author to support the other methods.\n"); + xine_log (this->stream->xine, XINE_LOG_MSG, + LOG_MODULE": %s\n", _("device doesn't support streaming - prod the author to support the other methods")); return 0; } } else { @@ -414,6 +418,9 @@ static input_plugin_t *v4l2_class_get_instance(input_class_t *gen_cls, xine_stre this->radio = NULL; lprintf("Ready to read!\n"); + xine_log (this->stream->xine, XINE_LOG_MSG, + LOG_MODULE": %s\n", _("WARNING: this plugin is not of release quality")); + return &this->input_plugin; } -- cgit v1.2.3