[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] About the filters' interface
From: |
Jose E. Marchesi |
Subject: |
Re: [pdf-devel] About the filters' interface |
Date: |
Fri, 15 Jul 2011 00:07:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi.
In the filters' interface there seems to be the possibility that not
enough input to do the decoding is sent (an incomplete buffer). Is
it so? In case it's affirmative: when more data comes in, will it
come in a new assigned buffer or in an expansion of the same one?
When the apply function empties the input buffer, it must return
PDF_STM_FILTER_APPLY_STATUS_NO_INPUT to request being called again with
more input in the input buffer. The input buffer is assumed to be empty
at that point (if some of the data in input could not be processed then
it is the responsibility of the filter to save it in some internal
buffer).
Regarding output, the same: can I expand the buffer on my own
instead of requesting more space?
The filter is not supposed to alter the size of the output buffer.
PDF_STM_FILTER_APPLY_STATUS_NO_OUTPUT is returned in that case. Again,
the filter can cache some of the output in an internal buffer if it
needs to.
Hope that helped.
--
Jose E. Marchesi address@hidden
GNU Project http://www.gnu.org