[xiph-commits] r7340 - trunk/oggdsf/src/lib/core/ogg/libOOOgg

illiminable at dactyl.lonelymoon.com illiminable
Sun Jul 25 16:04:41 PDT 2004


Author: illiminable
Date: Sun Jul 25 16:04:41 2004
New Revision: 7340

Added:
trunk/oggdsf/src/lib/core/ogg/libOOOgg/IFIFOBuffer.h
Modified:
trunk/oggdsf/src/lib/core/ogg/libOOOgg/CircularBuffer.h
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h
trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj
Log:
* Added Interface for buffer.

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/CircularBuffer.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/CircularBuffer.h	2004-07-25 22:57:34 UTC (rev 7339)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/CircularBuffer.h	2004-07-25 23:04:40 UTC (rev 7340)
@@ -1,18 +1,20 @@
#pragma once
#include "dllstuff.h"
+#include "IFIFOBuffer.h"
class LIBOOOGG_API CircularBuffer
+	:	public IFIFOBuffer
{
public:
CircularBuffer(unsigned long inBufferSize);
~CircularBuffer(void);

-	unsigned long read(unsigned char* outData, unsigned long inBytesToRead);
-	unsigned long write(const unsigned char* inData, unsigned long inBytesToWrite);
+	virtual unsigned long read(unsigned char* outData, unsigned long inBytesToRead);
+	virtual unsigned long write(const unsigned char* inData, unsigned long inBytesToWrite);

-	unsigned long numBytesAvail();
-	unsigned long spaceLeft();
+	virtual unsigned long numBytesAvail();
+	virtual unsigned long spaceLeft();

-	void reset();
+	virtual void reset();
protected:
unsigned long mBufferSize;
unsigned long mReadPtr;

Added: trunk/oggdsf/src/lib/core/ogg/libOOOgg/IFIFOBuffer.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/IFIFOBuffer.h	2004-07-25 22:57:34 UTC (rev 7339)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/IFIFOBuffer.h	2004-07-25 23:04:40 UTC (rev 7340)
@@ -0,0 +1,10 @@
+class LIBOOOGG_API IFIFOBuffer {
+public:
+	virtual unsigned long read(unsigned char* outData, unsigned long inBytesToRead) = 0;
+	virtual unsigned long write(const unsigned char* inData, unsigned long inBytesToWrite) = 0;
+
+	virtual  unsigned long numBytesAvail() = 0;
+	virtual unsigned long spaceLeft() = 0;
+
+	virtual void reset() = 0;
+};
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h	2004-07-25 22:57:34 UTC (rev 7339)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h	2004-07-25 23:04:40 UTC (rev 7340)
@@ -40,10 +40,6 @@
//
using namespace std;

-
-
-
-
class LIBOOOGG_API OggDataBuffer



Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj	2004-07-25 22:57:34 UTC (rev 7339)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj	2004-07-25 23:04:40 UTC (rev 7340)
@@ -219,6 +219,9 @@
RelativePath="FLACMath.h">
</File>
<File
+				RelativePath=".\IFIFOBuffer.h">
+			</File>
+			<File
RelativePath="INotifyArrival.h">
</File>
<File



More information about the commits mailing list