Ticket #328: actual-video-size.patch
File actual-video-size.patch, 2.2 KB (added by , 8 years ago) |
---|
-
xpra/client/window_backing_base.py
223 223 assert x==0 and y==0 224 224 try: 225 225 self._decoder_lock.acquire() 226 enc_width, enc_height = options.get("scaled_size", (width, height)) 226 #the actual output size (after csc, if any) 227 out_width, out_height = options.get("video_size", (width, height)) 228 #the encoding size (before csc/scaling) 229 enc_width, enc_height = options.get("scaled_size", (out_width, out_height)) 227 230 colorspace = options.get("csc") 228 231 if not colorspace: 229 232 # Backwards compatibility with pre 0.10.x clients … … 256 259 if not img: 257 260 raise Exception("paint_with_video_decoder: %s decompression error on %s bytes of picture data for %sx%s pixels, options=%s" % ( 258 261 coding, len(img_data), width, height, options)) 259 self.do_video_paint(img, x, y, enc_width, enc_height, width,height, options, callbacks)262 self.do_video_paint(img, x, y, enc_width, enc_height, out_width, out_height, options, callbacks) 260 263 finally: 261 264 self._decoder_lock.release() 262 265 return False -
xpra/server/window_video_source.py
505 505 #tell the client about scaling: 506 506 if self._csc_encoder and (enc_width!=width or enc_height!=height): 507 507 client_options["scaled_size"] = enc_width, enc_height 508 client_options["video_size"] = (width, height) 508 509 debug("video_encode encoder: %s %sx%s result is %s bytes (%.1f MPixels/s), client options=%s", 509 510 encoding, enc_width, enc_height, len(data), (enc_width*enc_height/(end-start+0.000001)/1024.0/1024.0), client_options) 510 511 return Compressed(encoding, data), client_options, 0