[xiph-commits] r8565 - in trunk/oggdsf/src/lib: core/ogg/libOOOgg player/libDSPlayDotNET

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Dec 31 06:16:37 PST 2004


Author: illiminable
Date: 2004-12-31 06:16:36 -0800 (Fri, 31 Dec 2004)
New Revision: 8565

Modified:
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/libDSPlayDotNET.vcproj
Log:
* Doesn't return -1 as a progress value anymore.

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-12-31 13:31:40 UTC (rev 8564)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-12-31 14:16:36 UTC (rev 8565)
@@ -200,7 +200,10 @@
 			throw 0;
 		} else {
 			debugLog<<"writeLowest : Writing..."<<endl;
-			mProgressTime = locLowestStream->scaledFrontTime();
+			if (locLowestStream->scaledFrontTime() != -1) {
+				mProgressTime = locLowestStream->scaledFrontTime();
+			}
+		
 			debugLog<<"writeLowest : Progress Time = "<<mProgressTime<<endl;
 
 			OggPage* locPageToWrite = locLowestStream->popFront();

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2004-12-31 13:31:40 UTC (rev 8564)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2004-12-31 14:16:36 UTC (rev 8565)
@@ -64,6 +64,7 @@
 	,	mTop(0)
 	,	mWidth(0)
 	,	mHeight(0)
+	,	mFileSize(0)
 
 {
 	CoInitialize(NULL);
@@ -87,6 +88,7 @@
 	,	mTop(inTop)
 	,	mWidth(inWidth)
 	,	mHeight(inHeight)
+	,	mFileSize(0)
 {
 	CoInitialize(NULL);
 	mCMMLProxy = new CMMLCallbackProxy;			//Need to delete this !
@@ -189,7 +191,11 @@
 	ULONG numRef = 0;
 	//
 
+	FileInfo* locFileInfo = new FileInfo(inFileName);
+	mFileSize = locFileInfo->Length;
 
+
+
 	releaseInterfaces();
 	HRESULT locHR = S_OK;
 
@@ -391,15 +397,19 @@
 }
 
 Int64 DSPlay::seekStart() {
-	return 0;
+	return seek(0);
 }
 
 Int64 DSPlay::queryPosition() {
-	return 0;
+	return -1;
 }
 
 Int64 DSPlay::fileSize() {
-	return -1;
+	if (mIsLoaded) {
+		return mFileSize;	
+	} else {
+		return -1;
+	}
 }
 Int64 DSPlay::fileDuration() {
 	if (mIsLoaded && (mMediaSeeking != NULL)) {

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h	2004-12-31 13:31:40 UTC (rev 8564)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h	2004-12-31 14:16:36 UTC (rev 8565)
@@ -51,6 +51,7 @@
 #include <fstream>
 
 #pragma managed
+using namespace System::IO;
 #using "libCMMLTagsDotNET.dll"
 using namespace illiminable::libCMMLTagsDotNET;
 #include "libDSPlayDotNet.h"
@@ -113,6 +114,7 @@
 		IDNMediaEvent* mDNMediaEvent;
 
 		bool mIsLoaded;
+		__int64 mFileSize;
 		bool isFileAnnodex(String* inFilename);
 
 

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/libDSPlayDotNET.vcproj
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/libDSPlayDotNET.vcproj	2004-12-31 13:31:40 UTC (rev 8564)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/libDSPlayDotNET.vcproj	2004-12-31 14:16:36 UTC (rev 8565)
@@ -239,6 +239,8 @@
 		<ProjectReference
 			ReferencedProjectIdentifier="{9B83D147-AFE7-46EF-A3FF-EBEC65F00BA6}"
 			Name="libCMMLTagsDotNET"/>
+		<AssemblyReference
+			RelativePath="{ReferencesPath}\System.dll"/>
 	</References>
 	<Files>
 		<Filter



More information about the commits mailing list