gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libbase/FLVParser.cpp libbase/F...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/FLVParser.cpp libbase/F...
Date: Wed, 30 May 2007 09:52:47 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/30 09:52:47

Modified files:
        .              : ChangeLog 
        libbase        : FLVParser.cpp FLVParser.h 

Log message:
                * libbase/FLVParser.{h,cpp}: document which methods lock and 
which
                  not, add locking in getBufferLength.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3403&r2=1.3404
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/FLVParser.cpp?cvsroot=gnash&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/FLVParser.h?cvsroot=gnash&r1=1.10&r2=1.11

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3403
retrieving revision 1.3404
diff -u -b -r1.3403 -r1.3404
--- ChangeLog   30 May 2007 09:06:57 -0000      1.3403
+++ ChangeLog   30 May 2007 09:52:46 -0000      1.3404
@@ -1,5 +1,7 @@
 2007-05-30 Sandro Santilli <address@hidden>
 
+       * libbase/FLVParser.{h,cpp}: document which methods lock and which
+         not, add locking in getBufferLength().
        * server/asobj/NetStream.{h,cpp}: fix documentation for bufferLength
          method (return milliseconds, not seconds); have
          NetStream.bufferLength return in fractional seconds, as expected;

Index: libbase/FLVParser.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/FLVParser.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- libbase/FLVParser.cpp       26 May 2007 16:23:21 -0000      1.16
+++ libbase/FLVParser.cpp       30 May 2007 09:52:46 -0000      1.17
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-// $Id: FLVParser.cpp,v 1.16 2007/05/26 16:23:21 bjacques Exp $
+// $Id: FLVParser.cpp,v 1.17 2007/05/30 09:52:46 strk Exp $
 
 #include "FLVParser.h"
 #include "amf.h"
@@ -50,6 +50,8 @@
 
 uint32_t FLVParser::getBufferLength()
 {
+       boost::mutex::scoped_lock lock(_mutex);
+
        if (_video) {
                size_t size = _videoFrames.size();
                if (size > 1 && size > _nextVideoFrame) {

Index: libbase/FLVParser.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/FLVParser.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- libbase/FLVParser.h 27 May 2007 14:22:03 -0000      1.10
+++ libbase/FLVParser.h 30 May 2007 09:52:47 -0000      1.11
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-// $Id: FLVParser.h,v 1.10 2007/05/27 14:22:03 bjacques Exp $
+// $Id: FLVParser.h,v 1.11 2007/05/30 09:52:47 strk Exp $
 
 // Information about the FLV format can be found at http://osflash.org/flv
 
@@ -164,51 +164,92 @@
        /// Kills the parser...
        ~FLVParser();
 
+       /// Return next media frame
+       //
+       /// Locks the _mutex
+       ///
        FLVFrame* nextMediaFrame();
 
+       /// \brief
        /// Returns the next audio frame in the timeline. If no frame has been
        /// played before the first frame is returned. If there is no more 
frames
        /// in the timeline NULL is returned.
+       //
+       /// Locks the _mutex
+       ///
        FLVFrame* nextAudioFrame();
 
+       /// \brief
        /// Returns the next video frame in the timeline. If no frame has been
        /// played before the first frame is returned. If there is no more 
frames
        /// in the timeline NULL is returned.
+       //
+       /// Locks the _mutex
+       ///
        FLVFrame* nextVideoFrame();
 
        /// Returns a FLVVideoInfo class about the videostream
+       //
+       /// Locks the _mutex
+       ///
        FLVVideoInfo* getVideoInfo();
 
        /// Returns a FLVAudioInfo class about the audiostream
+       //
+       /// Locks the _mutex
+       ///
        FLVAudioInfo* getAudioInfo();
 
        /// Sets the LoadThread which is used as interface
        void setLoadThread(LoadThread* lt);
 
+       /// \brief
        /// Asks if a frame with with a timestamp larger than
-       /// the given time is available. If such a frame is not
+       /// the given time is available.
+       //
+       /// If such a frame is not
        /// available in list of already the parsed frames, we
        /// parse some more. This is used to check how much is buffered.
+       ///
+       /// Locks the _mutex
+       ///
        bool isTimeLoaded(uint32_t time);
 
-       /// seeks to the closest possible position the given position,
+       /// \brief
+       /// Seeks to the closest possible position the given position,
        /// and returns the new position.
+       //
+       /// Locks the _mutex
+       ///
        uint32_t seek(uint32_t);
 
        /// Returns the framedelay from the last to the current
        /// audioframe in milliseconds. This is used for framerate.
+       //
+       /// Locks the _mutex
+       ///
        uint32_t audioFrameDelay();
 
+       /// \brief
        /// Returns the framedelay from the last to the current
-       /// videoframe in milliseconds. This is used for framerate.
+       /// videoframe in milliseconds. 
+       //
+       /// Locks the _mutex
+       ///
        uint32_t videoFrameDelay();
 
        /// Returns the framerate of the video
+       //
+       /// Locks the _mutex
+       ///
        uint16_t videoFrameRate();
 
        /// Returns the "bufferlength", meaning the differens between the
        /// current frames timestamp and the timestamp of the last parseable
        /// frame. Returns the difference in milliseconds.
+       //
+       /// Locks the _mutex
+       ///
        uint32_t getBufferLength();
 
 private:




reply via email to

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