[xiph-commits] r8407 - trunk/oggdsf/src/lib/core/directshow/dsfOggDemux

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Wed Dec 15 01:50:46 PST 2004


Author: illiminable
Date: 2004-12-15 01:50:45 -0800 (Wed, 15 Dec 2004)
New Revision: 8407

Modified:
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
Log:
* Tidied up.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-12-15 09:45:50 UTC (rev 8406)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-12-15 09:50:45 UTC (rev 8407)
@@ -116,6 +116,7 @@
 	//TIMESTAMP FIXING !
 	locSample->SetTime(&locStart, &locStop);
 	
+	//TODO::: This style of timestamping should not be necessary anymore.
 	//Yes this is way dodgy !
 	locSample->SetMediaTime(&mParentFilter->mSeekTimeBase, &mParentFilter->mSeekTimeBase);
 	locSample->SetSyncPoint(TRUE);
@@ -125,7 +126,6 @@
 	BYTE* locBuffer = NULL;
 	locSample->GetPointer(&locBuffer);
 
-	//DbgLog((LOG_TRACE, 2, "* Packet size is %d"));
 	if (locSample->GetSize() >= inPacket->packetSize()) {
 
 		memcpy((void*)locBuffer, (const void*)inPacket->packetData(), inPacket->packetSize());
@@ -133,14 +133,10 @@
 
 		locHR = mDataQueue->Receive(locSample);
 
-		//REF_CHECK::: In theory should release here.
-		//The sample has ref_count of 1 by virtue of it's creation... we should release that 1 ref count here.
-		
 		if (locHR != S_OK) {
 			//debugLog << "Failure... Queue rejected sample..."<<endl;
 			//Stopping ??
 			return false;
-			
 		} else {
 			return true;
 		}
@@ -186,25 +182,21 @@
 	//This may cause issue if pins are disconnected and reconnected
 	//DELETE in DEStructor
 	mDataQueue = new COutputQueue (inReceivePin, &mFilterHR, FALSE, TRUE,1,TRUE, NUM_BUFFERS);
-	if (FAILED(mFilterHR)) {
-		mFilterHR = mFilterHR;
-	}
 	
 	return CBaseOutputPin::CompleteConnect(inReceivePin);
 }
 
-HRESULT OggDemuxSourcePin::BreakConnect(void) {
+HRESULT OggDemuxSourcePin::BreakConnect(void) 
+{
 	delete mDataQueue;
 	mDataQueue = NULL;
 	return CBaseOutputPin::BreakConnect();
 }
 
 	//CSourceStream virtuals
-HRESULT OggDemuxSourcePin::GetMediaType(int inPosition, CMediaType* outMediaType) {
+HRESULT OggDemuxSourcePin::GetMediaType(int inPosition, CMediaType* outMediaType) 
+{
 	//Put it in from the info we got in the constructor.
-	//NOTE::: May have missed some fields ????
-	//NOTE::: May want to check for null pointers
-	//outMediaType->SetFormat(mMediaType->Format(), mMediaType->FormatLength());
 	if (inPosition == 0) {
 		*outMediaType = *mMediaType;
 		return S_OK;
@@ -219,14 +211,13 @@
 		return E_FAIL;
 	}
 }
-HRESULT OggDemuxSourcePin::DecideBufferSize(IMemAllocator* inoutAllocator, ALLOCATOR_PROPERTIES* inoutInputRequest) {
-
+HRESULT OggDemuxSourcePin::DecideBufferSize(IMemAllocator* inoutAllocator, ALLOCATOR_PROPERTIES* inoutInputRequest) 
+{
 	HRESULT locHR = S_OK;
 
 	ALLOCATOR_PROPERTIES locReqAlloc;
 	ALLOCATOR_PROPERTIES locActualAlloc;
 
-
 	locReqAlloc.cbAlign = 1;
 	locReqAlloc.cbBuffer = BUFFER_SIZE;
 	locReqAlloc.cbPrefix = 0;



More information about the commits mailing list