[xiph-commits] r11236 - branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder

illiminable at svn.xiph.org illiminable at svn.xiph.org
Sat Apr 22 08:32:38 PDT 2006


Author: illiminable
Date: 2006-04-22 08:32:28 -0700 (Sat, 22 Apr 2006)
New Revision: 11236

Modified:
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h
Log:
* Tidy up vorbis decoder - remove dead code

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp	2006-04-22 15:20:24 UTC (rev 11235)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.cpp	2006-04-22 15:32:28 UTC (rev 11236)
@@ -1,5 +1,5 @@
 //===========================================================================
-//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//Copyright (C) 2003-2006 Zentaro Kavanagh
 //
 //Redistribution and use in source and binary forms, with or without
 //modification, are permitted provided that the following conditions
@@ -112,7 +112,7 @@
 VorbisDecodeFilter::~VorbisDecodeFilter(void)
 {
 	DbgLog((LOG_TRACE,1,TEXT("Vorbis Destructor...")));
-	//DestroyPins();
+	
 	delete mVorbisFormatInfo;
 }
 

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h	2006-04-22 15:20:24 UTC (rev 11235)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeFilter.h	2006-04-22 15:32:28 UTC (rev 11236)
@@ -1,5 +1,5 @@
 //===========================================================================
-//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//Copyright (C) 2003-2006 Zentaro Kavanagh
 //
 //Redistribution and use in source and binary forms, with or without
 //modification, are permitted provided that the following conditions
@@ -54,7 +54,7 @@
 	VorbisDecodeFilter(void);
 	virtual ~VorbisDecodeFilter(void);
 
-	//COM Creator Function
+	///COM CreateInstance Function
 	static CUnknown* WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
 
 	//FIX::: Do we need these ? Aren't they all friends ??
@@ -62,7 +62,7 @@
 	virtual void setVorbisFormat(BYTE* inFormatBlock);
 
 #ifdef WINCE
-	virtual LPAMOVIESETUP_FILTER GetSetupData(); //		{	return (LPAMOVIESETUP_FILTER)&VorbisDecodeFilterReg;	}
+	virtual LPAMOVIESETUP_FILTER GetSetupData();
 	virtual HRESULT Register();
 #endif
 protected:

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2006-04-22 15:20:24 UTC (rev 11235)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2006-04-22 15:32:28 UTC (rev 11236)
@@ -1,5 +1,5 @@
 //===========================================================================
-//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//Copyright (C) 2003-2006 Zentaro Kavanagh
 //
 //Redistribution and use in source and binary forms, with or without
 //modification, are permitted provided that the following conditions
@@ -47,7 +47,6 @@
 												,	L"Vorbis In", inAcceptableMediaTypes
 											)
 	,	mBegun(false)
-	//,	mFishSound(NULL)
 
 	,	mNumChannels(0)
 	,	mFrameSize(0)
@@ -96,22 +95,10 @@
 {
 	return true;
 	//Vorbis decoder should be good to go
-
-
-	//mFishSound = fish_sound_new (FISH_SOUND_DECODE, &mFishInfo);			//Deleted by destroycodec from destructor.
-
-	//int i = 1;
-	////FIX::: Use new API for interleave setting
-	//fish_sound_command(mFishSound, FISH_SOUND_SET_INTERLEAVE, &i, sizeof(int));
-
-	//fish_sound_set_decoded_callback (mFishSound, VorbisDecodeInputPin::VorbisDecoded, this);
-	////FIX::: Proper return value
-	//return true;
 }
 void VorbisDecodeInputPin::DestroyCodec() 
 {
-	//fish_sound_delete(mFishSound);
-	//mFishSound = NULL;
+
 }
 
 
@@ -137,63 +124,8 @@
 	return locHR;
 }
 
-//int __cdecl VorbisDecodeInputPin::VorbisDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer) 
-//{
-//	
-//	VorbisDecodeInputPin* locThis = reinterpret_cast<VorbisDecodeInputPin*> (inThisPointer);
-//	VorbisDecodeFilter* locFilter = reinterpret_cast<VorbisDecodeFilter*>(locThis->m_pFilter);
-//
-//	if (locThis->CheckStreaming() == S_OK) {
-//
-//		unsigned long locActualSize = inFrames * locThis->mFrameSize;
-//		unsigned long locTotalFrameCount = inFrames * locThis->mNumChannels;
-//		unsigned long locBufferRemaining = DECODED_BUFFER_SIZE - locThis->mDecodedByteCount;
-//		
-//
-//
-//		//Create a pointer into the buffer		
-//		signed short* locShortBuffer = (signed short*)&locThis->mDecodedBuffer[locThis->mDecodedByteCount];
-//		
-//		
-//		signed short tempInt = 0;
-//		float tempFloat = 0;
-//		
-//		//FIX:::Move the clipping to the abstract function
-//
-//		if (locBufferRemaining >= locActualSize) {
-//			//Do float to int conversion with clipping
-//			const float SINT_MAX_AS_FLOAT = 32767.0f;
-//			for (unsigned long i = 0; i < locTotalFrameCount; i++) {
-//				//Clipping because vorbis puts out floats out of range -1 to 1
-//				if (((float*)inPCM)[i] <= -1.0f) {
-//					tempInt = SINT_MIN;	
-//				} else if (((float*)inPCM)[i] >= 1.0f) {
-//					tempInt = SINT_MAX;
-//				} else {
-//					//FIX:::Take out the unnescessary variable.
-//					tempFloat = ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
-//					//ASSERT((tempFloat <= 32767.0f) && (tempFloat >= -32786.0f));
-//					tempInt = (signed short)(tempFloat);
-//					//tempInt = (signed short) ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
-//				}
-//				
-//				*locShortBuffer = tempInt;
-//				locShortBuffer++;
-//			}
-//
-//			locThis->mDecodedByteCount += locActualSize;
-//			
-//			return 0;
-//		} else {
-//			throw 0;
-//		}
-//	} else {
-//		DbgLog((LOG_TRACE,1,TEXT("Fishsound sending stuff we aren't ready for...")));
-//		return -1;
-//	}
-//
-//}
 
+
 STDMETHODIMP VorbisDecodeInputPin::Receive(IMediaSample* inSample) 
 {
 	CAutoLock locLock(mStreamLock);
@@ -333,19 +265,6 @@
 	//For now, just silently ignore busted packets.
 	return S_OK;
 
-	////debugLog << "Decode called... Last Gran Pos : "<<mLastSeenStartGranPos<<endl;
-	//DbgLog((LOG_TRACE,1,TEXT("decodeData")));
-	//long locErr = fish_sound_decode(mFishSound, inBuf, inNumBytes);
-	////FIX::: Do something here ?
-	//if (locErr < 0) {
-	//	DbgLog((LOG_TRACE,1,TEXT("decodeData : fishsound returns < 0")));
-	//	return S_FALSE;
-	//	//debugLog <<"** Fish Sound error **"<<endl;
-	//} else {
-	//	return S_OK;
-	//	//debugLog << "Fish Sound OK >=0 "<<endl;
-	//}
-	////return locErr;
 }
 
 
@@ -408,7 +327,6 @@
 		case VSS_SEEN_NOTHING:
 			if (strncmp((char*)inCodecHeaderPacket->packetData(), "\001vorbis", 7) == 0) {
 				//TODO::: Possibly verify version
-				//if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
 				if (mVorbisDecoder.decodePacket(		inCodecHeaderPacket->packetData()
 													,	inCodecHeaderPacket->packetSize()
 													,	NULL
@@ -424,7 +342,6 @@
 			
 		case VSS_SEEN_BOS:
 			if (strncmp((char*)inCodecHeaderPacket->packetData(), "\003vorbis", 7) == 0) {
-				//if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
 				if (mVorbisDecoder.decodePacket(		inCodecHeaderPacket->packetData()
 													,	inCodecHeaderPacket->packetSize()
 													,	NULL
@@ -443,7 +360,6 @@
 			
 		case VSS_SEEN_COMMENT:
 			if (strncmp((char*)inCodecHeaderPacket->packetData(), "\005vorbis", 7) == 0) {
-				//if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
 				if (mVorbisDecoder.decodePacket(		inCodecHeaderPacket->packetData()
 													,	inCodecHeaderPacket->packetSize()
 													,	NULL
@@ -451,13 +367,12 @@
 													,	&locDummy) == VorbisDecoder::VORBIS_CODEBOOK_OK) {
 
 		
-					//fish_sound_command (mFishSound, FISH_SOUND_GET_INFO, &(mFishInfo), sizeof (FishSoundInfo)); 
 					//Is mBegun useful ?
 					mBegun = true;
 			
-					mNumChannels = mVorbisDecoder.numChannels();//mFishInfo.channels;
+					mNumChannels = mVorbisDecoder.numChannels();
 					mFrameSize = mNumChannels * SIZE_16_BITS;
-					mSampleRate = mVorbisDecoder.sampleRate(); //mFishInfo.samplerate;
+					mSampleRate = mVorbisDecoder.sampleRate(); 
 
 		
 					mSetupState = VSS_ALL_HEADERS_SEEN;
@@ -480,7 +395,7 @@
 }
 string VorbisDecodeInputPin::getCodecIdentString()
 {
-	//TODO:::
+	//TODO::: Get full ident string
 	return "vorbis";
 }
 

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h	2006-04-22 15:20:24 UTC (rev 11235)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.h	2006-04-22 15:32:28 UTC (rev 11236)
@@ -1,5 +1,5 @@
 //===========================================================================
-//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//Copyright (C) 2003-2006 Zentaro Kavanagh
 //
 //Redistribution and use in source and binary forms, with or without
 //modification, are permitted provided that the following conditions
@@ -51,10 +51,6 @@
 #include "VorbisDecoder.h"
 #endif
 
-//extern "C" {
-//#include <fishsound/fishsound.h>
-//#include "fish_cdecl.h"
-//}
 
 class VorbisDecodeOutputPin;
 
@@ -66,9 +62,9 @@
 
 	DECLARE_IUNKNOWN
 	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+
 	VorbisDecodeInputPin(AbstractTransformFilter* inFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes);
 	virtual ~VorbisDecodeInputPin(void);
-	//static int __cdecl VorbisDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer);
 
 	virtual HRESULT SetMediaType(const CMediaType* inMediaType);
 	virtual HRESULT CheckMediaType(const CMediaType *inMediaType);
@@ -88,8 +84,6 @@
 	virtual string getCodecShortName();
 	virtual string getCodecIdentString();
 
-
-
 protected:
 	fstream debugLog;
 
@@ -127,8 +121,6 @@
 	bool mBegun;
 	unsigned int mUptoFrame;
 	HRESULT mHR;
-	//FishSound* mFishSound;
-	//FishSoundInfo mFishInfo; 
 
 	int mNumChannels;
 	int mFrameSize;
@@ -137,9 +129,6 @@
 
 	VorbisDecoder mVorbisDecoder;
 
-
-	
-
 	unsigned char* mDecodedBuffer;
 	unsigned long mDecodedByteCount;
 

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp	2006-04-22 15:20:24 UTC (rev 11235)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.cpp	2006-04-22 15:32:28 UTC (rev 11236)
@@ -1,5 +1,5 @@
 //===========================================================================
-//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//Copyright (C) 2003-2006 Zentaro Kavanagh
 //
 //Redistribution and use in source and binary forms, with or without
 //modification, are permitted provided that the following conditions

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h	2006-04-22 15:20:24 UTC (rev 11235)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeOutputPin.h	2006-04-22 15:32:28 UTC (rev 11236)
@@ -1,5 +1,5 @@
 //===========================================================================
-//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//Copyright (C) 2003-2006 Zentaro Kavanagh
 //
 //Redistribution and use in source and binary forms, with or without
 //modification, are permitted provided that the following conditions



More information about the commits mailing list