2005-05-25 01:01:21 UTC
> > I can add a function to pick the page sizes
> > without decoding everything. But this will
> > only work efficiently on disk files,
> > not network connections....
> I really want to see this feature since it's very
> user-visible bug. Is it very hard to impelement?
Done (in CVS)
You might have to wait a few hours for
the anonymous cvs mirror.
The function is called
ddjvu_document_get_pageinfo(...)
in the "workaround" section.
I looked a little bit at your evince code.
It seems that you do not call ddjvu_message_pop
(at least I did not find it). This means that all
the messages remain allocated on the queue.
This could make a lot of them.
I think you should write a single function
to handle pending messages (see the "handle"
function in tools/ddjvu.cpp for instance).
Then you have nice constructs like:
....
while (! ddjvu_document_decoding_done(doc))
handle(TRUE);
...
while (! ddjvu_page_decoding_done(page))
handle(TRUE);
...
that make your life easier if you
want to decode djvu documents
synchronously.
Later you could give a try at
decoding pages asynchronously
(do not wait for the page decoding.
call render immediately and you might get
some pixels already. Watch for <m_redisplay>
messages indicating that fresher pixels
are available...)
Also when displaying a page, you can
call ddjvu_page_create() on the next page.
This starts a decoding thread for the next
page while the user is reading the current one.
- L.