xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #110: xpra-x264-heisenbug.patch

File xpra-x264-heisenbug.patch, 3.0 KB (added by Antoine Martin, 9 years ago)

adds debugging to the codepaths used by x264 in the client

  • xpra/window_backing.py

     
    100100            self.paint_rgb24(data, x, y, width, height, outstride)
    101101            return  True
    102102        finally:
     103            log("paint_with_video_decoder calling free_image()")
    103104            decoder.free_image()
     105            log("paint_with_video_decoder free_image() done")
    104106
    105107
    106108"""
     
    266268    def paint_rgb24(self, img_data, x, y, width, height, rowstride):
    267269        assert "rgb24" in ENCODINGS
    268270        gc = self._backing.new_gc()
     271        log("paint_rgb24(%s bytes, %s, %s, %s, %s, %s) gc=%s", len(img_data), x, y, width, height, rowstride, gc)
    269272        self._backing.draw_rgb_image(gc, x, y, width, height, gdk.RGB_DITHER_NONE, img_data, rowstride)
     273        log("paint_rgb24() done")
    270274        return  True
    271275
    272276    def paint_pixbuf(self, coding, img_data, x, y, width, height, rowstride):
     
    323327
    324328    def cairo_draw(self, context, x, y):
    325329        try:
     330            log("cairo_draw(%s,%s,%s)", context, x, y)
    326331            context.set_source_pixmap(self._backing, 0, 0)
    327332            context.set_operator(cairo.OPERATOR_SOURCE)
     333            log("context.paint()")
    328334            context.paint()
     335            log("context.paint() done")
    329336            return True
    330337        except:
    331338            log.error("cairo_draw(%s)", context, exc_info=True)
  • xpra/client_window.py

     
    268268        self._client.send_refresh_all()
    269269
    270270    def draw_region(self, x, y, width, height, coding, img_data, rowstride):
     271        log("draw_region(%s, %s, %s, %s, %s, %s bytes, %s)", x, y, width, height, coding, len(img_data), rowstride)
    271272        success = self._backing.draw_region(x, y, width, height, coding, img_data, rowstride)
     273        log("draw_region() success=%s" % success)
    272274        if success:
    273275            queue_draw(self, x, y, width, height)
     276            log("draw_region() queued redraw")
    274277        if self._refresh_requested:
    275278            self._refresh_requested = False
    276279        else:
     
    279282                self._refresh_timer = None
    280283            if self._client.auto_refresh_delay and coding == "jpeg":
    281284                self._refresh_timer = gobject.timeout_add(int(1000 * self._client.auto_refresh_delay), self.refresh_window)
     285        log("draw_region() end")
    282286        return success
    283287
    284288    """ gtk3 """
     
    294298            return
    295299        x,y,_,_ = event.area
    296300        context = self.window.cairo_create()
     301        log("do_expose_event(%s) context=%s", event, context)
    297302        context.rectangle(event.area)
    298303        context.clip()
     304        log("do_expose_event(%s) cairo_draw(%s,%s)", event, x, y)
    299305        self._backing.cairo_draw(context, x, y)
     306        log("do_expose_event(%s) done")
    300307
    301308    def do_map_event(self, event):
    302309        log("Got map event")