gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/server/asobj NetStreamFfmpeg.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash/server/asobj NetStreamFfmpeg.h
Date: Wed, 30 May 2007 14:44:17 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/30 14:44:17

Modified files:
        server/asobj   : NetStreamFfmpeg.h 

Log message:
        Add info about elements ownership for multithread-queue

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.40&r2=1.41

Patches:
Index: NetStreamFfmpeg.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- NetStreamFfmpeg.h   30 May 2007 14:37:45 -0000      1.40
+++ NetStreamFfmpeg.h   30 May 2007 14:44:17 -0000      1.41
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: NetStreamFfmpeg.h,v 1.40 2007/05/30 14:37:45 tgc Exp $ */
+/* $Id: NetStreamFfmpeg.h,v 1.41 2007/05/30 14:44:17 strk Exp $ */
 
 #ifndef __NETSTREAMFFMPEG_H__
 #define __NETSTREAMFFMPEG_H__
@@ -73,8 +73,11 @@
        double m_pts;   // presentation timestamp in sec
 };
 
+/// Threadsafe elements-owning queue
+//
 /// This class is a threadsafe queue, using std:queue and locking.
 /// It is used to store decoded audio and video data which are waiting to be 
"played"
+/// Elements of the queue are owned by instances of this class.
 ///
 template<class T>
 class multithread_queue
@@ -85,6 +88,7 @@
                {
                }
 
+       // Destroy all elements of the queue. Locks.
        ~multithread_queue()
                {
                        boost::mutex::scoped_lock lock(_mutex);
@@ -131,8 +135,10 @@
                        return rc;
                }
 
-               /// Returns a pointer to the first element on the queue
+               /// Returns a pointer to the first element on the queue. Locks.
                //
+               /// If no elements are available this function returns NULL.
+               ///
                /// @return a pointer to the first element on the queue, NULL 
if queue is empty.
                ///
                T front()
@@ -146,7 +152,11 @@
                        return member;
                }
 
-               /// Pops the first element from the queue.
+               /// Pops the first element from the queue. Locks.
+               //
+               /// If no elements are available this function is
+               /// a noop. 
+               ///
                void pop()
                {
                        boost::mutex::scoped_lock lock(_mutex);




reply via email to

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