From: Stefan H. <ho...@us...> - 2002-12-15 16:54:13
|
Update of /cvsroot/xine/xine-lib/src/input In directory sc8-pr-cvs1:/tmp/cvs-serv30633 Modified Files: input_http.c input_pnm.c input_rtsp.c Log Message: - set high water marks to higher values in http, pnm and rtsp input plugins to prevent stuttering at the beginning - enable CAP_PREVIEW in pnm and rtsp input plugins Index: input_http.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/input/input_http.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- input_http.c 1 Dec 2002 00:36:00 -0000 1.35 +++ input_http.c 15 Dec 2002 16:54:10 -0000 1.36 @@ -880,6 +880,8 @@ this->nbc = nbc_init (this->stream); + nbc_set_high_water_mark(this->nbc, 30); + /* * fill preview buffer */ Index: input_pnm.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/input/input_pnm.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- input_pnm.c 12 Dec 2002 22:56:38 -0000 1.3 +++ input_pnm.c 15 Dec 2002 16:54:10 -0000 1.4 @@ -153,7 +153,7 @@ } static uint32_t pnm_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_NOCAP; + return INPUT_CAP_PREVIEW; } static uint32_t pnm_plugin_get_blocksize (input_plugin_t *this_gen) { @@ -197,7 +197,15 @@ static int pnm_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type) { - /* pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen; */ + pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen; + + switch (data_type) { + case INPUT_OPTIONAL_DATA_PREVIEW: + + return pnm_peek_header(this->pnm, data); + + break; + } return INPUT_OPTIONAL_UNSUPPORTED; } @@ -231,7 +239,9 @@ this->pnm = pnm; this->mrl = mrl; this->nbc = nbc_init (stream); - + + nbc_set_high_water_mark(this->nbc, 50); + this->input_plugin.get_capabilities = pnm_plugin_get_capabilities; this->input_plugin.read = pnm_plugin_read; this->input_plugin.read_block = pnm_plugin_read_block; Index: input_rtsp.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/input/input_rtsp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- input_rtsp.c 14 Dec 2002 00:02:30 -0000 1.2 +++ input_rtsp.c 15 Dec 2002 16:54:10 -0000 1.3 @@ -155,7 +155,7 @@ } static uint32_t rtsp_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_NOCAP; + return INPUT_CAP_PREVIEW; } static uint32_t rtsp_plugin_get_blocksize (input_plugin_t *this_gen) { @@ -202,7 +202,15 @@ static int rtsp_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type) { - /* rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen; */ + rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen; + + switch (data_type) { + case INPUT_OPTIONAL_DATA_PREVIEW: + + return rtsp_session_peek_header(this->rtsp, data); + + break; + } return INPUT_OPTIONAL_UNSUPPORTED; } @@ -242,6 +250,7 @@ sprintf(this->public_mrl, "%s.rm", this->mrl); this->nbc = nbc_init (stream); + nbc_set_high_water_mark(this->nbc, 50); this->input_plugin.get_capabilities = rtsp_plugin_get_capabilities; this->input_plugin.read = rtsp_plugin_read; |