summaryrefslogtreecommitdiff
path: root/src/input/input_pnm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/input_pnm.c')
-rw-r--r--src/input/input_pnm.c16
1 files changed, 13 insertions, 3 deletions
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;