[xiph-commits] r7733 - trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Sep 10 06:23:10 PDT 2004


Author: illiminable
Date: 2004-09-10 06:23:10 -0700 (Fri, 10 Sep 2004)
New Revision: 7733

Modified:
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h
Log:
* New pin implementations done.

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp	2004-09-10 12:59:28 UTC (rev 7732)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp	2004-09-10 13:23:10 UTC (rev 7733)
@@ -661,11 +661,11 @@
 	outMediaSample->SetSyncPoint(inIsSync);
 	return true;
 }
-BOOL TheoraDecodeFilter::ShouldSkipFrame(IMediaSample* inSample) {
-	//m_bSkipping = FALSE;
-	debugLog<<"Don't skip"<<endl;
-	return FALSE;
-}
+//BOOL TheoraDecodeFilter::ShouldSkipFrame(IMediaSample* inSample) {
+//	//m_bSkipping = FALSE;
+//	debugLog<<"Don't skip"<<endl;
+//	return FALSE;
+//}
 
 sTheoraFormatBlock* TheoraDecodeFilter::getTheoraFormatBlock() 
 {
@@ -680,31 +680,21 @@
 
 CBasePin* TheoraDecodeFilter::GetPin(int inPinNo)
 {
-    HRESULT hr = S_OK;
+    HRESULT locHR = S_OK;
 
     // Create an input pin if necessary
 
     if (m_pInput == NULL) {
 
-        m_pInput = new TheoraDecodeInputPin(NAME("Theora Input Pin"),
-                                          this,              // Owner filter
-                                          &hr,               // Result code
-                                          L"Theora In");      // Pin name
+        m_pInput = new TheoraDecodeInputPin(this, &locHR);
 
-
-        //  Can't fail
-        ASSERT(SUCCEEDED(hr));
+        
         if (m_pInput == NULL) {
             return NULL;
         }
-        m_pOutput = new TheoraDecodeOutputPin(NAME("Theora Output Pin"),
-                                            this,            // Owner filter
-                                            &hr,             // Result code
-                                            L"YV12 Out");   // Pin name
+        m_pOutput = new TheoraDecodeOutputPin(this, &locHR);
+			
 
-
-        // Can't fail
-        ASSERT(SUCCEEDED(hr));
         if (m_pOutput == NULL) {
             delete m_pInput;
             m_pInput = NULL;
@@ -713,9 +703,9 @@
 
     // Return the pin
 
-    if (n == 0) {
+    if (inPinNo == 0) {
         return m_pInput;
-    } else if (n == 1) {
+    } else if (inPinNo == 1) {
         return m_pOutput;
     } else {
         return NULL;

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h	2004-09-10 12:59:28 UTC (rev 7732)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h	2004-09-10 13:23:10 UTC (rev 7733)
@@ -32,6 +32,8 @@
 #pragma once
 
 #include "Theoradecoderdllstuff.h"
+#include "theoradecodeoutputpin.h"
+#include "theoradecodeinputpin.h"
 #include <math.h>
 #include "DSStringer.h"
 #include "TheoraDecoder.h"
@@ -58,7 +60,8 @@
 
 	//Overrides
 	virtual HRESULT TheoraDecodeFilter::SetMediaType(PIN_DIRECTION inDirection, const CMediaType* inMediaType);
-	virtual BOOL ShouldSkipFrame(IMediaSample* inSample);
+	//virtual BOOL ShouldSkipFrame(IMediaSample* inSample);
+	virtual CBasePin* TheoraDecodeFilter::GetPin(int inPinNo);
 	//Helpers
 	sTheoraFormatBlock* getTheoraFormatBlock();
 	void setTheoraFormat(sTheoraFormatBlock* inFormatBlock);

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-09-10 12:59:28 UTC (rev 7732)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-09-10 13:23:10 UTC (rev 7733)
@@ -33,6 +33,16 @@
 #include "theoradecodeinputpin.h"
 
 
+TheoraDecodeInputPin::TheoraDecodeInputPin(CTransformFilter* inParentFilter, HRESULT* outHR) 
+	:	CTransformInputPin(NAME("Theora Input Pin"), inParentFilter, outHR, L"Theora In")
+{
+
+}
+TheoraDecodeInputPin::~TheoraDecodeInputPin() {
+
+}
+
+
 //----------------------
 //OLD IMPLEMENTATION
 //----------------------

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h	2004-09-10 12:59:28 UTC (rev 7732)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h	2004-09-10 13:23:10 UTC (rev 7733)
@@ -30,8 +30,17 @@
 //===========================================================================
 
 #pragma once
+#include "Theoradecoderdllstuff.h"
+class TheoraDecodeInputPin 
+	:	public CTransformInputPin
+{
+public:
 
+	TheoraDecodeInputPin(CTransformFilter* inParentFilter, HRESULT* outHR);
+	virtual ~TheoraDecodeInputPin();
 
+
+};
 //----------------------
 //OLD IMPLEMENTATION
 //----------------------

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp	2004-09-10 12:59:28 UTC (rev 7732)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp	2004-09-10 13:23:10 UTC (rev 7733)
@@ -34,8 +34,16 @@
 
 
 
+TheoraDecodeOutputPin::TheoraDecodeOutputPin(CTransformFilter* inParentFilter, HRESULT* outHR) 
+	:	CTransformOutputPin(NAME("Theora Output Pin"), inParentFilter, outHR, L"YV12 Out")
+{
 
+}
+TheoraDecodeOutputPin::~TheoraDecodeOutputPin() {
 
+}
+
+
 //----------------------
 //OLD IMPLEMENTATION
 //----------------------

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h	2004-09-10 12:59:28 UTC (rev 7732)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h	2004-09-10 13:23:10 UTC (rev 7733)
@@ -30,7 +30,17 @@
 //===========================================================================
 
 #pragma once
+#include "Theoradecoderdllstuff.h"
 
+class TheoraDecodeOutputPin 
+	:	public CTransformOutputPin
+{
+public:
+	TheoraDecodeOutputPin(CTransformFilter* inParentFilter, HRESULT* outHR);
+	virtual ~TheoraDecodeOutputPin();
+
+
+};
 //----------------------
 //OLD IMPLEMENTATION
 //----------------------



More information about the commits mailing list