summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2013-02-26 11:39:24 -0500
committerYonit Halperin <yhalperi@redhat.com>2013-04-22 16:30:55 -0400
commit1013b7a5e4dc0805a4fa2b254b87cd56aa3bd157 (patch)
tree34bfd3d8b90016c661bed79c4dea30eabfbfcc21
parent473d41b9f22e9ea730091e276f829c00de19a8d9 (diff)
downloadspice-1013b7a5e4dc0805a4fa2b254b87cd56aa3bd157.tar.gz
spice-1013b7a5e4dc0805a4fa2b254b87cd56aa3bd157.tar.xz
spice-1013b7a5e4dc0805a4fa2b254b87cd56aa3bd157.zip
red_worker: assign mm_time to vga frames
-rw-r--r--server/red_worker.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index fdf25e2e..4c9a7b01 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8570,6 +8570,7 @@ static inline int red_marshall_stream_data(RedChannelClient *rcc,
Stream *stream = drawable->stream;
SpiceImage *image;
RedWorker *worker = dcc->common.worker;
+ uint32_t frame_mm_time;
int n;
int width, height;
int ret;
@@ -8615,12 +8616,16 @@ static inline int red_marshall_stream_data(RedChannelClient *rcc,
}
}
+ /* workaround for vga streams */
+ frame_mm_time = drawable->red_drawable->mm_time ?
+ drawable->red_drawable->mm_time :
+ reds_get_mm_time();
outbuf_size = dcc->send_data.stream_outbuf_size;
ret = mjpeg_encoder_start_frame(agent->mjpeg_encoder, image->u.bitmap.format,
width, height,
&dcc->send_data.stream_outbuf,
&outbuf_size,
- drawable->red_drawable->mm_time);
+ frame_mm_time);
switch (ret) {
case MJPEG_ENCODER_FRAME_DROP:
spice_assert(dcc->use_mjpeg_encoder_rate_control);
@@ -8650,7 +8655,7 @@ static inline int red_marshall_stream_data(RedChannelClient *rcc,
red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_STREAM_DATA, NULL);
stream_data.base.id = get_stream_id(worker, stream);
- stream_data.base.multi_media_time = drawable->red_drawable->mm_time;
+ stream_data.base.multi_media_time = frame_mm_time;
stream_data.data_size = n;
spice_marshall_msg_display_stream_data(base_marshaller, &stream_data);
@@ -8660,7 +8665,7 @@ static inline int red_marshall_stream_data(RedChannelClient *rcc,
red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_STREAM_DATA_SIZED, NULL);
stream_data.base.id = get_stream_id(worker, stream);
- stream_data.base.multi_media_time = drawable->red_drawable->mm_time;
+ stream_data.base.multi_media_time = frame_mm_time;
stream_data.data_size = n;
stream_data.width = width;
stream_data.height = height;
@@ -8676,7 +8681,7 @@ static inline int red_marshall_stream_data(RedChannelClient *rcc,
#ifdef STREAM_STATS
agent->stats.num_frames_sent++;
agent->stats.size_sent += n;
- agent->stats.end = drawable->red_drawable->mm_time;
+ agent->stats.end = frame_mm_time;
#endif
return TRUE;