aboutsummaryrefslogtreecommitdiffstats
path: root/ui/vnc-jobs-async.c
AgeCommit message (Collapse)AuthorFilesLines
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-7/+7
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-13Refactor thread retrieval and checkJan Kiszka1-1/+1
We have qemu_cpu_self and qemu_thread_self. The latter is retrieving the current thread, the former is checking for equality (using CPUState). We also have qemu_thread_equal which is only used like qemu_cpu_self. This refactors the interfaces, creating qemu_cpu_is_self and qemu_thread_is_self as well ass qemu_thread_get_self. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-25vnc: fix a memory leak in threaded vnc serverCorentin Chary1-0/+2
VncJobQueue's buffer is intended to be used for as the output buffer for all operations in this queue, but unfortunatly. vnc_async_encoding_start() is in charge of setting this buffer as the current output buffer, but vnc_async_encoding_end() was not writting the changes back to VncJobQueue, resulting in a big and ugly memleak. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-23vnc: Add ZRLE and ZYWRLE encodings.Corentin Chary1-0/+2
Add ZRLE [1] and ZYWRLE [2] encodings. The code is inspire^W stolen from libvncserver (again), but have been rewriten to match QEMU coding style. [1] http://www.realvnc.com/docs/rfbproto.pdf [2] http://micro-vnc.jp/research/remote_desktop_ng/ZYWRLE/publications/ Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-23vnc: refresh lossy rect after a given timeoutCorentin Chary1-0/+2
If an adaptive encoding has choosen to send a lossy update based on the result of vnc_update_freq(), then it should advertise it with vnc_sent_lossy_rect(). This will allow to automatically refresh this rect once it's static again. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-04vnc: qemu can die if the client is disconnected while updating screenCorentin Chary1-0/+4
agraf reported that qemu_mutex_destroy(vs->output_mutex) while failing in vnc_disconnect_finish(). It's because vnc_worker_thread_loop() tries to unlock the mutex while not locked. The unlocking call doesn't fail (pthread bug ?), but the destroy call does. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26vnc: threaded VNC serverCorentin Chary1-0/+331
Implement a threaded VNC server using the producer-consumer model. The main thread will push encoding jobs (a list a rectangles to update) in a queue, and the VNC worker thread will consume that queue and send framebuffer updates to the output buffer. The threaded VNC server can be enabled with ./configure --enable-vnc-thread. If you don't want it, just use ./configure --disable-vnc-thread and a syncrhonous queue of job will be used (which as exactly the same behavior as the old queue). If you disable the VNC thread, all thread related code will not be built and there will be no overhead. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>