Changeset 4 for trunk/classes/c/c_video/cwmpg.c
- Timestamp:
- Jul 13, 2017, 5:17:57 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/classes/c/c_video/cwmpg.c
r2 r4 1 1 /* 2 * (C) Chris Wohlgemuth 2002-200 42 * (C) Chris Wohlgemuth 2002-2005 3 3 * 4 4 */ … … 41 41 #include "helpid.h" 42 42 #include "cwmpg.ih" 43 #include "cwaudioinc.h" /* For REXX script name */ 44 #include "sys_funcs.h" 43 45 44 46 extern char chrHelpLibrary[CCHMAXPATH]; 47 char chrMMMPGExt[400]={0};/* Array holding the extensions for wpclsQueryInstanceFilter() */ 45 48 46 49 HMODULE queryResModuleHandle(void); … … 48 51 BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd); 49 52 ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters, CWMMDataFile *thisPtr, ULONG ulView); 50 53 BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize); 51 54 52 55 /* … … 155 158 M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryInstanceFilter"); 156 159 157 return "*.MPG,*.VBS"; 160 /* This list is build in wpclsInitData() */ 161 return chrMMMPGExt; 158 162 } 159 163 … … 189 193 190 194 195 SOM_Scope void SOMLINK cwmpgM_wpclsInitData(M_MMMPG *somSelf) 196 { 197 static BOOL bGotMPEGExt=FALSE; 198 199 /* M_MMMPGData *somThis = M_MMMPGGetData(somSelf); */ 200 M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsInitData"); 201 202 /* 203 Taken from the audio classes. I suspect the same is true for the video classes. 204 Anyway it wont hurt having this here. 205 206 Get extensions of additional audio procs. These extensions may be specified by 207 newly installed IO procs in MMPM2.INI or by using the Multimedia setup. For 208 example the MMIOMP3 procedure for reading MP3 files adds the MP3 extension this 209 way to the system. Extensions already handled by a specialized class will be 210 filtered in the called REXX script e.g. MP3 so only unknown extensions end up here. 211 212 Strangely enough wpclsQueryInstanceFilter() is called during wpclsInitData() so 213 we query the extensions here before calling the parent. 214 215 FIXME: 216 The check is only done once during initialization. This is a little annoyance for 217 the user because new extension specified in the settings will only be picked up 218 on next WPS start. 219 */ 220 if(!bGotMPEGExt) 221 { 222 /* REXX script: "mpegext.rx" */ 223 getStringFromRexxScript(MMMPG_GETEXT_RX, chrMMMPGExt, sizeof(chrMMMPGExt)); 224 /* Add our default extension *.MPG */ 225 if(chrMMMPGExt[0]==0) 226 /* It's the first one */ 227 strcpy(chrMMMPGExt,"*.MPG,*.VBS"); 228 else 229 strlcat(chrMMMPGExt, ",*.MPG,*.VBS", sizeof(chrMMMPGExt)); 230 bGotMPEGExt=TRUE; 231 } 232 233 M_MMMPG_parent_M_MMVideo_wpclsInitData(somSelf); 234 } 235 191 236 /* 192 237 * SOM_Scope BOOL SOMLINK cwmpgM_wpclsQueryDefaultHelp(M_CWMPG *somSelf,
Note:
See TracChangeset
for help on using the changeset viewer.