[xiph-commits] r7082 - in trunk/oggdsf:
illiminable at dactyl.lonelymoon.com
illiminable
Sat Jul 10 09:05:26 PDT 2004
src/lib/player/libDSPlayDotNET src/tools/DNPlay website
Message-ID: <20040710160526.002FE9AAAB at dactyl.lonelymoon.com>
Author: illiminable
Date: Sat Jul 10 09:05:26 2004
New Revision: 7082
Modified:
trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h
trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
trunk/oggdsf/website/enc_theora_graphedit.html
trunk/oggdsf/website/index.html
Log:
* Few changes to new player DNPlay, and underlying player library... now can play theora and annodex files, and properly shows subtitles for annodex.
Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp 2004-07-10 00:46:48 UTC (rev 7081)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp 2004-07-10 16:05:25 UTC (rev 7082)
@@ -42,6 +42,7 @@
bool DSPlay::loadFile(String* inFileName) {
+
releaseInterfaces();
HRESULT locHR = S_OK;
@@ -61,6 +62,25 @@
return false;
}
+
+ //If it's an annodex file, then put the VMR 9 in the graph.
+ if (isFileAnnodex(inFileName)) {
+
+ IBaseFilter* locVMR9 = NULL;
+
+ HRESULT locHR = S_OK;
+ locHR = mGraphBuilder->FindFilterByName(L"Video Mixing Renderer 9", &locVMR9);
+ if (locVMR9 == NULL) {
+ locHR= CoCreateInstance(CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC, IID_IBaseFilter, (void **)&locVMR9);
+ if (locHR == S_OK) {
+ locHR = mGraphBuilder->AddFilter(locVMR9, L"Video Mixing Renderer 9");
+ if (locHR != S_OK) {
+ locVMR9->Release();
+ }
+ }
+ }
+
+ }
locHR = mGraphBuilder->RenderFile(locWFileName.c_str(), NULL);
if (locHR != S_OK) {
@@ -159,5 +179,15 @@
}
}
+bool DSPlay::isFileAnnodex(String* inFilename)
+{
+ String* locExt = (inFilename->Substring(inFilename->Length - 4, 4))->ToUpper();
+ if (locExt->Equals(".ANX")) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
} //end namespace libDSPlayDotNET
-} //end namespace illiminable
\ No newline at end of file
+} //end namespace illiminable
Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h 2004-07-10 00:46:48 UTC (rev 7081)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.h 2004-07-10 16:05:25 UTC (rev 7082)
@@ -37,6 +37,7 @@
IMediaControl* mMediaControl;
IMediaSeeking* mMediaSeeking;
bool mIsLoaded;
+ bool isFileAnnodex(String* inFilename);
};
}
}
\ No newline at end of file
Modified: trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
===================================================================
--- trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs 2004-07-10 00:46:48 UTC (rev 7081)
+++ trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs 2004-07-10 16:05:25 UTC (rev 7082)
@@ -67,8 +67,13 @@
protected void updateProgressBar()
{
- double locProgRatio = Convert.ToDouble(mLastSync + (mNumTicks * 10000000)) / mFileDuration;
+ double locProgRatio = 0;
+ if (mFileDuration != 0)
+ {
+ locProgRatio = Convert.ToDouble(mLastSync + (mNumTicks * 10000000)) / mFileDuration;
+ }
+
Int32 locProgWidth = Convert.ToInt32(locProgRatio * lblProgressBkgd.Width);
lblProgressFgnd.Width = locProgWidth;
}
Modified: trunk/oggdsf/website/enc_theora_graphedit.html
===================================================================
--- trunk/oggdsf/website/enc_theora_graphedit.html 2004-07-10 00:46:48 UTC (rev 7081)
+++ trunk/oggdsf/website/enc_theora_graphedit.html 2004-07-10 16:05:25 UTC (rev 7082)
@@ -9,6 +9,7 @@
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF00FF" alink="#FF0000">
<a href="http://www.illiminable.com/ogg">Main Page</a><br><br>
<b><u><font size="+2">How to encode theora files with directshow</font></u></b><br>
+If you have come to this page from an external site, please note before following these steps you need to install the <a href="http://www.illiminable.com/ogg/">directshow filters</a> on my main page.<br><br>
This brief tutorial explains how to use the directshow filter in association with graphedit to encode or transcode ogg theora. It focuses mainly on transcoding, but by using different source filters you can also encode raw data.<br>
Graphedit is available in the DirectX9 SDK<br>
<br>
Modified: trunk/oggdsf/website/index.html
===================================================================
--- trunk/oggdsf/website/index.html 2004-07-10 00:46:48 UTC (rev 7081)
+++ trunk/oggdsf/website/index.html 2004-07-10 16:05:25 UTC (rev 7082)
@@ -9,7 +9,8 @@
<b><u><font size="+2">Directshow Filters for Ogg Vorbis, Speex, Theora and FLAC</font></u></b><br>
<br>
This is a temporary page until I get time to do a proper one. I really will get around to it someday soon !<br>
-<br>
+
+<br><b>Please NOTE: This server will be down at approximately 00:01 Jul 11 US EDT (04:01 Jul 11 GMT) for about 4-6 hours, while the servers are moved to a different data centre. Sorry for any inconvenience.</b><br><br>
These are early releases, they probably still have bugs in them. Use them at your own risk.<br>
Contact at ogg at illiminable.com with feedback, bugs or suggestions<br>
<br>
More information about the commits
mailing list