Bug 34262 - Flash plugin video flips upside down (and back) randomly
Summary: Flash plugin video flips upside down (and back) randomly
Status: RESOLVED FIXED
Alias: None
Product: Spice
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: highest blocker
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 08:32 UTC by Leonardo E. Reiter
Modified: 2011-06-06 06:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fix flipped video in Linux guest on windows client (2.26 KB, patch)
2011-06-06 06:23 UTC, Yonit Halperin
Details | Splinter Review

Description Leonardo E. Reiter 2011-02-14 08:32:45 UTC
When using a Windows SPICE 0.6.3 client to access a RHEL 6 Linux guest on a SPICE 0.6.3 server, playing Flash videos in firefox randomly flips the video upside down (and back) while playing.

We have done a fair amount of testing on this and discovered that it does not happen if using a Linux SPICE client against the same guest/SPICE server.

I posted this on Spice-devel recently but have yet to receive a response:

"In reference to Gerd Hoffman's response here:
http://lists.freedesktop.org/archives/spice-devel/2010-September/001258.html

we have spent a fair amount of time analyzing the behaviors and would appreciate some hints...

We can reproduce this easily using SPICE 0.6.3 server and client, linked to freedesktop.org's git QEMU version from the same vintage.  It always fails when using Flash player inside Firefox, inside a VM running RHEL 6 for example.  The video flips up and down randomly almost immediately after playback starts.

We can only see this behavior if we connect to the VM from a Windows computer.  If we connect from a Linux computer with the SPICE client, it never flips.

We have investigated the code to understand at least what the SPICE server and client do with the top_down flag, but we cannot figure out where this flag originates yet.  If it originates from the guest, there must be some other bit that is being translated because we cannot find a reference to it from the win32 QXL driver for example.  Our guess is that rendering bottom/up video is simply not supported on most Linux X servers, which explains why this never fails with the Linux client.  It also seems to explain why the Linux flash player does not have the same bug when run natively (not in a KVM session).  This is just a theory.

Gerd, do you have any more insight into this?  No doubt the Flash player plugin is probably doing the wrong thing, but some hint as to how this flag makes its way from the QXL driver all the way to the client would be greatly appreciated. We are thinking of experimenting with an override in case the application misbehaves.

Thanks very much in advance,

Leo Reiter"

This morning we verified this problem still exists in SPICE 0.6.4 as well.

Thank you,

Leo Reiter
Comment 1 Yonit Halperin 2011-06-06 06:23:52 UTC
Created attachment 47599 [details] [review]
fix flipped video in Linux guest on windows client

Video streams from Linux guests are oriented top-down, where gdi_canvas_put_image always received display context for down-top oriented bitmap. I fixed create_bitmap
Comment 2 Yonit Halperin 2011-06-06 06:24:28 UTC
Fixed: 

master: d63fd4c5b0ac3e60e4e1652f30375ac61dcf492d
0.8: 04595c74ada945fcc2a1c5b37208cfae844b5bf6


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.