00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #pragma once
00034 #include <streams.h>
00035 #include <pullpin.h>
00036 #include <initguid.h>
00037
00038
00039 #ifdef DSFOGGMUX_EXPORTS
00040 #pragma message("----> Exporting from Ogg Mux...")
00041 #define OGG_MUX_API __declspec(dllexport)
00042 #else
00043 #pragma message("<---- Importing from Ogg Mux...")
00044 #define OGG_MUX_API __declspec(dllimport)
00045 #endif
00046
00047 #ifdef LIBOOOGG_EXPORTS
00048 #define LIBOOOGG_API __declspec(dllexport)
00049 #else
00050 #define LIBOOOGG_API __declspec(dllimport)
00051 #endif
00052
00053
00054
00055
00056 DEFINE_GUID(IID_IOggMuxProgress,
00057 0x90d6513c, 0xa665, 0x4b16, 0xac, 0xa7, 0xb3, 0xd1, 0xd4, 0xef, 0xe5, 0x8d);
00058
00059
00060
00061
00062 DEFINE_GUID(CLSID_OggDemuxSourceFilter,
00063 0x31ca0186, 0x1ff0, 0x4181, 0xaa, 0x38, 0x3c, 0xa4, 0x4, 0xb, 0xd2, 0x60);
00064
00065
00066 DEFINE_GUID(CLSID_OggMuxFilter,
00067 0x1f3effe4, 0xe70, 0x47c7, 0x9c, 0x48, 0x5, 0xeb, 0x99, 0xe2, 0x0, 0x11);
00068
00069
00070 DEFINE_GUID(MEDIASUBTYPE_FLAC,
00071 0x3913f0ab, 0xe7ed, 0x41c4, 0x97, 0x9b, 0x1d, 0x1f, 0xdd, 0x98, 0x3c, 0x7);
00072
00073
00074 DEFINE_GUID(MEDIASUBTYPE_OggFLAC_1_0,
00075 0x2c409db0, 0x95bf, 0x47ba, 0xb0, 0xf5, 0x58, 0x72, 0x56, 0xf1, 0xed, 0xcf);
00076
00077
00078
00079 DEFINE_GUID(MEDIASUBTYPE_Vorbis,
00080 0x8a0566ac, 0x42b3, 0x4ad9, 0xac, 0xa3, 0x93, 0xb9, 0x6, 0xdd, 0xf9, 0x8a);
00081
00082
00083 DEFINE_GUID(MEDIASUBTYPE_Speex,
00084 0x25a9729d, 0x12f6, 0x420e, 0xbd, 0x53, 0x1d, 0x63, 0x1d, 0xc2, 0x17, 0xdf);
00085
00086
00087 DEFINE_GUID(FORMAT_Vorbis,
00088 0x44e04f43, 0x58b3, 0x4de1, 0x9b, 0xaa, 0x89, 0x1, 0xf8, 0x52, 0xda, 0xe4);
00089
00090
00091 DEFINE_GUID(FORMAT_Speex,
00092 0x78701a27, 0xefb5, 0x4157, 0x95, 0x53, 0x38, 0xa7, 0x85, 0x4e, 0x3e, 0x81);
00093
00094
00095 DEFINE_GUID(FORMAT_FLAC,
00096 0x1cdc48ac, 0x4c24, 0x4b8b, 0x98, 0x2b, 0x70, 0x7, 0xa2, 0x9d, 0x83, 0xc4);
00097
00098
00099
00100 DEFINE_GUID(CLSID_TheoraDecodeFilter,
00101 0x5187161, 0x5c36, 0x4324, 0xa7, 0x34, 0x22, 0xbf, 0x37, 0x50, 0x9f, 0x2d);
00102
00103
00104 DEFINE_GUID(MEDIASUBTYPE_Theora,
00105 0xd124b2b1, 0x8968, 0x4ae8, 0xb2, 0x88, 0xfe, 0x16, 0xea, 0x34, 0xb0, 0xce);
00106
00107
00108 DEFINE_GUID(FORMAT_Theora,
00109 0xa99f116c, 0xdffa, 0x412c, 0x95, 0xde, 0x72, 0x5f, 0x99, 0x87, 0x48, 0x26);
00110
00111
00112
00113
00114 DEFINE_GUID(FORMAT_CMML,
00115 0x53696c76, 0x6961, 0x40b2, 0xb1, 0x36, 0x43, 0x6f, 0x6e, 0x72, 0x61, 0x64);
00116
00117
00118
00119 DEFINE_GUID(MEDIASUBTYPE_CMML,
00120 0x5a656e74, 0x6172, 0x6f26, 0xb7, 0x9c, 0xd6, 0x41, 0x6e, 0x64, 0x72, 0x82);
00121
00122
00123
00124 const REGPINTYPES OggMuxInputTypes[] = {
00125 {
00126 &MEDIATYPE_Audio,
00127 &MEDIASUBTYPE_Speex
00128 },
00129 {
00130 &MEDIATYPE_Audio,
00131 &MEDIASUBTYPE_Vorbis
00132 },
00133 {
00134 &MEDIATYPE_Audio,
00135 &MEDIASUBTYPE_OggFLAC_1_0
00136 },
00137 {
00138 &MEDIATYPE_Video,
00139 &MEDIASUBTYPE_Theora
00140 },
00141 {
00142 &MEDIATYPE_Audio,
00143 &MEDIASUBTYPE_FLAC
00144 },
00145 {
00146 &MEDIATYPE_Text,
00147 &MEDIASUBTYPE_CMML
00148 }
00149
00150 };
00151 const REGFILTERPINS OggMuxPinReg = {
00152
00153 L"Ogg Packet Input",
00154 TRUE,
00155 FALSE,
00156 FALSE,
00157 FALSE,
00158 NULL,
00159 NULL,
00160 6,
00161 OggMuxInputTypes
00162 };
00163
00164 const REGFILTER2 OggMuxFilterReg = {
00165 1,
00166 MERIT_DO_NOT_USE,
00167 1,
00168 &OggMuxPinReg
00169
00170 };
00171
00172
00173
00174 struct sVorbisFormatBlock {
00175 unsigned long vorbisVersion;
00176 unsigned long samplesPerSec;
00177 unsigned long minBitsPerSec;
00178 unsigned long avgBitsPerSec;
00179 unsigned long maxBitsPerSec;
00180 unsigned char numChannels;
00181 };
00182
00183 struct sSpeexFormatBlock {
00184 unsigned long speexVersion;
00185 unsigned long samplesPerSec;
00186 unsigned long minBitsPerSec;
00187 unsigned long avgBitsPerSec;
00188 unsigned long maxBitsPerSec;
00189 unsigned long numChannels;
00190
00191 };
00192
00193 struct sFLACFormatBlock {
00194 unsigned short numChannels;
00195 unsigned long numBitsPerSample;
00196 unsigned long samplesPerSec;
00197
00198 };
00199
00200 struct sTheoraFormatBlock {
00201 unsigned long theoraVersion;
00202 unsigned long outerFrameWidth;
00203 unsigned long outerFrameHeight;
00204 unsigned long pictureWidth;
00205 unsigned long pictureHeight;
00206 unsigned long frameRateNumerator;
00207 unsigned long frameRateDenominator;
00208 unsigned long aspectNumerator;
00209 unsigned long aspectDenominator;
00210 unsigned long maxKeyframeInterval;
00211 unsigned long targetBitrate;
00212 unsigned char targetQuality;
00213 unsigned char xOffset;
00214 unsigned char yOffset;
00215 unsigned char colourSpace;
00216 };
00217
00218 struct sCMMLFormatBlock {
00219 __int64 granuleNumerator;
00220 __int64 granuleDenominator;
00221 };