[xiph-commits] r8083 - in trunk/oggdsf: docs src/lib/plugin/axAnxOggPlayer

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Oct 24 04:18:23 PDT 2004


Author: illiminable
Date: 2004-10-24 04:18:23 -0700 (Sun, 24 Oct 2004)
New Revision: 8083

Modified:
   trunk/oggdsf/docs/activeX.txt
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.cpp
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.h
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayer.aps
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayer.rc
   trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp
Log:
* Includes the code to get the location URL from the browser and try and play it (requires some registry entries... see activeX.txt for details)

Modified: trunk/oggdsf/docs/activeX.txt
===================================================================
--- trunk/oggdsf/docs/activeX.txt	2004-10-24 10:09:09 UTC (rev 8082)
+++ trunk/oggdsf/docs/activeX.txt	2004-10-24 11:18:23 UTC (rev 8083)
@@ -93,5 +93,28 @@
 Change all the managed code parts back to unmanaged equivalents.
 
 
+Create an unmanaged interface for media event notifications.
 
 
+Code to embed windows in the control... (This is in DSPLayer now)
+
+	//CHANGES HERE FOR EMBEDDED WINDOW
+	IVideoWindow* locVW = NULL;
+	locHR = locGraphBuilder->QueryInterface(IID_IVideoWindow, (void **)&locVW);
+
+	if (locHR == S_OK) {
+
+		locVW->put_MessageDrain((OAHWND)inWindow);
+
+
+		locVW->put_Owner((OAHWND)inWindow);
+	
+		locVW->SetWindowPosition(inLeft, inTop, inWidth, inHeight);
+		locVW->Release();
+	}
+
+	//
+
+
+Read this for registering an activeX control as the player for an extension in IE
+http://msdn.microsoft.com/workshop/components/activex/registration.asp
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp	2004-10-24 10:09:09 UTC (rev 8082)
+++ trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/ControlDialog.cpp	2004-10-24 11:18:23 UTC (rev 8083)
@@ -44,7 +44,7 @@
 {
 	//PLay button.
 	debugLog<<"Play button pushed"<<endl;
-	mPlayer.loadFile("G:\\a.ogg", this->m_hWnd, 10, 100, 384, 240);
+	mPlayer.loadFile(L"G:\\a.ogg", this->m_hWnd, 10, 100, 384, 240);
 	//mPlayer.loadFile("G:\\h.ogv");
 	mPlayer.play();
 }
@@ -53,6 +53,13 @@
 	debugLog<<"Setting browser instance to "<<(int)inBrowser<<endl;
 	mBrowser = inBrowser;
 
+	BSTR locURL = NULL;
+	mBrowser->get_LocationURL(&locURL);
+	wstring locS = locURL;
+	SysFreeString(locURL);
+	mPlayer.loadFile(locS);
+	mPlayer.play();
+
 }
 
 void CControlDialog::OnBnClickedButton2()

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.cpp	2004-10-24 10:09:09 UTC (rev 8082)
+++ trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.cpp	2004-10-24 11:18:23 UTC (rev 8083)
@@ -164,7 +164,7 @@
 	return retVal;
 }
 
-bool DSPlayer::loadFile(string inFileName, HWND inWindow, int inLeft, int inTop, int inWidth, int inHeight) {
+bool DSPlayer::loadFile(wstring inFileName, HWND inWindow, int inLeft, int inTop, int inWidth, int inHeight) {
 	//Debugging only
 	ULONG numRef = 0;
 	//
@@ -174,8 +174,8 @@
 	HRESULT locHR = S_OK;
 
 	
-	debugLog<<"File = "<<inFileName<<endl;
-	wstring locWFileName = toWStr(inFileName);
+	//debugLog<<"File = "<<inFileName<<endl;
+	wstring locWFileName = inFileName; //toWStr(inFileName);
 	
 	
 	
@@ -313,7 +313,7 @@
 
 	return true;
 }
-bool DSPlayer::loadFile(string inFileName) {
+bool DSPlayer::loadFile(wstring inFileName) {
 
 	//Debugging only
 	ULONG numRef = 0;
@@ -324,8 +324,8 @@
 	HRESULT locHR = S_OK;
 
 	
-	debugLog<<"File = "<<inFileName<<endl;
-	wstring locWFileName = toWStr(inFileName);
+	//debugLog<<"File = "<<inFileName<<endl;
+	wstring locWFileName = inFileName; //toWStr(inFileName);
 	
 	
 	
@@ -532,12 +532,12 @@
 	}
 }
 
-bool DSPlayer::isFileAnnodex(string inFilename)
+bool DSPlayer::isFileAnnodex(wstring inFilename)
 {
 	//BUG::: Case sensitive
-	string locExt = inFilename.substr(inFilename.size() - 4, 4);
+	wstring locExt = inFilename.substr(inFilename.size() - 4, 4);
 	
-	if (locExt == ".anx") {
+	if (locExt == L".anx") {
 		return true;
 	} else {
 		return false;

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.h
===================================================================
--- trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.h	2004-10-24 10:09:09 UTC (rev 8082)
+++ trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/DSPlayer.h	2004-10-24 11:18:23 UTC (rev 8083)
@@ -36,8 +36,8 @@
 	~DSPlayer(void);
 	
 
-		bool loadFile(string inFileName);
-		bool loadFile(string inFileName, HWND inWindow, int inLeft, int inTop, int inWidth, int inHeight);
+		bool loadFile(wstring inFileName);
+		bool loadFile(wstring inFileName, HWND inWindow, int inLeft, int inTop, int inWidth, int inHeight);
 		bool play();
 		bool pause();
 		bool stop();
@@ -70,7 +70,7 @@
 		HANDLE mEventHandle;
 
 		bool mIsLoaded;
-		bool isFileAnnodex(string inFilename);
+		bool isFileAnnodex(wstring inFilename);
 
 		wstring toWStr(string inString);
 

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayer.aps
===================================================================
(Binary files differ)

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayer.rc
===================================================================
--- trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayer.rc	2004-10-24 10:09:09 UTC (rev 8082)
+++ trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayer.rc	2004-10-24 11:18:23 UTC (rev 8083)
@@ -135,6 +135,7 @@
     PUSHBUTTON      "Play",IDC_BUTTON1,7,7,59,18
     PUSHBUTTON      "Pause",IDC_BUTTON2,77,7,53,19
     PUSHBUTTON      "Stop",IDC_BUTTON3,145,7,60,19
+    LTEXT           "",IDC_STATIC,217,7,188,20,WS_BORDER
 END
 
 

Modified: trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp	2004-10-24 10:09:09 UTC (rev 8082)
+++ trunk/oggdsf/src/lib/plugin/axAnxOggPlayer/axAnxOggPlayerCtrl.cpp	2004-10-24 11:18:23 UTC (rev 8083)
@@ -222,6 +222,12 @@
 	if (COleControl::OnCreate(lpCreateStruct) == -1)
 		return -1;
 
+
+	// TODO:  Add your specialized creation code here
+	mDialog.Create(IDD_DIALOG1, this);
+	mDialog.ShowWindow(TRUE);
+
+
 	IServiceProvider* locISP = NULL;
 	IWebBrowser2* locBrowser = NULL;
 
@@ -234,8 +240,5 @@
 		}
 		locISP->Release();
 	}
-	// TODO:  Add your specialized creation code here
-	mDialog.Create(IDD_DIALOG1, this);
-	mDialog.ShowWindow(TRUE);
 	return 0;
 }



More information about the commits mailing list