Re: [Spice-devel] [PATCH 2/2] SPICE port basic implementation

2016-09-28 Thread Oliver Gutierrez
Here is an small guide to test this for the ones that want to check it faster: Add a spiceport to a virtual machine adding this under devices in the XML Boot machine, Connect to it as usual using spice-html5 and as root: echo "CHILI" > /dev/virtio-ports/org.freedeskt

[Spice-devel] [spice-html5 stream 0/5] Modest improvements for video streaming

2016-09-28 Thread Jeremy White
In testing audio in conjunction with video playback, I made a number of fairly modest improvements to the spice-html5 streaming support. This patch set provides those; with this set, and the prior audio set, you can arguably play videos using spice-html5 and the result is usable. Jeremy White (5)

[Spice-devel] [spice-html5 stream 1/5] Do not wait for the source buffer open callback to start stream creation.

2016-09-28 Thread Jeremy White
Otherwise, we end up discarding stream data messages, and our decode can become corrupted, notably on Chrome. This way, we should not lose any messages while we are waiting for source buffer creation. Signed-off-by: Jeremy White --- display.js | 23 ++- 1 file changed, 10 in

[Spice-devel] [spice-html5 stream 2/5] Improve stream debug messages slightly.

2016-09-28 Thread Jeremy White
Signed-off-by: Jeremy White --- display.js | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/display.js b/display.js index 9fc13c0..6c6b962 100644 --- a/display.js +++ b/display.js @@ -535,7 +535,10 @@ SpiceDisplayConn.prototype.process_channel_message = function(msg)

[Spice-devel] [spice-html5 stream 5/5] Protect against an mjpeg stream image draw occuring after stream destruction.

2016-09-28 Thread Jeremy White
Signed-off-by: Jeremy White --- display.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/display.js b/display.js index d9bdd9f..e26bff8 100644 --- a/display.js +++ b/display.js @@ -963,8 +963,8 @@ function handle_draw_jpeg_onload() this.o.sc.surfaces[this.o.base

[Spice-devel] [spice-html5 stream 3/5] If MediaSource is not available, do not report the vp8 or opus caps.

2016-09-28 Thread Jeremy White
Signed-off-by: Jeremy White --- spiceconn.js | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/spiceconn.js b/spiceconn.js index 9651b47..33e7388 100644 --- a/spiceconn.js +++ b/spiceconn.js @@ -127,21 +127,28 @@ SpiceConn.prototype = )

[Spice-devel] [spice-html5 stream 4/5] Setting src to null generates console log messages.

2016-09-28 Thread Jeremy White
Instead, let's set it to an empty gif. Should have the same benefit. Signed-off-by: Jeremy White --- display.js | 2 +- utils.js | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/display.js b/display.js index 6c6b962..d9bdd9f 100644 --- a/display.js +++ b/display.js @@

[Spice-devel] [spice-html5 audio 2/4] Revise sound packet time sequencing for a more recent Firefox.

2016-09-28 Thread Jeremy White
Around version 45, Firefox started being very particular about the time stamps put into the Opus stream. The time stamps from the Spice server are somewhat irregular. They mostly arrive every 10 ms, but sometimes it is 11, or sometimes with two time stamps the same in a row. The previous logic

[Spice-devel] [spice-html5 audio 0/4] Audio tuneup patch set

2016-09-28 Thread Jeremy White
Firefox and Chrome have both drifted somewhat over the past few years, and audio playback is no longer as robust in spice-html5 as it once was. Further, the MediaSource specification is a bit more stable than it was when the initial implementation was written. This patch set tunes the spice-html5

[Spice-devel] [spice-html5 audio 4/4] Implement support for the playback stop message.

2016-09-28 Thread Jeremy White
This allows audio processing to be more robust in Firefox. Signed-off-by: Jeremy White --- playback.js | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/playback.js b/playback.js index 55dc0e8..48d4cdd 100644 --- a/playback.js +++ b/playback.js @@ -158,7 +158,

[Spice-devel] [spice-html5 audio 1/4] Use modern brower information to detect underrun.

2016-09-28 Thread Jeremy White
We previously had a fairly crude 'gap detection', but browsers are largely supporting the modern buffer semantics, and we can now rely on them to detect under runs for us. This improves audio in Chrome while playing large videos. Signed-off-by: Jeremy White --- playback.js | 30

[Spice-devel] [spice-html5 audio 3/4] Rely on the auto play attribute.

2016-09-28 Thread Jeremy White
Browsers now reliably autoplay, and issuing play prematurely can generate an error in both Firefox and Chrome. Hence we can simply remove this call and audio seems to work fine. Signed-off-by: Jeremy White --- playback.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/playback.js b/playb

Re: [Spice-devel] [PATCH 2/2] SPICE port basic implementation

2016-09-28 Thread Jeremy White
Looks good to me. I don't have the time to test this myself, so I'll leave this open for others to kibitz for now. I don't think it will do harm, so if no one else expresses an opinion after a while, you can probably nudge me into pushing it. Reviewed-by: Jeremy White Cheers, Jeremy On 09/27

Re: [Spice-devel] [PATCH 1/2] Fixed trailing whitespaces in several files

2016-09-28 Thread Jeremy White
Acked and pushed. Cheers, Jeremy On 09/27/2016 10:29 AM, Oliver Gutierrez wrote: > --- > README | 4 ++-- > TODO| 2 +- > cursor.js | 2 +- > display.js | 36 ++-- > enums.js| 2 +- > main.js

Re: [Spice-devel] [PATCH 2/2] Convert RedChannelClient hierarchy to GObject

2016-09-28 Thread Frediano Ziglio
> > On Tue, 2016-09-27 at 05:50 -0400, Frediano Ziglio wrote: > > > > > > > > > Convert the RedChannelClient heirarchy into GObjects. Since the > > > existing > > > constructors could fail and return NULL, I inherited the base > > > channel > > > client from GInitable, which introduces a depende

Re: [Spice-devel] [PATCH 2/2] Convert RedChannelClient hierarchy to GObject

2016-09-28 Thread Jonathon Jongsma
On Tue, 2016-09-27 at 05:50 -0400, Frediano Ziglio wrote: > > > > > > Convert the RedChannelClient heirarchy into GObjects. Since the > > existing > > constructors could fail and return NULL, I inherited the base > > channel > > client from GInitable, which introduces a dependency on gio. > > >

Re: [Spice-devel] [PATCH qxl-wddm-dod 2/8] Mark all functions that should go to non paged sections

2016-09-28 Thread Frediano Ziglio
> This is extremely dangerous!, this can be working without any errors most of > the time but in a rare cases this could > cause a crash - in case a non pageable function made pageable by this patch - > which can be hard to troubleshoot! Actually this is not far from what the current code is doing

Re: [Spice-devel] [PATCH qxl-wddm-dod 2/8] Mark all functions that should go to non paged sections

2016-09-28 Thread Sameeh Jubran
This is extremely dangerous!, this can be working without any errors most of the time but in a rare cases this could cause a crash - in case a non pageable function made pageable by this patch - which can be hard to troubleshoot! On Wed, Sep 28, 2016 at 4:55 PM, Frediano Ziglio wrote: > This mak

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 3/4] Code Analysis and style fix

2016-09-28 Thread Frediano Ziglio
> On Wed, Sep 28, 2016 at 3:06 PM, Frediano Ziglio < fzig...@redhat.com > > wrote: > > > > > > > Based on a patch by Sandy Stutsman < sstut...@redhat.com > > > > > > > > > Signed-off-by: Sameeh Jubran < sam...@daynix.com > > > > Acked-by: Frediano Ziglio < fzig...@redhat.com > > > > > --- >

[Spice-devel] [PATCH qxl-wddm-dod 5/8] Remove possible future memory leak

2016-09-28 Thread Frediano Ziglio
The SetClip function is not currently called by the code however it contains a leak as the missing call to RELEASE_RES cause the reference counter to be 2 so won't be freed when resources are freed. Signed-off-by: Frediano Ziglio --- qxldod/QxlDod.cpp | 1 + 1 file changed, 1 insertion(+) diff

[Spice-devel] [PATCH qxl-wddm-dod 7/8] Remove unused EmptyReleaseRing method

2016-09-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- qxldod/QxlDod.cpp | 11 --- qxldod/QxlDod.h | 1 - 2 files changed, 12 deletions(-) diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index 4b27b9c..2294a81 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@ -3916,17 +3916,6 @@ void QxlDevice

[Spice-devel] [PATCH qxl-wddm-dod 3/8] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-28 Thread Frediano Ziglio
Disable execution bit on mapping improving security. MmMapIoSpaceEx is available only in Windows 10 so to provide binary compatibility detect the new function dynamically. Added a separate compatibility file. Based on a patch by Sandy Stutsman Signed-off-by: Sameeh Jubran Signed-off-by: Fredia

[Spice-devel] [PATCH qxl-wddm-dod 4/8] Code Analysis fix

2016-09-28 Thread Frediano Ziglio
From: Sameeh Jubran Remove specifier that was causing a warning. Based on a patch by Sandy Stutsman Signed-off-by: Sameeh Jubran --- qxldod/QxlDod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index a9a6cd4..78982a7 100755 --- a

[Spice-devel] [PATCH qxl-wddm-dod 1/8] Add missing calls to PAGED_CODE

2016-09-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- qxldod/QxlDod.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index 5cfff78..d7830e5 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@ -2930,6 +2930,7 @@ VOID VgaDevice::ResetDevice(VOID) NTSTATUS VgaDe

[Spice-devel] [PATCH qxl-wddm-dod 0/8] Miscellaneous

2016-09-28 Thread Frediano Ziglio
First two patches replace the previous "Using declspec instead of #pragma to declare pageable" which although correct was unexpectedly large. Third is the updated (comment) one for dynamic MmMapIoSpaceEx detection. The is one missing hunk from a previous patch ("Code Analysis fix"). Others are m

[Spice-devel] [PATCH qxl-wddm-dod 6/8] Remove unused DebugPrintFunc function

2016-09-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- qxldod/driver.cpp | 7 --- qxldod/driver.h | 1 - 2 files changed, 8 deletions(-) diff --git a/qxldod/driver.cpp b/qxldod/driver.cpp index eafeb1e..f660304 100755 --- a/qxldod/driver.cpp +++ b/qxldod/driver.cpp @@ -661,13 +661,6 @@ void DebugPrintFuncSeri

[Spice-devel] [PATCH qxl-wddm-dod 2/8] Mark all functions that should go to non paged sections

2016-09-28 Thread Frediano Ziglio
This make sure that these function goes into the non paged section. Also this change is much shorter than marking code if can be paged as almost code can be paged. It's also coherent with other source files. Signed-off-by: Frediano Ziglio --- qxldod/QxlDod.cpp | 39 --

[Spice-devel] [PATCH qxl-wddm-dod 8/8] Make DebugPrintFuncSerial static

2016-09-28 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- qxldod/driver.cpp | 12 qxldod/driver.h | 13 +++-- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/qxldod/driver.cpp b/qxldod/driver.cpp index f660304..f0d98c0 100755 --- a/qxldod/driver.cpp +++ b/qxldod/driver.cpp @@ -63

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 2/4] Using declspec instead of #pragma to declare pageable functions

2016-09-28 Thread Frediano Ziglio
> > On Wed, Sep 28, 2016 at 02:09:26PM +0300, Sameeh Jubran wrote: > > This patch replaces the "#pragma code_seg(push)" and "#pragma > > code_seg(pop)" > > with __declspec(code_seg("PAGE")) for declaring code as pageable. This > > change enahnces maintainability as it is much clearer which functio

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 2/4] Using declspec instead of #pragma to declare pageable functions

2016-09-28 Thread Sameeh Jubran
On Wed, Sep 28, 2016 at 4:30 PM, Christophe Fergeau wrote: > On Wed, Sep 28, 2016 at 02:09:26PM +0300, Sameeh Jubran wrote: > > This patch replaces the "#pragma code_seg(push)" and "#pragma > code_seg(pop)" > > with __declspec(code_seg("PAGE")) for declaring code as pageable. This > > change enah

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 2/4] Using declspec instead of #pragma to declare pageable functions

2016-09-28 Thread Christophe Fergeau
On Wed, Sep 28, 2016 at 02:09:26PM +0300, Sameeh Jubran wrote: > This patch replaces the "#pragma code_seg(push)" and "#pragma code_seg(pop)" > with __declspec(code_seg("PAGE")) for declaring code as pageable. This > change enahnces maintainability as it is much clearer which functions are > paged

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 3/4] Code Analysis and style fix

2016-09-28 Thread Sameeh Jubran
On Wed, Sep 28, 2016 at 3:06 PM, Frediano Ziglio wrote: > > > > Based on a patch by Sandy Stutsman > > > > Signed-off-by: Sameeh Jubran > > Acked-by: Frediano Ziglio > > > --- > > qxldod/QxlDod.cpp | 9 + > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/qxldod/

Re: [Spice-devel] [PATCH qxl-wddm-dod v6] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-28 Thread Frediano Ziglio
> > Disable execution bit on mapping improving security. > > MmMapIoSpaceEx is available only in Windows 10 thus > the macros are used. > > Based on a patch by Sandy Stutsman > > Signed-off-by: Sameeh Jubran Just realized that the comment is out of date: Disable execution bit on mapping im

[Spice-devel] [PATCH qxl-wddm-dod v6] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-28 Thread Frediano Ziglio
Disable execution bit on mapping improving security. MmMapIoSpaceEx is available only in Windows 10 thus the macros are used. Based on a patch by Sandy Stutsman Signed-off-by: Sameeh Jubran --- qxldod/QxlDod.cpp | 16 ++- qxldod/compat.cpp | 62

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 3/4] Code Analysis and style fix

2016-09-28 Thread Frediano Ziglio
> > Based on a patch by Sandy Stutsman > > Signed-off-by: Sameeh Jubran Acked-by: Frediano Ziglio > --- > qxldod/QxlDod.cpp | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp > index 2bc6b77..577b4ff 100755 > --- a/qxldod

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 1/4] Use PAGED_CODE() at the beginning of each pageable method

2016-09-28 Thread Frediano Ziglio
> > The PAGED_CODE macro ensures that the calling thread is running at an > IRQL that is low enough to permit paging. A call to this macro should be > made at the beginning of every driver routine that either contains > pageable code or accesses pageable code > > Based on a patch by Sandy Stutsma

Re: [Spice-devel] [PATCH qxl-wddm-dod v6 4/4] Fix source buffer mapping in PresentDisplayOnly

2016-09-28 Thread Frediano Ziglio
> > Part of source image mapped by PresentDisplayOnly > should be big enough to cover all rectangles being > transferred. > > Signed-off-by: Sameeh Jubran > Signed-off-by: Dmitry Fleytman > --- > qxldod/QxlDod.cpp | 28 +++- > qxldod/QxlDod.h | 2 ++ > 2 files change

[Spice-devel] [PATCH qxl-wddm-dod v6 3/4] Code Analysis and style fix

2016-09-28 Thread Sameeh Jubran
Based on a patch by Sandy Stutsman Signed-off-by: Sameeh Jubran --- qxldod/QxlDod.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp index 2bc6b77..577b4ff 100755 --- a/qxldod/QxlDod.cpp +++ b/qxldod/QxlDod.cpp @@ -1493,7 +1493

[Spice-devel] [PATCH qxl-wddm-dod v6 1/4] Use PAGED_CODE() at the beginning of each pageable method

2016-09-28 Thread Sameeh Jubran
The PAGED_CODE macro ensures that the calling thread is running at an IRQL that is low enough to permit paging. A call to this macro should be made at the beginning of every driver routine that either contains pageable code or accesses pageable code Based on a patch by Sandy Stutsman Signed-off-

[Spice-devel] [PATCH qxl-wddm-dod v6 4/4] Fix source buffer mapping in PresentDisplayOnly

2016-09-28 Thread Sameeh Jubran
Part of source image mapped by PresentDisplayOnly should be big enough to cover all rectangles being transferred. Signed-off-by: Sameeh Jubran Signed-off-by: Dmitry Fleytman --- qxldod/QxlDod.cpp | 28 +++- qxldod/QxlDod.h | 2 ++ 2 files changed, 25 insertions(+), 5

[Spice-devel] [PATCH qxl-wddm-dod v6 2/4] Using declspec instead of #pragma to declare pageable functions

2016-09-28 Thread Sameeh Jubran
This patch replaces the "#pragma code_seg(push)" and "#pragma code_seg(pop)" with __declspec(code_seg("PAGE")) for declaring code as pageable. This change enahnces maintainability as it is much clearer which functions are paged. Signed-off-by: Sameeh Jubran --- qxldod/QxlDod.cpp | 140 ++

[Spice-devel] [PATCH qxl-wddm-dod v6 0/4] Win10 support patches

2016-09-28 Thread Sameeh Jubran
The patches were applied on the up-to-date master branch of https://gitlab.com/spice/qxl-wddm-dod Diffrences from v5: * The patch Code Analysis fix was splitted into three separate patches * Minor fixies in patch "Fix source buffer mapping in PresentDisplayOnly" Sameeh Jubran (4): Use PAGED_CO

Re: [Spice-devel] [PATCH qxl-wddm-dod v5.1 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-28 Thread Frediano Ziglio
> On Tue, Sep 27, 2016 at 3:24 PM, Frediano Ziglio < fzig...@redhat.com > > wrote: > > Disable execution bit on mapping improving security. > > > MmMapIoSpaceEx is available only in Windows 10 thus > > > the macros are used. > > > Based on a patch by Sandy Stutsman < sstut...@redhat.com > >

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 4/7] Fixing framebuffer usage logic

2016-09-28 Thread Frediano Ziglio
> On Mon, Sep 26, 2016 at 7:15 PM, Frediano Ziglio < fzig...@redhat.com > > wrote: > > > > > > > This patch fixes 2 issues: > > > > > > > > 1. Framebuffer should only be used in vga mode, > > > > therefore when QxlDevice is active > > > > FrameBufferIsActive flag shouldn't be checked; > > >

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 5/7] Fix source buffer mapping in PresentDisplayOnly

2016-09-28 Thread Sameeh Jubran
On Mon, Sep 26, 2016 at 6:20 PM, Frediano Ziglio wrote: > > > > Part of source image mapped by PresentDisplayOnly > > should be big enough to cover all rectangles being > > transferred. > > > > Signed-off-by: Sameeh Jubran > > Signed-off-by: Dmitry Fleytman > > --- > > qxldod/QxlDod.cpp | 28 +

Re: [Spice-devel] [PATCH qxl-wddm-dod v5.1 1/7] Use MmMapIoSpaceEx instead of MmMapIoSpace

2016-09-28 Thread Sameeh Jubran
On Tue, Sep 27, 2016 at 3:24 PM, Frediano Ziglio wrote: > Disable execution bit on mapping improving security. > > MmMapIoSpaceEx is available only in Windows 10 thus > the macros are used. > > Based on a patch by Sandy Stutsman > > Signed-off-by: Sameeh Jubran > --- > qxldod/QxlDod.cpp

Re: [Spice-devel] [PATCH qxl-wddm-dod v5 4/7] Fixing framebuffer usage logic

2016-09-28 Thread Sameeh Jubran
On Mon, Sep 26, 2016 at 7:15 PM, Frediano Ziglio wrote: > > > > This patch fixes 2 issues: > > > > 1. Framebuffer should only be used in vga mode, > > therefore when QxlDevice is active > > FrameBufferIsActive flag shouldn't be checked; > > 2. FrameBufferIsActive flag should be set