Commit Graph

155 Commits

Author SHA1 Message Date
Jeremy White
b3a3a20d15 Move the queue length debug up to stream level 2.
It's a fair amount of noise, and not useful at level 1.
2016-12-15 10:45:57 -06:00
Jeremy White
f29dcf4350 Display stream creation and destruction at debug level 1.
They are low frequency, useful messages and should be seen
more readily.
2016-12-15 10:45:56 -06:00
Jeremy White
ef3807908d Show the timeupdate events at stream debug level 2, not level 1.
They are fairly noisy, and more appropriate to the
more detailed level.
2016-12-15 10:45:23 -06:00
Jeremy White
bed406adf3 Protect against an mjpeg stream image draw occuring after stream destruction. 2016-10-10 11:31:04 -05:00
Jeremy White
42134d3e56 Use empty image instead of null to avoid warnings 2016-10-10 11:30:28 -05:00
Jeremy White
dd3fb12678 If MediaSource is not available, do not report the vp8 or opus caps. 2016-10-10 11:29:57 -05:00
Jeremy White
b474c300a8 Improve stream debug messages slightly. 2016-10-10 11:29:51 -05:00
Jeremy White
57134818c3 Do not wait for the source buffer open callback to start stream creation.
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.
2016-10-10 11:29:44 -05:00
Oliver Gutierrez
fc0a664e7e Basic SPICE port implementation 2016-10-10 13:52:41 +02:00
Jeremy White
9468cf2a9b Implement support for the playback stop message.
This allows audio processing to be more robust in Firefox.
2016-10-03 09:38:52 -05:00
Jeremy White
3633675e4b Rely on the auto play attribute.
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.
2016-10-03 09:38:31 -05:00
Jeremy White
dc5fd91f0c Revise sound packet time sequencing for a more recent Firefox.
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 resulted in fuzzy and/or
distorted audio streams in Firefox in a row.

Thus, we end up with an inelegant hack.  Essentially, we force every packet to have
a 10ms time delta, unless there is an obvious gap in time stream, in which case we
will resync.

This replaces logic that mitigated only the duplicated time packets.

The long term solution would appear to be 'sequence' mode, but I cannot get
Firefox to use that mode (and MDN suggests that for codecs such as VP8 with time
stamps in line, that Firefox will not accept it).
2016-10-03 09:37:56 -05:00
Jeremy White
245a476bd9 Use modern browser information to detect underrun.
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.
2016-10-03 09:37:16 -05:00
Oliver Gutierrez
1f4959e3c2 Fixed trailing whitespaces in several files 2016-09-28 15:03:48 -05:00
Oliver Gutierrez
411cdc5dfd Fixed syntax error in debugger command.
Debugger is not an object or command. It is a reserved word and
"DEBUG > 0 &&" syntax does not work with it
2016-09-08 14:57:33 +02:00
Oliver Gutierrez
53b6063f51 Added debug filtering to avoid debugger to start when using in production 2016-09-06 18:13:03 +02:00
Pavel Grunt
579f2bfb27 spiceconn: Set channel id
Allow to work with more channels of one type

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=97575

Acked-by: Victor Toso <victortoso@redhat.com>
2016-09-06 18:12:08 +02:00
Jeremy White
36b8ad3615 Prepare for the 0.17 release 2016-08-17 14:44:46 -05:00
Oliver Gutierrez
667f16c2a4 playback: Don't try to access undefined source buffer
The playback code first tries to access this.source_buffer and then
would check whether it's defined.

This was causing unwanted exception to be thrown in the cockpit
spice-html5 plugin.
2016-08-03 12:29:51 +02:00
Jeremy White
a8c406377e Send stream process reports after we have processed them.
Previously, we sent them strictly upon receipt.  However, receiving
is fast; by adding in some of the processing time (i.e. queueing and
so on), we encourage the adaptive rate control to slow down.
2016-07-13 10:41:08 -05:00
Jeremy White
3778053138 Add support for the vp8 codec type. 2016-07-13 10:41:07 -05:00
Jeremy White
5b2e795bf6 Revise the webm files to more correctly identify audio tracks. 2016-07-13 10:41:06 -05:00
Jeremy White
275850f7e6 Track and make note of requests that take an unusual amount of time. 2016-07-13 10:41:04 -05:00
Jeremy White
5f67601534 Add tools for debugging media source playback events. 2016-07-13 10:41:03 -05:00
Jeremy White
a05764c0d6 Give the playback channel a separate debug control. 2016-07-13 10:41:02 -05:00
Martin Hradil
522a9eb991 spice-html5: spice_auto.html - actually use ?path when given
Right now, `spice_auto.html` reads the path from query string .. and
never actually does anything with it. This should make
`spice_auth.html` respect a path parametr when given.
2016-05-12 17:17:23 +02:00
Pavel Grunt
78022d150e quic: Add missing break
Spotted by coverity
2016-05-04 10:19:26 -05:00
Pavel Grunt
6b239731b4 filexfer: Remove wrongly placed semicolon
Spotted by coverity
2016-05-04 10:19:24 -05:00
Christophe Fergeau
54cc41299b Fix 2 typos in comments 2016-03-08 11:38:24 +01:00
Jeremy White
ab73d00948 Enable file transfer for spice_auto.html.
The work Pavel did on spice.html did not get fully transferred
into spice_auto.html; in particular, we need to append the xfer
div to the main area in order for file transfer to work.

This fixes that, and now drag + drop works in spice_auto.html.
2015-10-27 11:37:13 -05:00
Pavel Grunt
789071cbfa Set nonhandled messages as not implemented
Avoid spamming log
2015-09-09 09:05:05 +02:00
Pavel Grunt
bd5d261a37 Use name of channel instead of number
For unknown channel types the type number is still used, e.g.:
 "Channel type unknown-12 not implemented"
2015-09-09 09:04:59 +02:00
Pavel Grunt
289a760371 spiceconn.js: Add missing channel names 2015-09-09 09:04:53 +02:00
Pavel Grunt
4023af088b enums.js: Update for new channels 2015-09-09 09:04:48 +02:00
Pavel Grunt
302b782e77 display.js: Remove unreachable return 2015-09-09 09:04:39 +02:00
Jeremy White
b76c734d16 Add support for stream reports.
This helps video playback do a slightly better job of keeping up
in the browser.  It's not a dramatic effect, but enough to start making
video playback almost tolerable.
2015-06-04 15:41:48 -05:00
Jeremy White
84562db7e4 Implement support for sized data streams. 2015-06-04 15:41:41 -05:00
Jeremy White
e542bda56f Minor change to error message formating. 2015-06-04 15:41:36 -05:00
Jeremy White
c1e736b083 Prepare for release 0.1.6 2015-03-13 11:38:56 -05:00
Pavel Grunt
ff42bc7399 Add button for cancelling file transfer 2015-01-16 10:06:35 -06:00
Pavel Grunt
8d1ea67789 Add progress bar for file transfer 2015-01-16 10:06:34 -06:00
Pavel Grunt
84171b2406 Use WheelEvent instead of MouseWheelEvent
MouseWheelEvent is deprecated and not working in Firefox.
2015-01-15 12:56:20 -06:00
Pavel Grunt
54ee82f004 Inform agent about client's capabilities
The client should inform the agent about capabilities
when the connection is established. This avoid receiving unhandled
agent messages.
2015-01-15 12:43:43 -06:00
Pavel Grunt
566e4acc39 Read file only when have agent tokens
Stop reading a file when there are no tokens,
continue reading it when tokens arrive.
2015-01-15 09:00:03 -06:00
Pavel Grunt
50e2795771 Use drag and drop for transfering files from client to guest 2015-01-15 09:00:00 -06:00
Pavel Grunt
b9b8567c9d Implement methods for transfering files from client to guest
It is possible to transfer files from the client to the guest
using File API [0] when a spice vd agent is connected.

Methods for the transfer are based on spice-gtk implementation.

[0] http://www.w3.org/TR/file-upload/
2015-01-15 08:59:58 -06:00
Pavel Grunt
633f01050b Split agent data message into smaller chunks
Allowed size for SPICE_MSGC_MAIN_AGENT_DATA message is 2048 Bytes,
larger messages have to be splitted.
2015-01-15 08:59:55 -06:00
Pavel Grunt
1a4a98938a Send agent messages only when have agent tokens
Messages that were not sent are stored in the queue.
They will be sent later when the client receives more agent tokens.
2015-01-15 08:58:36 -06:00
Pavel Grunt
6a68399a23 Report SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS capability
We should report that we handle the connected tokens message
by setting the SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS capability.
2015-01-15 08:58:32 -06:00
Pavel Grunt
21e5c282ba Handle agent tokens 2015-01-15 08:58:30 -06:00