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> &quot;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.&quot;</div><div>What do you mean with &quot;opaque copy iirc&quot;? </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">&lt;<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>&gt;</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>
&gt; I would like to improve the streaming video performance in Spice, do you<br>
&gt; think that is possible to improve it? In what way?<br>
&gt; 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&#39;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-&gt;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&#39;s definitely on the todo list, but no date set.<br>
 * replace mjpeg with a different encoder<br>
  * if it&#39;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>
&gt;<br>
&gt; 2011/4/11 Alon Levy &lt;<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>&gt;<br>
&gt;<br>
&gt; &gt; On Mon, Apr 11, 2011 at 03:48:08PM +0200, Andrea Celestino wrote:<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt; I have installed Spice and now I&#39;m trying to use it. I&#39;m interested in<br>
&gt; &gt; how<br>
&gt; &gt; &gt; spice manage streaming video. I read that there is the option<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; -streaming-video=[all|off|filter]<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Can you explain me the difference between these three option?<br>
&gt; &gt; &gt; Which source file read the command line?<br>
&gt; &gt; &gt; Why I have tried to play a video in a player but i have not notice any<br>
&gt; &gt; &gt; difference between the two options &#39;off&#39; and &#39;filter&#39;?<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; 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>
&gt; &gt;<br>
&gt; &gt; search for STREAM_VIDEO_FILTER<br>
&gt; &gt;<br>
&gt; &gt; The switch toggles modes for creating streams:<br>
&gt; &gt;  off - never create<br>
&gt; &gt;  all/filter - create either based on smallest size, or just based on<br>
&gt; &gt;  number of consecutive opaque copies to same area.<br>
&gt; &gt;<br>
&gt; &gt; &gt; Thanks very much for the help.<br>
&gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Spice-devel mailing list<br>
&gt; &gt; &gt; <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
&gt; &gt; &gt; <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; Spice-devel mailing list<br>
&gt; <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
&gt; <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>