gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/asobj/NetStreamFfmpeg.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetStreamFfmpeg.cpp
Date: Mon, 04 Jun 2007 14:31:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/06/04 14:31:31

Modified files:
        .              : ChangeLog 
        server/asobj   : NetStreamFfmpeg.cpp 

Log message:
                * server/asobj/NetStreamFfmpeg.cpp (av_streamer): sleep for 1
                  microsecond between iterations, to allow other threads to run.
                  Fixes the 100% CPU problem (thanks to UdoG for support).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3446&r2=1.3447
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.85&r2=1.86

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3446
retrieving revision 1.3447
diff -u -b -r1.3446 -r1.3447
--- ChangeLog   4 Jun 2007 12:02:15 -0000       1.3446
+++ ChangeLog   4 Jun 2007 14:31:30 -0000       1.3447
@@ -1,5 +1,11 @@
 2007-06-04 Sandro Santilli <address@hidden>
 
+       * server/asobj/NetStreamFfmpeg.cpp (av_streamer): sleep for 1
+         microsecond between iterations, to allow other threads to run.
+         Fixes the 100% CPU problem (thanks to UdoG for support).
+
+2007-06-04 Sandro Santilli <address@hidden>
+
        * libbase/FLVParser.h: updated dox for nextAudioFrame() and
          nextVideoFrame() noting the non-blocking nature of the calls;
          add a parsingCompleted() method.

Index: server/asobj/NetStreamFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- server/asobj/NetStreamFfmpeg.cpp    4 Jun 2007 09:04:32 -0000       1.85
+++ server/asobj/NetStreamFfmpeg.cpp    4 Jun 2007 14:31:31 -0000       1.86
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: NetStreamFfmpeg.cpp,v 1.85 2007/06/04 09:04:32 strk Exp $ */
+/* $Id: NetStreamFfmpeg.cpp,v 1.86 2007/06/04 14:31:31 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -647,6 +647,7 @@
                                // If we have problems with decoding - break
                                if (!ns->decodeFLVFrame() && 
ns->m_start_onbuffer == false && ns->m_qvideo.size() == 0 && 
ns->m_qaudio.size() == 0)
                                {
+                                       // TODO: do we really want to break 
here !?
                                        break;
                                }
                        }
@@ -661,6 +662,8 @@
 
                }
 
+               usleep(1); // task switch, to avoid 100% CPU
+
        }
 
 #ifdef GNASH_DEBUG_THREADS




reply via email to

[Prev in Thread] Current Thread [Next in Thread]