[xiph-commits] r7985 - in trunk/oggdsf/src: lib/core/directshow/dsfSubtitleVMR9 lib/player/libDSPlayDotNET tools/DNPlay

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Tue Oct 12 04:03:40 PDT 2004


Author: illiminable
Date: 2004-10-12 04:03:40 -0700 (Tue, 12 Oct 2004)
New Revision: 7985

Modified:
   trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
   trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
Log:
* Release some stray interfaces in the subtitle renderer which are holding ref's on the VMR9 causing it to stay alive after the graph is killed.
* Fixed a typo in DSPlay that was assigning to the wrong variable, causing the VMR9 to never be used.
* Clear out debugging code from the player.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp	2004-10-12 10:15:37 UTC (rev 7984)
+++ trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp	2004-10-12 11:03:40 UTC (rev 7985)
@@ -71,6 +71,18 @@
 SubtitleVMR9Filter::~SubtitleVMR9Filter(void)
 {
 	//debugLog.close();
+
+	if (mBitmapMixer != NULL) {
+		mBitmapMixer->Release();
+	}
+
+	if (mVideoWindow != NULL) {
+		mVideoWindow->Release();
+	}
+
+	if (mWindowLess != NULL) {
+		mWindowLess->Release();
+	}
 }
 
 STDMETHODIMP SubtitleVMR9Filter::GetState(DWORD dw, FILTER_STATE *pState)

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2004-10-12 10:15:37 UTC (rev 7984)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2004-10-12 11:03:40 UTC (rev 7985)
@@ -175,6 +175,7 @@
 	HRESULT locHR = S_OK;
 
 	char* locFileName = Wrappers::netStrToCStr(inFileName);
+	*debugLog<<"File = "<<locFileName<<endl;
 	wstring locWFileName = illiminable::libDSPlayDotNET::toWStr(locFileName);
 	
 	Wrappers::releaseCStr(locFileName);
@@ -194,13 +195,14 @@
 	
 	//If it's an annodex file, then put the VMR 9 in the graph.
 	if (isFileAnnodex(inFileName)) {
-	
+		*debugLog<<"Is annodex"<<endl;
 		IBaseFilter* locVMR9 = NULL;
 
 		HRESULT locHR2 = S_OK;
 		locHR2 = mGraphBuilder->FindFilterByName(L"Video Mixing Renderer 9", &locVMR9);
 		if (locVMR9 == NULL) {
-			locHR= CoCreateInstance(CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC, IID_IBaseFilter, (void **)&locVMR9);
+			*debugLog<<"Not in graph... making it !"<<endl;
+			locHR2= CoCreateInstance(CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC, IID_IBaseFilter, (void **)&locVMR9);
 			if (locHR2 == S_OK) {
 				locHR2 = mGraphBuilder->AddFilter(locVMR9, L"Video Mixing Renderer 9");
 				numRef =

Modified: trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
===================================================================
--- trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs	2004-10-12 10:15:37 UTC (rev 7984)
+++ trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs	2004-10-12 11:03:40 UTC (rev 7985)
@@ -127,24 +127,24 @@
 		}
 		public bool headCallback(HeadTag inHeadTag) 
 		{
-			MessageBox.Show("Head callback");
+			//MessageBox.Show("Head callback");
 			mHeadTag = inHeadTag;
 			if (mHeadTag != null) 
 			{
-				MessageBox.Show("Head tag not null");
+				//MessageBox.Show("Head tag not null");
 			}
 			else 
 			{
-				MessageBox.Show("Head tag is null");
+				//MessageBox.Show("Head tag is null");
 			}
 			lblTitle.Text = mHeadTag.title().text();
-			MessageBox.Show(mHeadTag.title().text());
+			//MessageBox.Show(mHeadTag.title().text());
 			Uri locBaseURI = null;
 			try 
 			{
 				if (mHeadTag. at base() != null) 
 				{
-					MessageBox.Show("Href = "+mHeadTag. at base().href());
+					//MessageBox.Show("Href = "+mHeadTag. at base().href());
 					locBaseURI = new Uri(mHeadTag. at base().href());
 				}
 			} 
@@ -159,7 +159,7 @@
 				mBaseURI = locBaseURI;
 			}
 		
-			MessageBox.Show("Bug not here !!");
+			//MessageBox.Show("Bug not here !!");
 			return true;
 		}
 		//
@@ -497,7 +497,7 @@
 			} 
 			else 
 			{
-				MessageBox.Show("File type is unrecognised, or media file does not exist", "Media Open Failed.", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+				//MessageBox.Show("File type is unrecognised, or media file does not exist", "Media Open Failed.", MessageBoxButtons.OK, MessageBoxIcon.Stop);
 			
 			}
 		}
@@ -603,7 +603,7 @@
 
 		private bool setBaseURIFromFullPath(String inFullPath) 
 		{
-			MessageBox.Show(inFullPath);
+			//MessageBox.Show(inFullPath);
 			Uri locURI = null;
 			Uri locBaseURI = null;
 			try 
@@ -619,8 +619,8 @@
 
 			if (locURI != null) 
 			{
-				MessageBox.Show(locURI.ToString());
-				MessageBox.Show(locURI.GetLeftPart(UriPartial.Authority));
+				//MessageBox.Show(locURI.ToString());
+				//MessageBox.Show(locURI.GetLeftPart(UriPartial.Authority));
 				String locPartial = locURI.GetLeftPart(UriPartial.Authority);
 
 				if (locPartial.Equals("")) 
@@ -635,7 +635,7 @@
 					{
 						//Strip off the filename part at the end
 						locPartial = locPartial.Substring(0, locDelimPos + 1);
-						MessageBox.Show("Parital : " + locPartial);
+						//MessageBox.Show("Parital : " + locPartial);
 					} 
 					else 
 					{
@@ -647,7 +647,7 @@
 				if (!locPartial.Equals("")) 
 				{
 					locBaseURI = new Uri(locPartial);
-					MessageBox.Show(locBaseURI.ToString());
+					//MessageBox.Show(locBaseURI.ToString());
 				}
 				
 			} 
@@ -667,10 +667,10 @@
 				Uri locURI = null;
 				try 
 				{
-					MessageBox.Show("Base is "+mBaseURI.ToString());
+					//MessageBox.Show("Base is "+mBaseURI.ToString());
 					//try and make a URI using the base and the href from the clip (relative)
 					locURI = new Uri(mBaseURI, mCurrentClip.anchor().href());	
-					MessageBox.Show("New URI is "+locURI.ToString());
+					//MessageBox.Show("New URI is "+locURI.ToString());
 				} 
 				catch(System.UriFormatException) 
 				{
@@ -693,7 +693,7 @@
 				} 
 				else
 				{
-					MessageBox.Show("Opening "+locURI.ToString());
+					//MessageBox.Show("Opening "+locURI.ToString());
 					if (locURI.IsFile) 
 					{
 						//If it's a file change it to a local path.



More information about the commits mailing list