diff options
| author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-06-14 22:22:18 +0100 |
|---|---|---|
| committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-06-14 22:22:18 +0100 |
| commit | 683cd0f89680fdb989e5166cf57ef9d1787c9044 (patch) | |
| tree | 560441af7ccfe453f1f2bd752df14cce7ec2f3ed /src/input | |
| parent | 71ea5354dab942e485ba93505990e010f551ad86 (diff) | |
| parent | 3da8e08c83e25577c47b0117155b3c36198e0277 (diff) | |
| download | xine-lib-683cd0f89680fdb989e5166cf57ef9d1787c9044.tar.gz xine-lib-683cd0f89680fdb989e5166cf57ef9d1787c9044.tar.bz2 | |
Merge from 1.1.
--HG--
rename : include/xine.h.in => include/xine.h
rename : po/libxine1.pot => po/libxine2.pot
Diffstat (limited to 'src/input')
| -rw-r--r-- | src/input/input_file.c | 2 | ||||
| -rw-r--r-- | src/input/net_buf_ctrl.c | 28 |
2 files changed, 28 insertions, 2 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c index 2fcd87d73..ee8957894 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -292,7 +292,7 @@ static uint32_t file_plugin_get_blocksize (input_plugin_t *this_gen) { } /* - * Return 1 is filepathname is a directory, otherwise 0 + * Return 1 if filepathname is a directory, otherwise 0 */ static int is_a_dir(char *filepathname) { struct stat pstat; diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index c0345f652..d777a0cc9 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -96,7 +96,6 @@ static void report_progress (xine_stream_t *stream, int p) { xine_event_send (stream, &event); } - static void nbc_set_speed_pause (nbc_t *this) { xine_stream_t *stream = this->stream; @@ -134,6 +133,29 @@ static void display_stats (nbc_t *this) { fflush(stdout); } +static void report_stats (nbc_t *this, int type) { + xine_event_t event; + xine_nbc_stats_data_t bs; + + bs.v_percent = this->video_fifo_fill; + bs.v_remaining = this->video_fifo_length; + bs.v_bitrate = this->video_br; + bs.v_in_disc = this->video_in_disc; + bs.a_percent = this->audio_fifo_fill; + bs.a_remaining = this->audio_fifo_length; + bs.a_bitrate = this->audio_br; + bs.a_in_disc = this->audio_in_disc; + bs.buffering = this->buffering; + bs.enabled = this->enabled; + bs.type = type; + + event.type = XINE_EVENT_NBC_STATS; + event.data = &bs; + event.data_length = sizeof (xine_nbc_stats_data_t); + + xine_event_send (this->stream, &event); +} + /* Try to compute the length of the fifo in 1/1000 s * 2 methods : * if the bitrate is known @@ -343,6 +365,8 @@ static void nbc_put_cb (fifo_buffer_t *fifo, } if(this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) display_stats(this); + + report_stats(this, 0); } } else { @@ -462,6 +486,8 @@ static void nbc_get_cb (fifo_buffer_t *fifo, if(this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) display_stats(this); + + report_stats(this, 1); } } else { /* discontinuity management */ |
