[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/LoadThread.h
From: |
Tomas Groth |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/LoadThread.h |
Date: |
Fri, 09 Mar 2007 23:15:58 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Tomas Groth <tgc> 07/03/09 23:15:57
Modified files:
. : ChangeLog
libbase : LoadThread.h
Log message:
* libbase/LoadThread.h: Documented the class.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2596&r2=1.2597
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/LoadThread.h?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2596
retrieving revision 1.2597
diff -u -b -r1.2596 -r1.2597
--- ChangeLog 9 Mar 2007 20:17:00 -0000 1.2596
+++ ChangeLog 9 Mar 2007 23:15:57 -0000 1.2597
@@ -1,3 +1,7 @@
+2007-03-09 Tomas Groth Christensen <address@hidden>
+
+ * libbase/LoadThread.h: Documented the class.
+
2007-03-09 Sandro Santilli <address@hidden>
* testsuite/swfdec/swfdec_gnash_tester:
Index: libbase/LoadThread.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/LoadThread.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- libbase/LoadThread.h 9 Mar 2007 14:38:29 -0000 1.1
+++ libbase/LoadThread.h 9 Mar 2007 23:15:57 -0000 1.2
@@ -16,7 +16,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-// $Id: LoadThread.h,v 1.1 2007/03/09 14:38:29 tgc Exp $
+// $Id: LoadThread.h,v 1.2 2007/03/09 23:15:57 tgc Exp $
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/bind.hpp>
@@ -24,18 +24,41 @@
#include "tu_file.h"
#include <memory>
+/// \brief
+/// The LoadThread class can be used to download from a file
+/// or stream using a thread, without having to block.
+/// When the object is created it starts a thread which downloads
+/// from the tu_file given as an argument to the constructor, and
+/// keeps downloading until the download is complete. It is possible
+/// for the object owner to query for data, position, loaded data,
+/// total data while downloading, without blocking. Though if there has
+/// not been downloaded enough data to accomendate a request (seek/read)
+/// it will block until the data is present (curl_adaptor behavoir).
+///
+/// When using the LoadThread, all access to the tu_file should be
+/// done through LoadThread, or it will likely break.
+///
+/// @todo When we read from a real movie stream (rtmp) we might
+/// want to use a cirkular-buffer.
+
class LoadThread
{
public:
+ /// Creating the object starts the threaded loading
+ /// of the stream/file passed as an argument.
LoadThread(tu_file* stream);
~LoadThread();
/// Put read pointer at given position
+ /// Will block if there is not enough data buffered,
+ /// and wait until enough data is present.
bool seek(size_t pos);
/// Read 'bytes' bytes into the given buffer.
- /// Return number of actually read bytes
+ /// Return number of actually read bytes.
+ /// Will block if there is not enough data buffered,
+ /// and wait until enough data is present.
size_t read(void *dst, size_t bytes);
/// Return true if EOF has been reached
- [Gnash-commit] gnash ChangeLog libbase/LoadThread.h,
Tomas Groth <=