[xiph-commits] r11886 - in trunk/oggdsf/src/lib: codecs/flac/filters/dsfFLACEncoder codecs/flac/libs/libFLACHelper core/ogg/libOOOgg

illiminable at svn.xiph.org illiminable at svn.xiph.org
Thu Oct 5 10:01:43 PDT 2006


Author: illiminable
Date: 2006-10-05 10:01:26 -0700 (Thu, 05 Oct 2006)
New Revision: 11886

Added:
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.cpp
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.h
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.cpp
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.h
Modified:
   trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.cpp
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.h
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACMetadataSplitter.cpp
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/libFLACHelper.vcproj
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h
Log:
* FLAC encoding helper class. Can set by level 0-8 or maually set LPCOrder, BLockSize, MidSide Stereo Coding mode, exhaustive model search and rice partition order

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.cpp	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.cpp	2006-10-05 17:01:26 UTC (rev 11886)
@@ -146,7 +146,7 @@
 		unsigned char* locBuf = new unsigned char[inNumBytes];
 		memcpy((void*)locBuf, (const void*) inBuffer, inNumBytes);
 
-		FLACHeaderTweaker::eFLACAcceptHeaderResult locResult = mHeaderTweaker.acceptHeader(new OggPacket(locBuf, inNumBytes, false, false));
+        FLACHeaderTweaker::eFLACAcceptHeaderResult locResult = mHeaderTweaker.acceptHeader(new StampedOggPacket(locBuf, inNumBytes, false, false, 0, 0, StampedOggPacket::OGG_END_ONLY));
 
 		if (locResult == FLACHeaderTweaker::LAST_HEADER_ACCEPTED) {
 			//Send all the headers

Added: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.cpp	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.cpp	2006-10-05 17:01:26 UTC (rev 11886)
@@ -0,0 +1,138 @@
+//===========================================================================
+//Copyright (C) 2004-2006 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+//  notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+//  notice, this list of conditions and the following disclaimer in the
+//  documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors 
+//  may be used to endorse or promote products derived from this software 
+//  without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+#include "StdAfx.h"
+#include "FLACEncoder.h"
+
+FLACEncoder::FLACEncoder(void)
+    :   mHandledHeaders(true)
+    ,   mUptoTime(0)
+{
+   // mFLACSampleBuffer = new FLAC__int32[
+}
+
+FLACEncoder::~FLACEncoder(void)
+{
+}
+
+bool FLACEncoder::setupCodec(FLACEncoderSettings inSettings)
+{
+    mUptoTime = 0;
+    mSettings = inSettings;
+	set_channels(inSettings.numChannels());
+	set_sample_rate(inSettings.sampleRate());
+	set_bits_per_sample(inSettings.bitsPerSample());
+    set_blocksize(inSettings.blockSize());
+    set_max_lpc_order(inSettings.LPCOrder());
+    set_min_residual_partition_order(inSettings.riceMin());
+    set_max_residual_partition_order(inSettings.riceMax());
+    set_loose_mid_side_stereo(inSettings.isUsingAdaptiveMidSideCoding());
+    set_do_mid_side_stereo(inSettings.isUsingMidSideCoding());
+    set_do_exhaustive_model_search(inSettings.isUsingExhaustiveModel());
+    
+    return (init() == FLAC__STREAM_ENCODER_OK);
+}
+const vector<StampedOggPacket*>& FLACEncoder::encode16bit(const short* const inBuffer, unsigned long inNumSamples)
+{
+	FLAC__int32* locFLACBuff = NULL;
+
+
+    unsigned long locNumSamplesPerChannel = inNumSamples / mSettings.numChannels();
+
+    locFLACBuff = new FLAC__int32[inNumSamples];
+
+    //Expand out to 32 bits
+    for (unsigned long sample = 0; sample < inNumSamples; sample++) {
+        locFLACBuff[sample] = inBuffer[sample];
+    }
+
+
+    clearStoredPackets();
+    //TODO::: Can't really fail... but do what with this?
+    bool locRetVal = process_interleaved(locFLACBuff, locNumSamplesPerChannel);
+	delete[] locFLACBuff;
+
+    return mPackets;
+}
+
+void FLACEncoder::clearStoredPackets()
+{
+    for (size_t i = 0; i < mPackets.size(); i++) {
+        delete mPackets[i];
+    }
+    mPackets.clear();
+}
+
+const vector<StampedOggPacket*>& FLACEncoder::flush()
+{
+    clearStoredPackets();
+    finish();
+    return mPackets;
+}
+
+
+
+::FLAC__StreamEncoderWriteStatus FLACEncoder::write_callback(        const FLAC__byte inBuffer[]
+                                                                ,   unsigned inNumBytes
+                                                                ,   unsigned inNumSamples
+                                                                ,   unsigned inCurrentFrame)
+{
+    unsigned char* locBuf = new unsigned char[inNumBytes];
+	memcpy((void*)locBuf, (const void*) inBuffer, inNumBytes);
+
+    LOOG_INT64 locStartTime = mUptoTime;
+    LOOG_INT64 locEndTime = locStartTime + inNumSamples;
+    mUptoTime = locEndTime;
+    
+    StampedOggPacket* locPacket = new StampedOggPacket(locBuf, inNumBytes, false, false, locStartTime, locEndTime, StampedOggPacket::OGG_BOTH);
+
+	if (!mHandledHeaders) {
+	    FLACHeaderTweaker::eFLACAcceptHeaderResult locResult = mHeaderTweaker.acceptHeader(locPacket);
+
+	    if (locResult == FLACHeaderTweaker::LAST_HEADER_ACCEPTED) {
+		    for (unsigned long i = 0; i < mHeaderTweaker.numNewHeaders(); i++) {
+                mPackets.push_back(mHeaderTweaker.getHeader(i)->cloneStamped());
+            }
+            mHandledHeaders = true;
+            return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
+		} else if (locResult == FLACHeaderTweaker::HEADER_ACCEPTED) {
+			return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
+		} else {
+			return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
+		}
+    } else {
+        mPackets.push_back(locPacket);
+        return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
+    }
+}
+void FLACEncoder::metadata_callback(const ::FLAC__StreamMetadata *metadata)
+{
+    //Ignore
+}

Added: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.h	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoder.h	2006-10-05 17:01:26 UTC (rev 11886)
@@ -0,0 +1,66 @@
+//===========================================================================
+//Copyright (C) 2004-2006 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+//  notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+//  notice, this list of conditions and the following disclaimer in the
+//  documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors 
+//  may be used to endorse or promote products derived from this software 
+//  without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+#pragma once
+
+#include "FLACEncoderSettings.h"
+#include "FLACHeaderTweaker.h"
+#include <libOOOgg/StampedOggPacket.h>
+#include "FLAC++/encoder.h"
+
+class FLACEncoder
+    :   protected FLAC::Encoder::Stream
+{
+public:
+    FLACEncoder(void);
+    ~FLACEncoder(void);
+
+    bool setupCodec(FLACEncoderSettings inSettings);
+    const vector<StampedOggPacket*>& encode16bit(const short* const inBuffer, unsigned long inNumSamples);
+    const vector<StampedOggPacket*>& flush();
+
+protected:
+	//Overrides from Flac Encoder
+	virtual ::FLAC__StreamEncoderWriteStatus write_callback(        const FLAC__byte buffer[]
+                                                                ,   unsigned bytes
+                                                                ,   unsigned samples
+                                                                ,   unsigned current_frame);
+	virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
+
+private:
+
+    void clearStoredPackets();
+    vector<StampedOggPacket*> mPackets;
+    FLACEncoderSettings mSettings;
+    FLACHeaderTweaker mHeaderTweaker;
+    LOOG_INT64 mUptoTime;
+    bool mHandledHeaders;
+    //FLAC__int32* mFLACSampleBuffer;
+};

Added: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.cpp	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.cpp	2006-10-05 17:01:26 UTC (rev 11886)
@@ -0,0 +1,158 @@
+#include "StdAfx.h"
+#include "FLACEncoderSettings.h"
+
+FLACEncoderSettings::FLACEncoderSettings(void)
+    :   mNumChannels(0)
+	,   mSampleRate(0)
+    ,   mBitsPerSample(0)
+    ,   mLPCOrder(8)
+    ,   mBlockSize(4608)
+    ,   mRiceMin(3)
+    ,   mRiceMax(3)
+    ,   mUsingMidSide(true)
+    ,   mUsingAdaptiveMidSide(false)
+    ,   mUsingExhaustiveModelSearch(false)
+{
+    makeValidBlockSizeList();
+
+}
+
+FLACEncoderSettings::~FLACEncoderSettings(void)
+{
+}
+
+bool FLACEncoderSettings::setAudioParameters(unsigned long inNumChannels, unsigned long inSampleRate, unsigned long inBitsPerSample)
+{
+    //TODO::: Validate?
+    mNumChannels = inNumChannels;
+    mSampleRate = inSampleRate;
+    mBitsPerSample = inBitsPerSample;
+    return true;
+}
+bool FLACEncoderSettings::setEncodingLevel(unsigned long inLevel)
+{
+    struct sFLACDefaultSettings {
+        unsigned long LPCOrder;
+        unsigned long blockSize;
+        unsigned long riceMin;
+        unsigned long riceMax;
+        bool useExhaustive;
+        bool useMidSide;
+        bool useAdaptiveMidside;
+    };
+
+    const sFLACDefaultSettings locDefaults[] = {
+        { 0, 1152, 2, 2, false, false, false},      //0
+        { 0, 1152, 2, 2, false, false, true},       //1
+        { 0, 1152, 0, 3, false, true, false},       //2
+        { 6, 4608, 3, 3, false, false, false},      //3
+        { 8, 4608, 3, 3, false, false, true},       //4
+        { 8, 4608, 3, 3, false, true, false},       //5
+        { 8, 4608, 0, 4, false, true, false},       //6
+        { 8, 4608, 0, 6, true, true, false},        //7
+        { 12, 4608, 0, 6, true, true, false},       //8
+    };
+    bool locISOK = true;
+    if (inLevel <= 8) {
+
+        locISOK = locISOK && setLPCOrder(locDefaults[inLevel].LPCOrder);
+        locISOK = locISOK && setBlockSize(locDefaults[inLevel].blockSize);
+        locISOK = locISOK && setRicePartitionOrder(locDefaults[inLevel].riceMin, locDefaults[inLevel].riceMax);
+        if (mNumChannels == 2) {
+            locISOK = locISOK && useAdaptiveMidSideCoding(locDefaults[inLevel].useAdaptiveMidside);
+            locISOK = locISOK && useMidSideCoding(locDefaults[inLevel].useMidSide);
+        } else {
+            useAdaptiveMidSideCoding(false);
+            useMidSideCoding(false);
+        }
+        locISOK = locISOK && useExhaustiveModelSearch(locDefaults[inLevel].useExhaustive);
+        return locISOK;
+
+    }
+    return false;
+}
+bool FLACEncoderSettings::setLPCOrder(unsigned long inLPCOrder)
+{
+    if (inLPCOrder <= 32) {
+        mLPCOrder = inLPCOrder;
+        return true;
+    }
+    return false;
+}
+bool FLACEncoderSettings::setBlockSize(unsigned long inBlockSize)
+{
+    if (isValidBlockSize(inBlockSize)) {
+        mBlockSize = inBlockSize;
+        return true;
+    }
+    return false;
+}
+bool FLACEncoderSettings::useMidSideCoding(bool inUseMidSideCoding)
+{
+    if (mNumChannels == 2) {
+        mUsingMidSide = inUseMidSideCoding;
+        return true;
+    } else {
+        mUsingMidSide = false;
+        return false;
+    }
+}
+bool FLACEncoderSettings::useAdaptiveMidSideCoding(bool inUseAdaptiveMidSideCoding)
+{
+    if (mNumChannels == 2) {
+        mUsingAdaptiveMidSide = inUseAdaptiveMidSideCoding;
+        return true;
+    } else {
+        mUsingAdaptiveMidSide = false;
+        return false;
+    }
+}
+bool FLACEncoderSettings::useExhaustiveModelSearch(bool inUseExhaustiveModelSearch)
+{
+    mUsingExhaustiveModelSearch = inUseExhaustiveModelSearch;
+    return true;
+}
+bool FLACEncoderSettings::setRicePartitionOrder(unsigned long inMin, unsigned long inMax)
+{
+    if (        (inMin <= 16)
+            &&  (inMax <= 16)
+            &&  (inMin <= inMax)) {
+        mRiceMin = inMin;
+        mRiceMax = inMax;
+        return true;
+    }
+    return false;
+}
+
+
+const vector<unsigned long>& FLACEncoderSettings::getValidBlockSizes()
+{
+    return mValidBlockSizes;
+}
+
+bool FLACEncoderSettings::isValidBlockSize(unsigned long inBlockSize)
+{
+    for (size_t i = 0; i < mValidBlockSizes.size(); i++) {
+        if (mValidBlockSizes[i] == inBlockSize) {
+            return true;
+        }
+    }
+    return false;
+}
+void FLACEncoderSettings::makeValidBlockSizeList()
+{
+    mValidBlockSizes.clear();
+    mValidBlockSizes.push_back(192);
+    mValidBlockSizes.push_back(576);
+    mValidBlockSizes.push_back(1152);
+    mValidBlockSizes.push_back(2304);
+    mValidBlockSizes.push_back(4608);
+    mValidBlockSizes.push_back(256);
+    mValidBlockSizes.push_back(512);
+    mValidBlockSizes.push_back(1024);
+    mValidBlockSizes.push_back(2048);
+    mValidBlockSizes.push_back(4096);
+    mValidBlockSizes.push_back(8192);
+    mValidBlockSizes.push_back(16384);
+    mValidBlockSizes.push_back(32768);
+}

Added: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.h	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACEncoderSettings.h	2006-10-05 17:01:26 UTC (rev 11886)
@@ -0,0 +1,52 @@
+#pragma once
+
+#include <vector>
+
+using namespace std;
+
+class FLACEncoderSettings
+{
+public:
+    FLACEncoderSettings(void);
+    ~FLACEncoderSettings(void);
+    
+    bool setAudioParameters(unsigned long inNumChannels, unsigned long inSampleRate, unsigned long inBitsPerSample);
+    bool setEncodingLevel(unsigned long inLevel);
+    bool setLPCOrder(unsigned long inLPCOrder);
+    bool setBlockSize(unsigned long inBlockSize);
+    bool useMidSideCoding(bool inUseMidSideCoding); //Only for 2 channels
+    bool useAdaptiveMidSideCoding(bool inUseAdaptiveMidSideCoding); //Only for 2 channels, overrides midside, is faster
+    bool useExhaustiveModelSearch(bool inUseExhaustiveModelSearch);
+    bool setRicePartitionOrder(unsigned long inMin, unsigned long inMax);
+
+    const vector<unsigned long>& getValidBlockSizes();
+
+    unsigned long numChannels() { return mNumChannels; }
+    unsigned long sampleRate() { return mSampleRate; }
+    unsigned long bitsPerSample() { return mBitsPerSample; }
+    unsigned long LPCOrder() { return mLPCOrder; }
+    unsigned long blockSize() { return mBlockSize; }
+    unsigned long riceMin() { return mRiceMin; }
+    unsigned long riceMax() { return mRiceMax; }
+    bool isUsingMidSideCoding() { return mUsingMidSide; }
+    bool isUsingAdaptiveMidSideCoding() { return mUsingAdaptiveMidSide; }
+    bool isUsingExhaustiveModel() { return mUsingExhaustiveModelSearch; }
+
+private:
+    bool isValidBlockSize(unsigned long inBlockSize);
+    void makeValidBlockSizeList();
+    vector<unsigned long> mValidBlockSizes;
+
+	unsigned long mNumChannels;
+	unsigned long mSampleRate;
+    unsigned long mBitsPerSample;
+
+    unsigned long mLPCOrder;
+    unsigned long mBlockSize;
+    unsigned long mRiceMin;
+    unsigned long mRiceMax;
+
+    bool mUsingMidSide;
+    bool mUsingAdaptiveMidSide;
+    bool mUsingExhaustiveModelSearch;
+};

Modified: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp	2006-10-05 17:01:26 UTC (rev 11886)
@@ -51,7 +51,7 @@
 	//debugLog.close();
 }
 
-FLACHeaderTweaker::eFLACAcceptHeaderResult FLACHeaderTweaker::acceptHeader(OggPacket* inHeader) 
+FLACHeaderTweaker::eFLACAcceptHeaderResult FLACHeaderTweaker::acceptHeader(StampedOggPacket* inHeader) 
 {
 	const unsigned char MORE_HEADERS_MASK = 128;
 	if (!mSeenAllHeaders) {
@@ -97,7 +97,7 @@
 
 	mNewHeaderList.empty();
 	mNewHeaderList.clear();
-	mNewHeaderList.push_back(new OggPacket(locFirstPacketBuffur, 51, false, false));
+    mNewHeaderList.push_back(new StampedOggPacket(locFirstPacketBuffur, 51, false, false, 0, 0, StampedOggPacket::OGG_END_ONLY));
 	locFirstPacketBuffur = NULL;
 
 	bool locFoundComment = false;
@@ -110,7 +110,7 @@
 			//It's the comment packet.
 			locFoundComment = true;
 			locCommentNo = (int)i;
-			mNewHeaderList.push_back(mOldHeaderList[i]->clone());
+			mNewHeaderList.push_back(mOldHeaderList[i]->cloneStamped());
 		}
 	}
 
@@ -125,7 +125,7 @@
 		//**** WARNING ::: Leave this unless you check it !
 		if (i != locCommentNo) {
 			//If it's not the comment packet we already added, put it in the list.
-			mNewHeaderList.push_back(mOldHeaderList[i]->clone());
+			mNewHeaderList.push_back(mOldHeaderList[i]->cloneStamped());
 		}
 	}
 
@@ -170,10 +170,10 @@
 	return (unsigned long)mNewHeaderList.size();
 }
 
-OggPacket* FLACHeaderTweaker::getHeader(unsigned long inHeaderNo) 
+StampedOggPacket* FLACHeaderTweaker::getHeader(unsigned long inHeaderNo) 
 {
 	if (inHeaderNo < mNewHeaderList.size() ) {
-		return mNewHeaderList[inHeaderNo]->clone();
+		return mNewHeaderList[inHeaderNo]->cloneStamped();
 	} else {
 		return NULL;
 	}

Modified: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.h	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.h	2006-10-05 17:01:26 UTC (rev 11886)
@@ -31,7 +31,7 @@
 
 #pragma once
 #include <libOOOgg/dllstuff.h>
-#include <libOOOgg/OggPacket.h>
+#include <libOOOgg/StampedOggPacket.h>
 #include <vector>
 #include <fstream>
 using namespace std;
@@ -48,18 +48,18 @@
 		ALL_HEADERS_ALREADY_SEEN = 101
 	};
 
-	 eFLACAcceptHeaderResult acceptHeader(OggPacket* inHeader);
+	 eFLACAcceptHeaderResult acceptHeader(StampedOggPacket* inHeader);
 
 	 unsigned long numNewHeaders();
-	 OggPacket* getHeader(unsigned long inHeaderNo);
+	 StampedOggPacket* getHeader(unsigned long inHeaderNo);
 protected:
 	 bool createNewHeaderList();
 	 void deleteOldHeaders();
 	 void deleteNewHeaders();
 
 
-	vector<OggPacket*> mOldHeaderList;
-	vector<OggPacket*> mNewHeaderList;
+	vector<StampedOggPacket*> mOldHeaderList;
+	vector<StampedOggPacket*> mNewHeaderList;
 
 
 	//fstream debugLog;

Modified: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACMetadataSplitter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACMetadataSplitter.cpp	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACMetadataSplitter.cpp	2006-10-05 17:01:26 UTC (rev 11886)
@@ -103,7 +103,7 @@
 	unsigned char* locSourceBuff = mMetadataBlock->packetData();	//Don't delete !
 	unsigned char* locNewBuff = NULL;
 	unsigned long locPacketSize = 0;
-	OggPacket* locPacket = NULL;
+	StampedOggPacket* locPacket = NULL;
 
 	while ( locUpto < locMetaSize) {
 		for (int i = 1; i < 4; i++) {
@@ -117,7 +117,7 @@
 		locNewBuff = new unsigned char[locPacketSize];
 		memcpy((void*)locNewBuff, (const void*)(locSourceBuff + locUpto), locPacketSize);
 
-		locPacket = new OggPacket(locNewBuff, locPacketSize, false, false);
+        locPacket = new StampedOggPacket(locNewBuff, locPacketSize, false, false, 0, 0, StampedOggPacket::OGG_BOTH);
 		mHeaderTweaker.acceptHeader(locPacket);
 		locPacket = NULL;
 
@@ -130,23 +130,23 @@
 }
 bool FLACMetadataSplitter::addStreamInfo() 
 {
-	OggPacket* locPacket = NULL;
+	StampedOggPacket* locPacket = NULL;
 	unsigned char* locBuff = new unsigned char[38];
 	
 	memcpy((void*)locBuff, (const void*)(mMetadataBlock->packetData()+4), 38);
-	locPacket = new OggPacket(locBuff, 38, false, false);		//No need to delete
+	locPacket = new StampedOggPacket(locBuff, 38, false, false, 0, 0, StampedOggPacket::OGG_BOTH);		//No need to delete
 	mHeaderTweaker.acceptHeader(locPacket);
 	return true;
 }
 bool FLACMetadataSplitter::addCodecIdent() 
 {
-	OggPacket* locPacket = NULL;
+	StampedOggPacket* locPacket = NULL;
 	unsigned char* locBuff = new unsigned char[4];
 	locBuff[0] = 'f';
 	locBuff[1] = 'L';
 	locBuff[2] = 'a';
 	locBuff[3] = 'C';
-	locPacket = new OggPacket(locBuff, 4, false, false);		//No need to delete.
+	locPacket = new StampedOggPacket(locBuff, 4, false, false, 0, 0, StampedOggPacket::OGG_BOTH);		//No need to delete.
 	mHeaderTweaker.acceptHeader(locPacket);
 	return true;
 }

Modified: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/libFLACHelper.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/libFLACHelper.vcproj	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/libFLACHelper.vcproj	2006-10-05 17:01:26 UTC (rev 11886)
@@ -160,12 +160,13 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-			OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
-			IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
+			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -181,18 +182,23 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="1"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="true"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB"
-				MinimalRebuild="true"
-				RuntimeLibrary="3"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB"
+				StringPooling="true"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CallingConvention="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -217,24 +223,16 @@
 				Name="VCBscMakeTool"
 			/>
 			<Tool
-				Name="VCCodeSignTool"
+				Name="VCFxCopTool"
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
 			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
 		</Configuration>
 		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
+			Name="Release|Pocket PC 2003 (ARMV4)"
+			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
@@ -254,23 +252,22 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
+				TargetEnvironment="1"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
 				Optimization="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB"
 				StringPooling="true"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
-				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
-				CallingConvention="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -295,20 +292,27 @@
 				Name="VCBscMakeTool"
 			/>
 			<Tool
-				Name="VCFxCopTool"
+				Name="VCCodeSignTool"
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
 			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
 		</Configuration>
 		<Configuration
-			Name="Release|Pocket PC 2003 (ARMV4)"
-			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
-			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			Name="Debug_CE_ARM|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -324,22 +328,20 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="1"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
+				Optimization="0"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB"
-				StringPooling="true"
-				RuntimeLibrary="2"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
-				DebugInformationFormat="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CallingConvention="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -364,28 +366,19 @@
 				Name="VCBscMakeTool"
 			/>
 			<Tool
-				Name="VCCodeSignTool"
+				Name="VCFxCopTool"
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
 			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
 		</Configuration>
 		<Configuration
-			Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-			OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
-			IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+			Name="Debug_CE_ARM|Pocket PC 2003 (ARMV4)"
+			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
-			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -406,17 +399,13 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				ExecutionBucket="7"
-				Optimization="2"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
+				Optimization="0"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB"
-				StringPooling="true"
-				RuntimeLibrary="2"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB"
+				MinimalRebuild="true"
+				RuntimeLibrary="3"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
-				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -456,7 +445,7 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug_CE_ARM|Win32"
+			Name="Debug_WM5_PPC_ARM|Win32"
 			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
@@ -522,7 +511,7 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug_CE_ARM|Pocket PC 2003 (ARMV4)"
+			Name="Debug_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
 			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
 			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
 			ConfigurationType="4"
@@ -594,9 +583,9 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug_CE_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-			OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
-			IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+			Name="Release_WM5_PPC_ARM|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
@@ -615,18 +604,20 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="1"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB"
 				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				CallingConvention="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -651,24 +642,16 @@
 				Name="VCBscMakeTool"
 			/>
 			<Tool
-				Name="VCCodeSignTool"
+				Name="VCFxCopTool"
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
 			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
 		</Configuration>
 		<Configuration
-			Name="Debug_WM5_PPC_ARM|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="Release_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
+			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
@@ -687,20 +670,18 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
+				TargetEnvironment="1"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB"
 				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-				CallingConvention="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -725,16 +706,24 @@
 				Name="VCBscMakeTool"
 			/>
 			<Tool
-				Name="VCFxCopTool"
+				Name="VCCodeSignTool"
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
 			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
 		</Configuration>
 		<Configuration
-			Name="Debug_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
-			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
-			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
@@ -804,12 +793,13 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug_WM5_PPC_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+			Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
 			OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
 			IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
+			WholeProgramOptimization="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -830,13 +820,17 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				ExecutionBucket="7"
-				Optimization="0"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB"
-				MinimalRebuild="true"
-				RuntimeLibrary="3"
+				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB"
+				StringPooling="true"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -876,9 +870,9 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release_WM5_PPC_ARM|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="Debug_CE_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
@@ -897,20 +891,18 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
+				TargetEnvironment="1"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\..\..\..\core\ogg;..\..\..\..\helper;..\libflac\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB"
 				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				UsePrecompiledHeader="2"
 				WarningLevel="4"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-				CallingConvention="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -935,16 +927,24 @@
 				Name="VCBscMakeTool"
 			/>
 			<Tool
-				Name="VCFxCopTool"
+				Name="VCCodeSignTool"
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
 			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
 		</Configuration>
 		<Configuration
-			Name="Release_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
-			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
-			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			Name="Debug_WM5_PPC_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
 			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="1"
@@ -1095,6 +1095,14 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
+				RelativePath=".\FLACEncoder.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\FLACEncoderSettings.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\FLACHeaderTweaker.cpp"
 				>
 			</File>
@@ -1126,7 +1134,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+					Name="Release|Win32"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1134,7 +1142,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Release|Win32"
+					Name="Release|Pocket PC 2003 (ARMV4)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1142,7 +1150,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Release|Pocket PC 2003 (ARMV4)"
+					Name="Debug_CE_ARM|Win32"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1150,7 +1158,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+					Name="Debug_CE_ARM|Pocket PC 2003 (ARMV4)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1158,7 +1166,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Debug_CE_ARM|Win32"
+					Name="Debug_WM5_PPC_ARM|Win32"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1166,7 +1174,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Debug_CE_ARM|Pocket PC 2003 (ARMV4)"
+					Name="Debug_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1174,7 +1182,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Debug_CE_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+					Name="Release_WM5_PPC_ARM|Win32"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1182,7 +1190,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Debug_WM5_PPC_ARM|Win32"
+					Name="Release_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1190,7 +1198,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Debug_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
+					Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1198,7 +1206,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Debug_WM5_PPC_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+					Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1206,7 +1214,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Release_WM5_PPC_ARM|Win32"
+					Name="Debug_CE_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1214,7 +1222,7 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
-					Name="Release_WM5_PPC_ARM|Pocket PC 2003 (ARMV4)"
+					Name="Debug_WM5_PPC_ARM|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
@@ -1237,6 +1245,14 @@
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
 			>
 			<File
+				RelativePath=".\FLACEncoder.h"
+				>
+			</File>
+			<File
+				RelativePath=".\FLACEncoderSettings.h"
+				>
+			</File>
+			<File
 				RelativePath=".\FLACHeaderTweaker.h"
 				>
 			</File>

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp	2006-10-05 17:01:26 UTC (rev 11886)
@@ -93,6 +93,19 @@
 
 //Returns a packet the caller is responsible for.
 OggPacket* StampedOggPacket::clone() {
+	////Make a new buffer for packet data
+	//unsigned char* locBuff = new unsigned char[mPacketSize];		//Given to constructor of stamped packet... it deletes it.
+
+	////Copy the packet data into the new buffer
+	//memcpy((void*)locBuff, (const void*)mPacketData, mPacketSize);
+
+	////Create the new packet
+	//StampedOggPacket* retPack = new StampedOggPacket(locBuff, mPacketSize, mIsTruncated, mIsContinuation, mStartTime, mEndTime, mStampType);		//Caller takes responsibiility for this.
+	//return retPack;
+    return cloneStamped();
+}
+
+StampedOggPacket* StampedOggPacket::cloneStamped() {
 	//Make a new buffer for packet data
 	unsigned char* locBuff = new unsigned char[mPacketSize];		//Given to constructor of stamped packet... it deletes it.
 

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h	2006-10-05 13:05:11 UTC (rev 11885)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h	2006-10-05 17:01:26 UTC (rev 11886)
@@ -53,6 +53,9 @@
 	/// Does a deep copy of the packet a returns you a new one you can keep.
 	virtual OggPacket* clone();
 
+	/// Does a deep copy of the packet a returns you a new one you can keep.
+	virtual StampedOggPacket* cloneStamped();
+
 	//TODO::: should not be global.
 	unsigned short mStampType;
 



More information about the commits mailing list