source: trunk/classes/c/c_video/cwmov.c

Last change on this file was 167, checked in by gyoung, 17 months ago

Addition code needed for playing mov files with modern video player

File size: 4.7 KB
Line 
1/*
2 * (C) Chris Wohlgemuth 2002-2004
3 *
4 */
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; see the file COPYING. If not, write to
18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20/*
21 * If you need another license for your project/product contact me at
22 *
23 * http://www.os2world.com/cdwriting
24 * http://www.geocities.com/SiliconValley/Sector/5785/
25 */
26
27/*
28 * This file was generated by the SOM Compiler and Emitter Framework.
29 * Generated using:
30 * SOM Emitter emitctm: 2.42
31 */
32
33#ifndef SOM_Module_cwmov_Source
34#define SOM_Module_cwmov_Source
35#endif
36#define CWMOV_Class_Source
37#define M_CWMOV_Class_Source
38
39#include <os2.h>
40#include "helpid.h"
41#include "cwmov.ih"
42
43extern char chrHelpLibrary[CCHMAXPATH];
44
45HMODULE queryResModuleHandle(void);
46HMODULE queryModuleHandle(void);
47BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
48
49
50/*
51 * SOM_Scope PSZ SOMLINK cwmovM_wpclsQueryTitle(M_CWMOV *somSelf)
52 */
53
54/*
55 * The prototype for cwmovM_wpclsQueryTitle was replaced by the following prototype:
56 */
57SOM_Scope PSZ SOMLINK cwmovM_wpclsQueryTitle(M_MMMOV *somSelf)
58{
59 static char chrTitle[20]={0};
60 /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
61 M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryTitle");
62
63 if(chrTitle[0]==0)
64 if(!getMessage(chrTitle, IDSTR_MOVTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
65 strcpy(chrTitle,"MOVVideo.MOV");
66 return chrTitle;
67}
68
69
70/*
71 * SOM_Scope PSZ SOMLINK cwmovM_wpclsQueryInstanceType(M_CWMOV *somSelf)
72 */
73
74/*
75 * The prototype for cwmovM_wpclsQueryInstanceType was replaced by the following prototype:
76 */
77SOM_Scope PSZ SOMLINK cwmovM_wpclsQueryInstanceType(M_MMMOV *somSelf)
78{
79 /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
80 M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryInstanceType");
81
82 return "QuickTime Movie";
83}
84
85
86/*
87 * SOM_Scope PSZ SOMLINK cwmovM_wpclsQueryInstanceFilter(M_CWMOV *somSelf)
88 */
89
90/*
91 * The prototype for cwmovM_wpclsQueryInstanceFilter was replaced by the following prototype:
92 */
93SOM_Scope PSZ SOMLINK cwmovM_wpclsQueryInstanceFilter(M_MMMOV *somSelf)
94{
95 ULONG ulSize;
96 /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
97 M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryInstanceFilter");
98
99 ulSize = PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", "nomodvid", 0);
100 if(ulSize)
101 return "*.MOV,*.QT";
102 else
103 return "*.QT";
104}
105
106
107/*
108 * SOM_Scope ULONG SOMLINK cwmovM_wpclsQueryIconData(M_CWMOV *somSelf,
109 * PICONINFO pIconInfo)
110 */
111
112/*
113 * The prototype for cwmovM_wpclsQueryIconData was replaced by the following prototype:
114 */
115SOM_Scope ULONG SOMLINK cwmovM_wpclsQueryIconData(M_MMMOV *somSelf,
116 PICONINFO pIconInfo)
117{
118 HMODULE hmod;
119 /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
120 M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryIconData");
121
122 hmod=queryModuleHandle();
123 if(!hmod)
124 return M_MMMOV_parent_M_MMVideo_wpclsQueryIconData(somSelf, pIconInfo);
125
126 if (pIconInfo) {
127 pIconInfo->fFormat = ICON_RESOURCE;
128 pIconInfo->hmod = hmod;
129 pIconInfo->resid = ID_ICONMOVFILE;
130 } /* endif */
131
132 return ( sizeof(ICONINFO) );
133}
134
135
136/*
137 * SOM_Scope BOOL SOMLINK cwmovM_wpclsQueryDefaultHelp(M_CWMOV *somSelf,
138 * PULONG pHelpPanelId,
139 * PSZ pszHelpLibrary)
140 */
141
142/*
143 * The prototype for cwmovM_wpclsQueryDefaultHelp was replaced by the following prototype:
144 */
145SOM_Scope BOOL SOMLINK cwmovM_wpclsQueryDefaultHelp(M_MMMOV *somSelf,
146 PULONG pHelpPanelId,
147 PSZ pszHelpLibrary)
148{
149 /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
150 M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryDefaultHelp");
151
152 if(pHelpPanelId)
153 *pHelpPanelId=MOVFILE_HELP_PANEL;
154 if(pszHelpLibrary)
155 strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
156 return TRUE;
157}
158
Note: See TracBrowser for help on using the repository browser.