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: Tomas Groth
Subject: [Gnash-commit] gnash/server/asobj NetStreamFfmpeg.h
Date: Wed, 30 May 2007 14:37:46 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Tomas Groth <tgc>       07/05/30 14:37:46

Modified files:
        server/asobj   : NetStreamFfmpeg.h 

Log message:
        docs.

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

Patches:
Index: NetStreamFfmpeg.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- NetStreamFfmpeg.h   30 May 2007 12:48:21 -0000      1.39
+++ NetStreamFfmpeg.h   30 May 2007 14:37:45 -0000      1.40
@@ -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.39 2007/05/30 12:48:21 strk Exp $ */
+/* $Id: NetStreamFfmpeg.h,v 1.40 2007/05/30 14:37:45 tgc Exp $ */
 
 #ifndef __NETSTREAMFFMPEG_H__
 #define __NETSTREAMFFMPEG_H__
@@ -73,6 +73,9 @@
        double m_pts;   // presentation timestamp in sec
 };
 
+/// 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"
+///
 template<class T>
 class multithread_queue
 {
@@ -93,6 +96,10 @@
                        }
                }
 
+               /// Returns the size if the queue. Locks.
+               //
+               /// @return the size of the queue
+               ///
                size_t size()
                {
                        boost::mutex::scoped_lock lock(_mutex);
@@ -100,6 +107,14 @@
                        return n;
                }
 
+               /// Pushes an element to the queue. Locks.
+               //
+               /// @param member
+               /// The element to be pushed unto the queue.
+               ///
+               /// @return true if queue isn't full and the element was pushed 
to the queue,
+               /// or false if the queue was full, and the element wasn't push 
unto it.
+               ///
                bool push(T member)
                {
                        bool rc = false;
@@ -116,6 +131,10 @@
                        return rc;
                }
 
+               /// Returns a pointer to the first element on the queue
+               //
+               /// @return a pointer to the first element on the queue, NULL 
if queue is empty.
+               ///
                T front()
                {
                        boost::mutex::scoped_lock lock(_mutex);
@@ -127,6 +146,7 @@
                        return member;
                }
 
+               /// Pops the first element from the queue.
                void pop()
                {
                        boost::mutex::scoped_lock lock(_mutex);
@@ -138,7 +158,10 @@
 
        private:
 
+               // Mutex used for locking
                boost::mutex _mutex;
+
+               // The actual queue.
                std::queue < T > m_queue;
 };
 




reply via email to

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