From: Darren S. <li...@yo...> - 2010-01-26 18:39:53
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1264475100 0 # Node ID d0cffcb8fd8538cce2fa84e51a4285f24853137e # Parent 24f1bc4ee7d714d3a6061933f89d1dfeb372c7c8 Switch off logging, convert some lprintf() to xine_log(), add a startup warning. diff --git a/src/input/input_v4l2.c b/src/input/input_v4l2.c --- 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 @@ 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 @@ 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 @@ 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; } |