I am studying red_send_stream_data() function. I have the stable version of spice 0.8.1. A the end of this function there are some line that I don't understand totally:
red_channel_init_send_data(channel, SPICE_MSG_DISPLAY_STREAM_DATA, NULL); SpiceMsgDisplayStreamData stream_data; stream_data.id = stream - worker->streams_buf; stream_data.multi_media_time = drawable->red_drawable->mm_time; stream_data.data_size = n; spice_marshall_msg_display_stream_data(base_marshaller, &stream_data); spice_marshaller_add_ref(base_marshaller, display_channel->send_data.stream_outbuf, n); I would like to know what does these lines do. I have encoded a frame with mjpeg, but how this frame is transmitted to the client? Thanks. Regards. 2011/7/6 Christophe Fergeau <cferg...@redhat.com> > On Tue, Jul 05, 2011 at 12:30:29PM +0200, Andrea Celestino wrote: > > I have read the document "spice_for_newbies.pdf", that describes how > spice > > works. > > When I play a video on the guest, the video is decoded then the user > > application requests the OS graphic engine (X in linux), to perform a > > rendering operation. X passes the command to the QXL driver which > translates > > the OS commands to QXL commands and push them into a command ring. > libspice > > pulls this command and adds them to the graphic command tree. The command > > tree is used to detect video stream, so starts mjpegencoder, encode each > > frame indipendently and send it to the client as image(because each frame > is > > a jpeg image) with a spice protocol message. > > Is it correct? > > I'm not 100% sure about the part where you talk about the QXL command > ring/command tree since I don't know this part well, but the rest of your > description is correct. The video detection is done by detecting areas of > the screen that are modified often. This detection (among lots of other > things) is done in server/red_worker.c > > Christophe >
_______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel