![]()
This does not happen when decoding data thatĭata has not yet arrived over the network, Inside another file identified by an INCL chunk. IMHO this will make the viewer a lot more complicated.ĭictionary, a Djbz chunk, that is located I don't understand the advantages of this interface compared to the old interface. ![]() >So a viewer program must poll these three sources of events and do the right thing whenever one occurs. >Basically, a viewer program has to deal with three sources of asynchronous events They are used in WinDjView starting with version 0.3.6. I have been using my patches for almost two months now and there were no problems so far with any document. But since I compile without threads, I just don't call this function now, and there are no more stalls. Actually, there indeed were some stalls in DjVuDocument::get_page inside wait_for_complete_decode() call. My experience shows that exactly the contrary happens - before I made those pathes, I often encountered stalls, but now everything works fine. > It works on most documents but can stall on certain multipage documents. The problems are the same with the old object oriented interface, but the decoding events can come from many sources (DjVuPorts) and require a great deal of synchronization from the viewer. So a viewer program must poll these three sources of events and do the right thing whenever one occurs. They might started things in the background whose progress is reported by a message queue.īasically, a viewer program has to deal with three sources of asynchronous events: All API functions are designed to be called from a single thread. The new interface looks not so clear to me. DJVULIBRE OR WINDJVU WINDOWS> compile ddjvuapi.cpp under Windows and got a lot of compiler errors. There are many functions that no longer make sense to me. DJVULIBRE OR WINDJVU UPDATEThen Lizardtech did many changes but they had no time to update the comments. They come from the version sold by AT&T to Lizardtech. Part of the problem is that the comments are not up-to-date. > I don't fully understand the internals of DjVuLibre It works on most documents but can stall on certain multipage documents. In fact, last year I was platform-independent because I worked with HTML, JavaScript and Java :) I never wrote anything for Linux, so I can't tell you if it's similar to Windows. Still, I'm quite reluctant to use it because I like the current object-oriented interface, and the new interface looks not so clear to me, and it works with structures, not objects :) But that's just my personal opinion. When ddjvuapi will work under Windows, I can try to look at it. I didn't have a close look at them, but I'll send the list of errors to you if you like. And I don't know why, so I thought perhaps this could give you a clue, because you know much more about the library than I do.īTW, I tried to compile ddjvuapi.cpp under Windows and got a lot of compiler errors. So I've just found out that this particular combination of changes seems to solve the problems. I don't fully understand the internals of DjVuLibre, and that's why I tried to make only small harmless changes, to make multithreading more safe. So I needed to come up with a way to fix there bugs. First of all, it crashed from time to time somewhere inside DataPool, and secondly, sometimes it just stalled and stopped decoding pages because one of GMonitors entered a waiting state forever. I started to play with this and make all these changes because I had problems with WinDjView. But with NOTHREADS GMonitors do nothing, that's why I need this WIN32_MONITOR to re-enable GMonitor. At the same time, my program starts a few threads itself, so I want to be able to access the djvu document safely. The reason I need WIN32_MONITOR is that I don't want the library to use threads to do decoding jobs, so I define THREADMODEL to be NOTHREADS. ![]() Then I will be able to refactor the library internals.īut I'll look at your cvs as soon as I get a chance. I am starting to rewrite djview with this api only. This is why I am defining a semantically clear api (ddjvuapi). Short of being able to determine what is the correct behavior of a function, I rather pick the form that works with the other djvu programs. DJVULIBRE OR WINDJVU CODESecond, with time the libdjvu code has lost its semantic clarity. ![]() First setting THREADMODEL=WINTHREADS should already use windows CriticalSections. Regarding threaded code, I am reluctant to change anything. Fortunately the problem is masked because most distributions have switched to the utf-8 locale. On the other hand, unicode support under unix is quite broken in my opinion. I might have introduced little bugs when prepping it for djvulibre, but no big changes should be necessary. ![]() DJVULIBRE OR WINDJVU FULLLibdjvu has compiled under windows with full unicode support. So it is not easy for me to check your CVS right away. I am in the country side with a slow modem connection. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |