[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/NetConnection.cpp ...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/NetConnection.cpp ... |
Date: |
Wed, 30 May 2007 11:58:21 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/30 11:58:21
Modified files:
. : ChangeLog
server/asobj : NetConnection.cpp NetConnection.h
Log message:
* server/asobj/NetConnection.h: add documentation about which
calls
are blocking and which not.
* server/asobj/NetConnection.cpp (openConnection): return false
if
already connected
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3406&r2=1.3407
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.h?cvsroot=gnash&r1=1.31&r2=1.32
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3406
retrieving revision 1.3407
diff -u -b -r1.3406 -r1.3407
--- ChangeLog 30 May 2007 11:32:13 -0000 1.3406
+++ ChangeLog 30 May 2007 11:58:20 -0000 1.3407
@@ -1,3 +1,10 @@
+2007-05-30 Sandro Santilli <address@hidden>
+
+ * server/asobj/NetConnection.h: add documentation about which calls
+ are blocking and which not.
+ * server/asobj/NetConnection.cpp (openConnection): return false if
+ already connected
+
2007-05-29 Martin Guy <address@hidden>
* server/asobj/NetStreamFfmpeg.cpp: Two casts to quiet compiler warnings
Index: server/asobj/NetConnection.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- server/asobj/NetConnection.cpp 26 May 2007 13:57:09 -0000 1.45
+++ server/asobj/NetConnection.cpp 30 May 2007 11:58:21 -0000 1.46
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: NetConnection.cpp,v 1.45 2007/05/26 13:57:09 tgc Exp $ */
+/* $Id: NetConnection.cpp,v 1.46 2007/05/30 11:58:21 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -70,7 +70,7 @@
if (_loader.get())
{
log_error("NetConnection::openConnection() called when already
connected to a stream. Should we close the old stream and open a new one?.");
- return true;
+ return false;
}
if (_url.size() > 0) {
Index: server/asobj/NetConnection.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetConnection.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- server/asobj/NetConnection.h 28 May 2007 15:41:08 -0000 1.31
+++ server/asobj/NetConnection.h 30 May 2007 11:58:21 -0000 1.32
@@ -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: NetConnection.h,v 1.31 2007/05/28 15:41:08 ann Exp $ */
+/* $Id: NetConnection.h,v 1.32 2007/05/30 11:58:21 strk Exp $ */
#ifndef __NETCONNECTION_H__
#define __NETCONNECTION_H__
@@ -60,6 +60,11 @@
/// Open a connection to stream FLV files.
//
+ /// If already connected an error is raised and false
+ /// is returned. Otherwise, a connection is attempted
+ /// using a separate thread that starts loading data
+ /// caching it.
+ ///
/// @param url
/// An url portion to append to the base url (???)
///
@@ -73,30 +78,62 @@
bool openConnection(const std::string& url);
/// Put read pointer at given position
+ //
+ /// If the position has not been loaded yet
+ /// this call blocks. If not connected false
+ /// is returned w/out blocking.
+ ///
bool seek(size_t pos);
/// Read 'bytes' bytes into the given buffer.
//
+ /// If not enough bytes have been loaded yet
+ /// this call blocks. If not connected false
+ /// is returned w/out blocking.
+ ///
/// Return number of actually read bytes
///
size_t read(void *dst, size_t bytes);
/// Return true if EOF has been reached
+ //
+ /// This call never blocks.
+ /// If not connected, true is returned (is this correct behaviour?)
+ ///
bool eof();
/// Report global position within the file
+ //
+ /// This call never blocks.
+ /// If not connected, 0 is returned (is this correct behaviour?)
+ ///
size_t tell();
/// Returns the number of bytes cached
+ //
+ /// This call never blocks.
+ /// If not connected, 0 is returned (is this correct behaviour?)
+ ///
long getBytesLoaded();
/// Returns the total size of the file
+ //
+ /// This call never blocks.
+ /// If not connected, 0 is returned (is this correct behaviour?)
+ ///
long getBytesTotal();
/// Connects FLV parser with the LoadThread
+ //
+ /// This call never blocks.
+ /// If not connected, false is returned.
+ ///
bool connectParser(FLVParser& parser);
/// Returns whether the load is complete
+ //
+ /// This call never blocks.
+ ///
bool loadCompleted();
/// Register the "NetConnection" constructor to the given global object