[xiph-commits] r15332 - trunk/oggdsf/src/lib/core/directshow/dsfOggMux
cristianadam at svn.xiph.org
cristianadam at svn.xiph.org
Sun Sep 21 22:32:29 PDT 2008
Author: cristianadam
Date: 2008-09-21 22:32:29 -0700 (Sun, 21 Sep 2008)
New Revision: 15332
Modified:
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h
Log:
Fixed Ticket #1390 (Ogg muxing filter doesn't support schroedinger codec)
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp 2008-09-22 04:46:20 UTC (rev 15331)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp 2008-09-22 05:32:29 UTC (rev 15332)
@@ -84,15 +84,21 @@
HRESULT OggMuxInputPin::SetMediaType(const CMediaType* inMediaType) {
//debugLog.open("G:\\logs\\oggmuxinpin.log", ios_base::out);
//debugLog<<"Set media type..."<<endl;
- if ((inMediaType->majortype == MEDIATYPE_Video) && (inMediaType->subtype == MEDIASUBTYPE_Theora)) {
- //Theora
-
- sTheoraFormatBlock* locTheora = (sTheoraFormatBlock*)inMediaType->pbFormat;
- //debugLog<<"Theo sample rate = "<<locTheora->frameRateNumerator<<" / "<<locTheora->frameRateDenominator<<endl;
- //debugLog<<"Theo KFI = "<<locTheora->maxKeyframeInterval<<endl;
- mMuxStream->setConversionParams(locTheora->frameRateNumerator, locTheora->frameRateDenominator, 10000000, locTheora->maxKeyframeInterval);
- mMuxStream->setNumHeaders(3);
- mPaginator.setNumHeaders(3);
+ if (inMediaType->majortype == MEDIATYPE_Video) {
+ if (inMediaType->subtype == MEDIASUBTYPE_Theora) {
+ //Theora
+ sTheoraFormatBlock* locTheora = (sTheoraFormatBlock*)inMediaType->pbFormat;
+ //debugLog<<"Theo sample rate = "<<locTheora->frameRateNumerator<<" / "<<locTheora->frameRateDenominator<<endl;
+ //debugLog<<"Theo KFI = "<<locTheora->maxKeyframeInterval<<endl;
+ mMuxStream->setConversionParams(locTheora->frameRateNumerator, locTheora->frameRateDenominator, 10000000, locTheora->maxKeyframeInterval);
+ mMuxStream->setNumHeaders(3);
+ mPaginator.setNumHeaders(3);
+ }
+ else if (inMediaType->subtype == MEDIASUBTYPE_Schroedinger) {
+ mMuxStream->setConversionParams(*((unsigned *)inMediaType->pbFormat), *(((unsigned *)inMediaType->pbFormat) + 1), 10000000, 32);
+ mMuxStream->setNumHeaders(1);
+ mPaginator.setNumHeaders(1);
+ }
} else if (inMediaType->majortype == MEDIATYPE_Audio) {
if (inMediaType->subtype == MEDIASUBTYPE_Vorbis) {
//Vorbis
@@ -150,28 +156,32 @@
outMediaType->subtype = MEDIASUBTYPE_Theora;
return S_OK;
case 1:
+ outMediaType->majortype = MEDIATYPE_Video;
+ outMediaType->subtype = MEDIASUBTYPE_Schroedinger;
+ return S_OK;
+ case 2:
outMediaType->majortype = MEDIATYPE_Audio;
outMediaType->subtype = MEDIASUBTYPE_Vorbis;
return S_OK;
- case 2:
+ case 3:
outMediaType->majortype = MEDIATYPE_Audio;
outMediaType->subtype = MEDIASUBTYPE_Speex;
return S_OK;
- case 3:
+ case 4:
outMediaType->majortype = MEDIATYPE_Audio;
outMediaType->subtype = MEDIASUBTYPE_OggFLAC_1_0;
return S_OK;
- case 4:
+ case 5:
outMediaType->majortype = MEDIATYPE_Audio;
outMediaType->subtype = MEDIASUBTYPE_FLAC;
return S_OK;
- case 5:
+ case 6:
outMediaType->majortype = MEDIATYPE_Text;
outMediaType->subtype = MEDIASUBTYPE_CMML;
return S_OK;
- case 6:
+ case 7:
outMediaType->majortype = MEDIATYPE_Audio;
outMediaType->subtype = MEDIASUBTYPE_RawOggAudio;
return S_OK;
@@ -186,6 +196,10 @@
if ( (inMediaType->majortype == MEDIATYPE_Video
&& inMediaType->subtype == MEDIASUBTYPE_Theora
&& inMediaType->formattype == FORMAT_Theora)
+ ||
+ (inMediaType->majortype == MEDIATYPE_Video
+ && inMediaType->subtype == MEDIASUBTYPE_Schroedinger
+ && inMediaType->formattype == FORMAT_Schroedinger)
||
(inMediaType->majortype == MEDIATYPE_Audio
&& inMediaType->subtype == MEDIASUBTYPE_Vorbis
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h 2008-09-22 04:46:20 UTC (rev 15331)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h 2008-09-22 05:32:29 UTC (rev 15332)
@@ -117,6 +117,14 @@
DEFINE_GUID(FORMAT_Theora,
0xa99f116c, 0xdffa, 0x412c, 0x95, 0xde, 0x72, 0x5f, 0x99, 0x87, 0x48, 0x26);
+// {BBCD12AC-0000-0010-8000-00aa00389b71}
+DEFINE_GUID(MEDIASUBTYPE_Schroedinger,
+0xBBCD12AC, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
+
+// {BBCD12AC-c356-11ce-bf01-00aa0055595a}
+DEFINE_GUID(FORMAT_Schroedinger,
+0xBBCD12AC, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a);
+
//This structure defines the type of input we accept on the input pin... Stream/Annodex
// {53696C76-6961-40b2-B136-436F6E726164}
More information about the commits
mailing list