Thanks.<div>Now I am trying to study the code I am interested in. </div><div>Unfortunately, the file red_worker.c is very huge and there are not any comments that can help me.</div><div><br></div><div>I would like to know:</div>
<div>1- which parts/functions of red_worker.c are video related stuff?</div><div>2- You said:</div><div> "determine if a given draw operation (has to be an opaque copy iirc) is</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
repeated to the same area."</div><div>What do you mean with "opaque copy iirc"? </div><div><br></div><div>3- There are a red worker thread for each QXL device instance. How many QXL device instance are there?</div>
<div>4- Which function does red_worker.c use to detect video streaming?</div><div><br></div><div>Thanks for any helps you can give me </div><div><br><div class="gmail_quote">2011/4/15 Alon Levy <span dir="ltr"><<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Thu, Apr 14, 2011 at 03:20:40PM +0200, Andrea Celestino wrote:<br>
> I would like to improve the streaming video performance in Spice, do you<br>
> think that is possible to improve it? In what way?<br>
> Are there documents that describes in detail how spice works with video?<br>
<br>
</div>The best I can offer in terms of documentation is the pdfs in the documents<br>
section of <a href="http://spice-space.org" target="_blank">spice-space.org</a>, I imagine you are looking for something more,<br>
sorry to disappoint.<br>
<br>
The code you are interested in is server/red_worker.c, but that's not very<br>
helpful since that file is huge. Would be nice to split the video related<br>
stuff to a separate file.<br>
<br>
worker->streaming_video - determines how we handle streaming video<br>
<br>
git grep stream -- server/red_worker.c<br>
<br>
I can give you better pointers if you ask more specific questions, but doing<br>
the documentation myself right now.. too much work.<br>
<br>
overview of what spice does:<br>
* determine if a given draw operation (has to be an opaque copy iirc) is<br>
repeated to the same area.<br>
* if so, starts a mjpeg encoder and sends the stream to the client<br>
<br>
how to improve this (some is on the Features page in spice-space):<br>
* learn to do various video acceleration apis (windows has it, linux has it)<br>
* this is by far the best way to go regarding performance, unless you are<br>
willing to sacrifice cpu for bandwidth in which case I guess you would reencode.<br>
* otoh this is a pretty large change to multiple parts of spice:<br>
* you need to update the driver for each platform you choose to support, update the protocol, teach server and client<br>
* it's definitely on the todo list, but no date set.<br>
* replace mjpeg with a different encoder<br>
* if it's just a better performing encoder, clear win.<br>
* otherwise you get the usual cpu/bw tradeoff.<br>
* or you could try to learn which encoder fits which stream (based on some<br>
metric, could be the performance of the encoders themselves)<br>
* just throwing an idea.<br>
<font color="#888888"><br>
Alon<br>
</font><div><div></div><div class="h5"><br>
><br>
> 2011/4/11 Alon Levy <<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>><br>
><br>
> > On Mon, Apr 11, 2011 at 03:48:08PM +0200, Andrea Celestino wrote:<br>
> > > Hi,<br>
> > > I have installed Spice and now I'm trying to use it. I'm interested in<br>
> > how<br>
> > > spice manage streaming video. I read that there is the option<br>
> > ><br>
> > > -streaming-video=[all|off|filter]<br>
> > ><br>
> > > Can you explain me the difference between these three option?<br>
> > > Which source file read the command line?<br>
> > > Why I have tried to play a video in a player but i have not notice any<br>
> > > difference between the two options 'off' and 'filter'?<br>
> > ><br>
> ><br>
> > Look at <a href="http://cgit.freedesktop.org/spice/spice/tree/server/red_worker.c" target="_blank">http://cgit.freedesktop.org/spice/spice/tree/server/red_worker.c</a><br>
> ><br>
> > search for STREAM_VIDEO_FILTER<br>
> ><br>
> > The switch toggles modes for creating streams:<br>
> > off - never create<br>
> > all/filter - create either based on smallest size, or just based on<br>
> > number of consecutive opaque copies to same area.<br>
> ><br>
> > > Thanks very much for the help.<br>
> ><br>
> > > _______________________________________________<br>
> > > Spice-devel mailing list<br>
> > > <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> > > <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> ><br>
> ><br>
<br>
> _______________________________________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
<br>
</div></div></blockquote></div><br></div>