[xiph-commits] r8801 - trunk/oggdsf/src/lib/player/libDSPlayDotNET

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Jan 28 06:31:57 PST 2005


Author: illiminable
Date: 2005-01-28 06:31:53 -0800 (Fri, 28 Jan 2005)
New Revision: 8801

Modified:
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
Log:
* Fix the queryPosition function is dsplay

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2005-01-28 14:11:34 UTC (rev 8800)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2005-01-28 14:31:53 UTC (rev 8801)
@@ -808,7 +808,18 @@
 }
 
 Int64 DSPlay::queryPosition() {
-	return -1;
+	if (mIsLoaded && (mMediaSeeking != NULL)) {
+		__int64 locStart = -1;
+		__int64 locStop = -1;
+		HRESULT locHR = mMediaSeeking->GetPositions(&locStart, &locStop);
+		if (locHR == S_OK) {
+			return locStart;
+		} else {
+			return -1;
+		}
+	} else {
+		return -1;	
+	}
 }
 
 Int64 DSPlay::fileSize() {



More information about the commits mailing list