diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-10-26 22:50:52 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-10-26 22:50:52 +0000 |
commit | 799a8c755b1ec87a799f1a18e9ccfea04ef1897c (patch) | |
tree | 54945f533388ebc09ed37e54770cb9fb974e77b0 /src/input/net_buf_ctrl.c | |
parent | 549e07167100fc654422dbaa0b9056162ceac606 (diff) | |
download | xine-lib-799a8c755b1ec87a799f1a18e9ccfea04ef1897c.tar.gz xine-lib-799a8c755b1ec87a799f1a18e9ccfea04ef1897c.tar.bz2 |
timeouts for mms, send progress report events, introduce verbosity engine parameter (not implemented yet), document new plugin loader in changelog
CVS patchset: 3029
CVS date: 2002/10/26 22:50:52
Diffstat (limited to 'src/input/net_buf_ctrl.c')
-rw-r--r-- | src/input/net_buf_ctrl.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index 6302ca9dc..bedd061ba 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -33,7 +33,9 @@ #define DEFAULT_LOW_WATER_MARK 2 #define DEFAULT_HIGH_WATER_MARK 5 +/* #define LOG +*/ struct nbc_s { @@ -45,6 +47,23 @@ struct nbc_s { }; +static void report_progress (xine_stream_t *stream, int p) { + + xine_event_t event; + xine_progress_data_t prg; + + prg.description = _("Buffering..."); + prg.percent = p; + + event.type = XINE_EVENT_PROGRESS; + event.data = &prg; + event.data_length = sizeof (xine_progress_data_t); + + xine_event_send (stream, &event); +} + + + void nbc_check_buffers (nbc_t *this) { int fifo_fill; @@ -53,12 +72,15 @@ void nbc_check_buffers (nbc_t *this) { if (this->stream->audio_fifo) { fifo_fill += 8*this->stream->audio_fifo->size(this->stream->audio_fifo); } -#ifdef LOG if (this->buffering) { + + report_progress (this->stream, fifo_fill*100 / this->high_water_mark); + +#ifdef LOG printf ("net_buf_ctl: buffering (%d/%d)...\n", fifo_fill, this->high_water_mark); - } #endif + } if (fifo_fill<this->low_water_mark) { if (!this->buffering) { |