diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_http.c | 2 | ||||
-rw-r--r-- | src/input/input_pnm.c | 16 | ||||
-rw-r--r-- | src/input/input_rtsp.c | 13 | ||||
-rw-r--r-- | src/input/librtsp/rtsp_session.c | 7 | ||||
-rw-r--r-- | src/input/librtsp/rtsp_session.h | 4 |
5 files changed, 35 insertions, 7 deletions
diff --git a/src/input/input_http.c b/src/input/input_http.c index bcdfde748..78cae53ed 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -880,6 +880,8 @@ static input_plugin_t *open_plugin (input_class_t *cls_gen, xine_stream_t *strea this->nbc = nbc_init (this->stream); + nbc_set_high_water_mark(this->nbc, 30); + /* * fill preview buffer */ diff --git a/src/input/input_pnm.c b/src/input/input_pnm.c index 2ea03f072..b32dd7bf5 100644 --- a/src/input/input_pnm.c +++ b/src/input/input_pnm.c @@ -153,7 +153,7 @@ static off_t pnm_plugin_get_length (input_plugin_t *this_gen) { } 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 char* pnm_plugin_get_mrl (input_plugin_t *this_gen) { 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 @@ static input_plugin_t *open_plugin (input_class_t *cls_gen, xine_stream_t *strea 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; diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index 2accc1515..f97e3e02c 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -155,7 +155,7 @@ static off_t rtsp_plugin_get_length (input_plugin_t *this_gen) { } 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 char* rtsp_plugin_get_mrl (input_plugin_t *this_gen) { 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 @@ static input_plugin_t *open_plugin (input_class_t *cls_gen, xine_stream_t *strea 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; diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c index b522c777f..3e51ac7a1 100644 --- a/src/input/librtsp/rtsp_session.c +++ b/src/input/librtsp/rtsp_session.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: rtsp_session.c,v 1.2 2002/12/14 00:02:31 holstsn Exp $ + * $Id: rtsp_session.c,v 1.3 2002/12/15 16:54:10 holstsn Exp $ * * high level interface to rtsp servers. */ @@ -152,6 +152,11 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) { return len; } +int rtsp_session_peek_header(rtsp_session_t *this, char *buf) { + + memcpy(buf, this->header, this->header_len); + return this->header_len; +} void rtsp_session_end(rtsp_session_t *session) { diff --git a/src/input/librtsp/rtsp_session.h b/src/input/librtsp/rtsp_session.h index 4ce89a0e5..fe7814b52 100644 --- a/src/input/librtsp/rtsp_session.h +++ b/src/input/librtsp/rtsp_session.h @@ -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: rtsp_session.h,v 1.1 2002/12/12 22:14:56 holstsn Exp $ + * $Id: rtsp_session.h,v 1.2 2002/12/15 16:54:10 holstsn Exp $ * * high level interface to rtsp servers. */ @@ -28,6 +28,8 @@ rtsp_session_t *rtsp_session_start(char *mrl); int rtsp_session_read(rtsp_session_t *session, char *data, int len); +int rtsp_session_peek_header(rtsp_session_t *this, char *buf); + void rtsp_session_end(rtsp_session_t *session); |