diff options
author | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2003-11-26 23:44:08 +0000 |
---|---|---|
committer | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2003-11-26 23:44:08 +0000 |
commit | e76d60c53d666cc42408bcea5e4060ac173798dd (patch) | |
tree | a2b395870a898ad7bdfe1f49a7717499f40e1386 /src/input | |
parent | 23176d5f3aaafdf90795fb847a064d0bb1b8d198 (diff) | |
download | xine-lib-e76d60c53d666cc42408bcea5e4060ac173798dd.tar.gz xine-lib-e76d60c53d666cc42408bcea5e4060ac173798dd.tar.bz2 |
xprintf clean pass. xprintf now log into new XINE_LOG_TRACE log buffer. scratch buffer enhancement (thanks Thibaut for the malloc tips), enlarge log buffer from 25 lines (very useless), to 150 (better).
CVS patchset: 5801
CVS date: 2003/11/26 23:44:08
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_dvd.c | 11 | ||||
-rw-r--r-- | src/input/input_mms.c | 4 | ||||
-rw-r--r-- | src/input/input_v4l.c | 24 | ||||
-rw-r--r-- | src/input/net_buf_ctrl.c | 18 |
4 files changed, 26 insertions, 31 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 01f8ed89a..291ae37ea 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.173 2003/11/16 23:33:44 f1rmb Exp $ + * $Id: input_dvd.c,v 1.174 2003/11/26 23:44:09 f1rmb Exp $ * */ @@ -1376,8 +1376,7 @@ static int dvd_plugin_open (input_plugin_t *this_gen) { this->opened = 0; ret = dvdnav_open(&this->dvdnav, intended_dvd_device); if(ret == DVDNAV_STATUS_ERR) { - if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("input_dvd: Error opening DVD device\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "input_dvd: Error opening DVD device\n"); _x_message (this->stream, XINE_MSG_READ_ERROR, intended_dvd_device, NULL); return 0; @@ -1388,8 +1387,7 @@ static int dvd_plugin_open (input_plugin_t *this_gen) { } else { ret = dvdnav_open(&this->dvdnav, intended_dvd_device); if(ret == DVDNAV_STATUS_ERR) { - if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) - printf("input_dvd: Error opening DVD device\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "input_dvd: Error opening DVD device\n"); _x_message (this->stream, XINE_MSG_READ_ERROR, intended_dvd_device, NULL); return 0; @@ -1727,6 +1725,9 @@ static void *init_class (xine_t *xine, void *data) { /* * $Log: input_dvd.c,v $ + * Revision 1.174 2003/11/26 23:44:09 f1rmb + * xprintf clean pass. xprintf now log into new XINE_LOG_TRACE log buffer. scratch buffer enhancement (thanks Thibaut for the malloc tips), enlarge log buffer from 25 lines (very useless), to 150 (better). + * * Revision 1.173 2003/11/16 23:33:44 f1rmb * New stream/meta info (safe) stuff. * BIG NOTE: use helpers to access to these informations (get/set/reset): diff --git a/src/input/input_mms.c b/src/input/input_mms.c index faa0933fd..76ada3774 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.42 2003/11/26 19:43:31 f1rmb Exp $ + * $Id: input_mms.c,v 1.43 2003/11/26 23:44:09 f1rmb Exp $ * * mms input plugin based on work from major mms */ @@ -35,7 +35,6 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include "bswap.h" #define LOG_MODULE "input_mms" #define LOG_VERBOSE @@ -43,6 +42,7 @@ #define LOG */ +#include "bswap.h" #include "xine_internal.h" #include "xineutils.h" #include "input_plugin.h" diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index 94f6e6ad1..2ccfc397a 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -665,9 +665,8 @@ static int search_by_channel(v4l_input_plugin_t *this, char *input_source) } if (strstr(this->video_channel.name, input_source) == NULL) { - if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) - PRINT("Tuner name not found\n"); - return -1; + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "Tuner name not found\n"); + return -1; } this->tuner_name = input_source; @@ -1189,9 +1188,9 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi /* Buffer is empty, and we did not pause playback */ report_progress(this->stream, SCR_PAUSED); - if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) - PRINT("Buffer is empty, pausing playback (used: %d, num_free: %d)\r\n", - num_used, num_free); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + "Buffer is empty, pausing playback (used: %d, num_free: %d)\r\n", + num_used, num_free); this->stream->xine->clock->set_speed (this->stream->xine->clock, XINE_SPEED_PAUSE); this->stream->xine->clock->set_option (this->stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 0); @@ -1211,9 +1210,8 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi if (scr_tunning == SCR_PAUSED) { if (2 * num_used > num_free) { /* Playback was paused, but we have normal buffer usage again */ - if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) - PRINT("Resuming playback (used: %d, free: %d)\r\n", - num_used, num_free); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + "Resuming playback (used: %d, free: %d)\r\n", num_used, num_free); this->scr_tunning = 0; @@ -1251,8 +1249,8 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi /* Check if speed adjustment should be changed */ if (scr_tunning != this->scr_tunning) { this->scr_tunning = scr_tunning; - if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) - PRINT("scr tunning = %d (used: %d, free: %d)\r\n", scr_tunning, num_used, num_free); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + "scr tunning = %d (used: %d, free: %d)\r\n", scr_tunning, num_used, num_free); pvrscr_speed_tunning(this->scr, 1.0 + (0.01 * scr_tunning)); } } else @@ -1263,8 +1261,8 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi */ this->scr_tunning = 0; - if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) - PRINT("scr tunning resetting (used: %d, free: %d\r\n", num_used, num_free); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + "scr tunning resetting (used: %d, free: %d\r\n", num_used, num_free); pvrscr_speed_tunning(this->scr, 1.0); } diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index 7462b0793..bb8970e81 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -237,8 +237,7 @@ static void nbc_alloc_cb (fifo_buffer_t *fifo, void *this_gen) { report_progress (this->stream, 100); this->buffering = 0; - if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) - printf("\nnet_buf_ctrl: nbc_alloc_cb: stops buffering\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "\nnet_buf_ctrl: nbc_alloc_cb: stops buffering\n"); nbc_set_speed_normal(this->stream); } @@ -262,8 +261,7 @@ static void nbc_put_cb (fifo_buffer_t *fifo, /* do nothing if we are at the end of the stream */ if (!this->enabled) { /* a new stream starts */ - if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) - printf("\nnet_buf_ctrl: nbc_put_cb: starts buffering\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "\nnet_buf_ctrl: nbc_put_cb: starts buffering\n"); this->enabled = 1; this->buffering = 1; this->video_first_pts = 0; @@ -299,8 +297,7 @@ static void nbc_put_cb (fifo_buffer_t *fifo, report_progress (this->stream, 100); this->buffering = 0; - if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) - printf("\nnet_buf_ctrl: nbc_put_cb: stops buffering\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "\nnet_buf_ctrl: nbc_put_cb: stops buffering\n"); nbc_set_speed_normal(this->stream); @@ -353,8 +350,7 @@ static void nbc_put_cb (fifo_buffer_t *fifo, this->progress = 100; report_progress (this->stream, this->progress); - if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) - printf("\nnet_buf_ctrl: nbc_put_cb: stops buffering\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "\nnet_buf_ctrl: nbc_put_cb: stops buffering\n"); nbc_set_speed_normal(this->stream); } @@ -427,9 +423,9 @@ static void nbc_get_cb (fifo_buffer_t *fifo, this->progress = 0; report_progress (this->stream, 0); - if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) - printf("\nnet_buf_ctrl: nbc_get_cb: starts buffering, vid: %d, aud: %d\n", - this->video_fifo_fill, this->audio_fifo_fill); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "\nnet_buf_ctrl: nbc_get_cb: starts buffering, vid: %d, aud: %d\n", + this->video_fifo_fill, this->audio_fifo_fill); nbc_set_speed_pause(this->stream); } } |