- Timestamp:
 - Sep 15, 2001, 11:28:23 AM (24 years ago)
 - Location:
 - trunk/src/quartz
 - Files:
 - 
      
- 25 added
 - 26 edited
 
- 
          
  amerror.c (modified) (3 diffs)
 - 
          
  amundoc.c (added)
 - 
          
  complist.c (modified) (3 diffs)
 - 
          
  complist.h (modified) (2 diffs)
 - 
          
  devenum.c (added)
 - 
          
  devenum.h (added)
 - 
          
  devmon.c (added)
 - 
          
  devmon.h (added)
 - 
          
  enumunk.c (added)
 - 
          
  enumunk.h (added)
 - 
          
  fgclsid.c (added)
 - 
          
  fgidisp.c (added)
 - 
          
  fgraph.c (modified) (2 diffs)
 - 
          
  fgraph.h (modified) (6 diffs)
 - 
          
  fmap.c (added)
 - 
          
  fmap.h (added)
 - 
          
  fmap2.c (added)
 - 
          
  fmap2.h (added)
 - 
          
  guid.c (modified) (2 diffs)
 - 
          
  ibasaud.c (modified) (13 diffs)
 - 
          
  ibasvid.c (modified) (42 diffs)
 - 
          
  idevenum.c (added)
 - 
          
  ifgraph.c (modified) (24 diffs)
 - 
          
  ifmap.c (added)
 - 
          
  ifmap3.c (added)
 - 
          
  igrver.c (added)
 - 
          
  imcntl.c (modified) (19 diffs)
 - 
          
  imem.c (modified) (11 diffs)
 - 
          
  imesink.c (added)
 - 
          
  imevent.c (modified) (18 diffs)
 - 
          
  imfilter.c (added)
 - 
          
  impos.c (modified) (20 diffs)
 - 
          
  imseek.c (modified) (22 diffs)
 - 
          
  initquartz.cpp (modified) (3 diffs)
 - 
          
  initterm.cpp (modified) (1 diff)
 - 
          
  irclock.c (modified) (9 diffs)
 - 
          
  iunk.c (modified) (6 diffs)
 - 
          
  iunk.h (modified) (2 diffs)
 - 
          
  ividwin.c (modified) (48 diffs)
 - 
          
  main.c (modified) (7 diffs)
 - 
          
  makefile (modified) (3 diffs)
 - 
          
  memalloc.c (modified) (2 diffs)
 - 
          
  memalloc.h (modified) (2 diffs)
 - 
          
  monprop.c (added)
 - 
          
  monprop.h (added)
 - 
          
  regsvr.c (added)
 - 
          
  regsvr.h (added)
 - 
          
  seekpass.c (added)
 - 
          
  seekpass.h (added)
 - 
          
  sysclock.c (modified) (2 diffs)
 - 
          
  sysclock.h (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/src/quartz/amerror.c
r6649 r6710 1 /* $Id: amerror.c,v 1.2 2001-09-05 13:36:34 bird Exp $ */2 1 3 2 #include "config.h" … … 20 19 LPWSTR QUARTZ_strncpyAtoW( LPWSTR lpwstr, LPCSTR lpstr, INT wbuflen ) 21 20 { 22 INTlen;23 24 len = MultiByteToWideChar( CP_ACP, 0, lpstr, -1, lpwstr, wbuflen );25 if ( len == 0 )26 *lpwstr = 0;27 return lpwstr;21 INT len; 22 23 len = MultiByteToWideChar( CP_ACP, 0, lpstr, -1, lpwstr, wbuflen ); 24 if ( len == 0 ) 25 *lpwstr = 0; 26 return lpwstr; 28 27 } 29 28 … … 31 30 static LPCSTR hresult_to_string( HRESULT hr ) 32 31 { 33 switch ( hr )34 {35 #define ENTRY(x) case x: return (const char*)#x; 36 /* some known codes */37 ENTRY(S_OK) 38 ENTRY(S_FALSE) 39 ENTRY(E_FAIL) 40 ENTRY(E_POINTER) 41 ENTRY(E_NOTIMPL) 42 ENTRY(E_NOINTERFACE) 43 ENTRY(E_OUTOFMEMORY) 44 ENTRY(CLASS_E_CLASSNOTAVAILABLE) 45 ENTRY(CLASS_E_NOAGGREGATION) 46 47 /* vfwmsgs.h */48 ENTRY(VFW_S_NO_MORE_ITEMS) 49 ENTRY(VFW_E_BAD_KEY) 50 ENTRY(VFW_E_INVALIDMEDIATYPE) 51 ENTRY(VFW_E_INVALIDSUBTYPE) 52 ENTRY(VFW_E_NEED_OWNER) 53 ENTRY(VFW_E_ENUM_OUT_OF_SYNC) 54 ENTRY(VFW_E_ALREADY_CONNECTED) 55 ENTRY(VFW_E_FILTER_ACTIVE) 56 ENTRY(VFW_E_NO_TYPES) 57 ENTRY(VFW_E_NO_ACCEPTABLE_TYPES) 58 ENTRY(VFW_E_INVALID_DIRECTION) 59 ENTRY(VFW_E_NOT_CONNECTED) 60 ENTRY(VFW_E_NO_ALLOCATOR) 61 ENTRY(VFW_E_RUNTIME_ERROR) 62 ENTRY(VFW_E_BUFFER_NOTSET) 63 ENTRY(VFW_E_BUFFER_OVERFLOW) 64 ENTRY(VFW_E_BADALIGN) 65 ENTRY(VFW_E_ALREADY_COMMITTED) 66 ENTRY(VFW_E_BUFFERS_OUTSTANDING) 67 ENTRY(VFW_E_NOT_COMMITTED) 68 ENTRY(VFW_E_SIZENOTSET) 69 ENTRY(VFW_E_NO_CLOCK) 70 ENTRY(VFW_E_NO_SINK) 71 ENTRY(VFW_E_NO_INTERFACE) 72 ENTRY(VFW_E_NOT_FOUND) 73 ENTRY(VFW_E_CANNOT_CONNECT) 74 ENTRY(VFW_E_CANNOT_RENDER) 75 ENTRY(VFW_E_CHANGING_FORMAT) 76 ENTRY(VFW_E_NO_COLOR_KEY_SET) 77 ENTRY(VFW_E_NOT_OVERLAY_CONNECTION) 78 ENTRY(VFW_E_NOT_SAMPLE_CONNECTION) 79 ENTRY(VFW_E_PALETTE_SET) 80 ENTRY(VFW_E_COLOR_KEY_SET) 81 ENTRY(VFW_E_NO_COLOR_KEY_FOUND) 82 ENTRY(VFW_E_NO_PALETTE_AVAILABLE) 83 ENTRY(VFW_E_NO_DISPLAY_PALETTE) 84 ENTRY(VFW_E_TOO_MANY_COLORS) 85 ENTRY(VFW_E_STATE_CHANGED) 86 ENTRY(VFW_E_NOT_STOPPED) 87 ENTRY(VFW_E_NOT_PAUSED) 88 ENTRY(VFW_E_NOT_RUNNING) 89 ENTRY(VFW_E_WRONG_STATE) 90 ENTRY(VFW_E_START_TIME_AFTER_END) 91 ENTRY(VFW_E_INVALID_RECT) 92 ENTRY(VFW_E_TYPE_NOT_ACCEPTED) 93 ENTRY(VFW_E_SAMPLE_REJECTED) 94 ENTRY(VFW_E_SAMPLE_REJECTED_EOS) 95 ENTRY(VFW_S_DUPLICATE_NAME) 96 ENTRY(VFW_E_DUPLICATE_NAME) 97 ENTRY(VFW_E_TIMEOUT) 98 ENTRY(VFW_E_INVALID_FILE_FORMAT) 99 ENTRY(VFW_E_ENUM_OUT_OF_RANGE) 100 ENTRY(VFW_E_CIRCULAR_GRAPH) 101 ENTRY(VFW_E_NOT_ALLOWED_TO_SAVE) 102 ENTRY(VFW_E_TIME_ALREADY_PASSED) 103 ENTRY(VFW_E_ALREADY_CANCELLED) 104 ENTRY(VFW_E_CORRUPT_GRAPH_FILE) 105 ENTRY(VFW_E_ADVISE_ALREADY_SET) 106 ENTRY(VFW_S_STATE_INTERMEDIATE) 107 ENTRY(VFW_E_NO_MODEX_AVAILABLE) 108 ENTRY(VFW_E_NO_ADVISE_SET) 109 ENTRY(VFW_E_NO_FULLSCREEN) 110 ENTRY(VFW_E_IN_FULLSCREEN_MODE) 111 ENTRY(VFW_E_UNKNOWN_FILE_TYPE) 112 ENTRY(VFW_E_CANNOT_LOAD_SOURCE_FILTER) 113 ENTRY(VFW_S_PARTIAL_RENDER) 114 ENTRY(VFW_E_FILE_TOO_SHORT) 115 ENTRY(VFW_E_INVALID_FILE_VERSION) 116 ENTRY(VFW_S_SOME_DATA_IGNORED) 117 ENTRY(VFW_S_CONNECTIONS_DEFERRED) 118 ENTRY(VFW_E_INVALID_CLSID) 119 ENTRY(VFW_E_INVALID_MEDIA_TYPE) 120 ENTRY(VFW_E_SAMPLE_TIME_NOT_SET) 121 ENTRY(VFW_S_RESOURCE_NOT_NEEDED) 122 ENTRY(VFW_E_MEDIA_TIME_NOT_SET) 123 ENTRY(VFW_E_NO_TIME_FORMAT_SET) 124 ENTRY(VFW_E_MONO_AUDIO_HW) 125 ENTRY(VFW_S_MEDIA_TYPE_IGNORED) 126 ENTRY(VFW_E_NO_DECOMPRESSOR) 127 ENTRY(VFW_E_NO_AUDIO_HARDWARE) 128 ENTRY(VFW_S_VIDEO_NOT_RENDERED) 129 ENTRY(VFW_S_AUDIO_NOT_RENDERED) 130 ENTRY(VFW_E_RPZA) 131 ENTRY(VFW_S_RPZA) 132 ENTRY(VFW_E_PROCESSOR_NOT_SUITABLE) 133 ENTRY(VFW_E_UNSUPPORTED_AUDIO) 134 ENTRY(VFW_E_UNSUPPORTED_VIDEO) 135 ENTRY(VFW_E_MPEG_NOT_CONSTRAINED) 136 ENTRY(VFW_E_NOT_IN_GRAPH) 137 ENTRY(VFW_S_ESTIMATED) 138 ENTRY(VFW_E_NO_TIME_FORMAT) 139 ENTRY(VFW_E_READ_ONLY) 140 ENTRY(VFW_S_RESERVED) 141 ENTRY(VFW_E_BUFFER_UNDERFLOW) 142 ENTRY(VFW_E_UNSUPPORTED_STREAM) 143 ENTRY(VFW_E_NO_TRANSPORT) 144 ENTRY(VFW_S_STREAM_OFF) 145 ENTRY(VFW_S_CANT_CUE) 146 ENTRY(VFW_E_BAD_VIDEOCD) 147 ENTRY(VFW_S_NO_STOP_TIME) 148 ENTRY(VFW_E_OUT_OF_VIDEO_MEMORY) 149 ENTRY(VFW_E_VP_NEGOTIATION_FAILED) 150 ENTRY(VFW_E_DDRAW_CAPS_NOT_SUITABLE) 151 ENTRY(VFW_E_NO_VP_HARDWARE) 152 ENTRY(VFW_E_NO_CAPTURE_HARDWARE) 153 ENTRY(VFW_E_DVD_OPERATION_INHIBITED) 154 ENTRY(VFW_E_DVD_INVALIDDOMAIN) 155 ENTRY(VFW_E_DVD_NO_BUTTON) 156 ENTRY(VFW_E_DVD_GRAPHNOTREADY) 157 ENTRY(VFW_E_DVD_RENDERFAIL) 158 ENTRY(VFW_E_DVD_DECNOTENOUGH) 159 ENTRY(VFW_E_DDRAW_VERSION_NOT_SUITABLE) 160 ENTRY(VFW_E_COPYPROT_FAILED) 161 ENTRY(VFW_S_NOPREVIEWPIN) 162 ENTRY(VFW_E_TIME_EXPIRED) 163 ENTRY(VFW_S_DVD_NON_ONE_SEQUENTIAL) 164 ENTRY(VFW_E_DVD_WRONG_SPEED) 165 ENTRY(VFW_E_DVD_MENU_DOES_NOT_EXIST) 166 ENTRY(VFW_E_DVD_CMD_CANCELLED) 167 ENTRY(VFW_E_DVD_STATE_WRONG_VERSION) 168 ENTRY(VFW_E_DVD_STATE_CORRUPT) 169 ENTRY(VFW_E_DVD_STATE_WRONG_DISC) 170 ENTRY(VFW_E_DVD_INCOMPATIBLE_REGION) 171 ENTRY(VFW_E_DVD_NO_ATTRIBUTES) 172 ENTRY(VFW_E_DVD_NO_GOUP_PGC) 173 ENTRY(VFW_E_DVD_LOW_PARENTAL_LEVEL) 174 ENTRY(VFW_E_DVD_NOT_IN_KARAOKE_MODE) 175 ENTRY(VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE) 176 ENTRY(VFW_S_DVD_NOT_ACCURATE) 177 ENTRY(VFW_E_FRAME_STEP_UNSUPPORTED) 178 ENTRY(VFW_E_DVD_STREAM_DISABLED) 179 ENTRY(VFW_E_DVD_TITLE_UNKNOWN) 180 ENTRY(VFW_E_DVD_INVALID_DISC) 181 ENTRY(VFW_E_DVD_NO_RESUME_INFORMATION) 182 ENTRY(VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD) 183 ENTRY(VFW_E_PIN_ALREADY_BLOCKED) 184 ENTRY(VFW_E_CERTIFICATION_FAILURE) 185 #undefENTRY186 }187 188 return NULL;32 switch ( hr ) 33 { 34 #define ENTRY(x) case x: return (const char*)#x 35 /* some known codes */ 36 ENTRY(S_OK); 37 ENTRY(S_FALSE); 38 ENTRY(E_FAIL); 39 ENTRY(E_POINTER); 40 ENTRY(E_NOTIMPL); 41 ENTRY(E_NOINTERFACE); 42 ENTRY(E_OUTOFMEMORY); 43 ENTRY(CLASS_E_CLASSNOTAVAILABLE); 44 ENTRY(CLASS_E_NOAGGREGATION); 45 46 /* vfwmsgs.h */ 47 ENTRY(VFW_S_NO_MORE_ITEMS); 48 ENTRY(VFW_E_BAD_KEY); 49 ENTRY(VFW_E_INVALIDMEDIATYPE); 50 ENTRY(VFW_E_INVALIDSUBTYPE); 51 ENTRY(VFW_E_NEED_OWNER); 52 ENTRY(VFW_E_ENUM_OUT_OF_SYNC); 53 ENTRY(VFW_E_ALREADY_CONNECTED); 54 ENTRY(VFW_E_FILTER_ACTIVE); 55 ENTRY(VFW_E_NO_TYPES); 56 ENTRY(VFW_E_NO_ACCEPTABLE_TYPES); 57 ENTRY(VFW_E_INVALID_DIRECTION); 58 ENTRY(VFW_E_NOT_CONNECTED); 59 ENTRY(VFW_E_NO_ALLOCATOR); 60 ENTRY(VFW_E_RUNTIME_ERROR); 61 ENTRY(VFW_E_BUFFER_NOTSET); 62 ENTRY(VFW_E_BUFFER_OVERFLOW); 63 ENTRY(VFW_E_BADALIGN); 64 ENTRY(VFW_E_ALREADY_COMMITTED); 65 ENTRY(VFW_E_BUFFERS_OUTSTANDING); 66 ENTRY(VFW_E_NOT_COMMITTED); 67 ENTRY(VFW_E_SIZENOTSET); 68 ENTRY(VFW_E_NO_CLOCK); 69 ENTRY(VFW_E_NO_SINK); 70 ENTRY(VFW_E_NO_INTERFACE); 71 ENTRY(VFW_E_NOT_FOUND); 72 ENTRY(VFW_E_CANNOT_CONNECT); 73 ENTRY(VFW_E_CANNOT_RENDER); 74 ENTRY(VFW_E_CHANGING_FORMAT); 75 ENTRY(VFW_E_NO_COLOR_KEY_SET); 76 ENTRY(VFW_E_NOT_OVERLAY_CONNECTION); 77 ENTRY(VFW_E_NOT_SAMPLE_CONNECTION); 78 ENTRY(VFW_E_PALETTE_SET); 79 ENTRY(VFW_E_COLOR_KEY_SET); 80 ENTRY(VFW_E_NO_COLOR_KEY_FOUND); 81 ENTRY(VFW_E_NO_PALETTE_AVAILABLE); 82 ENTRY(VFW_E_NO_DISPLAY_PALETTE); 83 ENTRY(VFW_E_TOO_MANY_COLORS); 84 ENTRY(VFW_E_STATE_CHANGED); 85 ENTRY(VFW_E_NOT_STOPPED); 86 ENTRY(VFW_E_NOT_PAUSED); 87 ENTRY(VFW_E_NOT_RUNNING); 88 ENTRY(VFW_E_WRONG_STATE); 89 ENTRY(VFW_E_START_TIME_AFTER_END); 90 ENTRY(VFW_E_INVALID_RECT); 91 ENTRY(VFW_E_TYPE_NOT_ACCEPTED); 92 ENTRY(VFW_E_SAMPLE_REJECTED); 93 ENTRY(VFW_E_SAMPLE_REJECTED_EOS); 94 ENTRY(VFW_S_DUPLICATE_NAME); 95 ENTRY(VFW_E_DUPLICATE_NAME); 96 ENTRY(VFW_E_TIMEOUT); 97 ENTRY(VFW_E_INVALID_FILE_FORMAT); 98 ENTRY(VFW_E_ENUM_OUT_OF_RANGE); 99 ENTRY(VFW_E_CIRCULAR_GRAPH); 100 ENTRY(VFW_E_NOT_ALLOWED_TO_SAVE); 101 ENTRY(VFW_E_TIME_ALREADY_PASSED); 102 ENTRY(VFW_E_ALREADY_CANCELLED); 103 ENTRY(VFW_E_CORRUPT_GRAPH_FILE); 104 ENTRY(VFW_E_ADVISE_ALREADY_SET); 105 ENTRY(VFW_S_STATE_INTERMEDIATE); 106 ENTRY(VFW_E_NO_MODEX_AVAILABLE); 107 ENTRY(VFW_E_NO_ADVISE_SET); 108 ENTRY(VFW_E_NO_FULLSCREEN); 109 ENTRY(VFW_E_IN_FULLSCREEN_MODE); 110 ENTRY(VFW_E_UNKNOWN_FILE_TYPE); 111 ENTRY(VFW_E_CANNOT_LOAD_SOURCE_FILTER); 112 ENTRY(VFW_S_PARTIAL_RENDER); 113 ENTRY(VFW_E_FILE_TOO_SHORT); 114 ENTRY(VFW_E_INVALID_FILE_VERSION); 115 ENTRY(VFW_S_SOME_DATA_IGNORED); 116 ENTRY(VFW_S_CONNECTIONS_DEFERRED); 117 ENTRY(VFW_E_INVALID_CLSID); 118 ENTRY(VFW_E_INVALID_MEDIA_TYPE); 119 ENTRY(VFW_E_SAMPLE_TIME_NOT_SET); 120 ENTRY(VFW_S_RESOURCE_NOT_NEEDED); 121 ENTRY(VFW_E_MEDIA_TIME_NOT_SET); 122 ENTRY(VFW_E_NO_TIME_FORMAT_SET); 123 ENTRY(VFW_E_MONO_AUDIO_HW); 124 ENTRY(VFW_S_MEDIA_TYPE_IGNORED); 125 ENTRY(VFW_E_NO_DECOMPRESSOR); 126 ENTRY(VFW_E_NO_AUDIO_HARDWARE); 127 ENTRY(VFW_S_VIDEO_NOT_RENDERED); 128 ENTRY(VFW_S_AUDIO_NOT_RENDERED); 129 ENTRY(VFW_E_RPZA); 130 ENTRY(VFW_S_RPZA); 131 ENTRY(VFW_E_PROCESSOR_NOT_SUITABLE); 132 ENTRY(VFW_E_UNSUPPORTED_AUDIO); 133 ENTRY(VFW_E_UNSUPPORTED_VIDEO); 134 ENTRY(VFW_E_MPEG_NOT_CONSTRAINED); 135 ENTRY(VFW_E_NOT_IN_GRAPH); 136 ENTRY(VFW_S_ESTIMATED); 137 ENTRY(VFW_E_NO_TIME_FORMAT); 138 ENTRY(VFW_E_READ_ONLY); 139 ENTRY(VFW_S_RESERVED); 140 ENTRY(VFW_E_BUFFER_UNDERFLOW); 141 ENTRY(VFW_E_UNSUPPORTED_STREAM); 142 ENTRY(VFW_E_NO_TRANSPORT); 143 ENTRY(VFW_S_STREAM_OFF); 144 ENTRY(VFW_S_CANT_CUE); 145 ENTRY(VFW_E_BAD_VIDEOCD); 146 ENTRY(VFW_S_NO_STOP_TIME); 147 ENTRY(VFW_E_OUT_OF_VIDEO_MEMORY); 148 ENTRY(VFW_E_VP_NEGOTIATION_FAILED); 149 ENTRY(VFW_E_DDRAW_CAPS_NOT_SUITABLE); 150 ENTRY(VFW_E_NO_VP_HARDWARE); 151 ENTRY(VFW_E_NO_CAPTURE_HARDWARE); 152 ENTRY(VFW_E_DVD_OPERATION_INHIBITED); 153 ENTRY(VFW_E_DVD_INVALIDDOMAIN); 154 ENTRY(VFW_E_DVD_NO_BUTTON); 155 ENTRY(VFW_E_DVD_GRAPHNOTREADY); 156 ENTRY(VFW_E_DVD_RENDERFAIL); 157 ENTRY(VFW_E_DVD_DECNOTENOUGH); 158 ENTRY(VFW_E_DDRAW_VERSION_NOT_SUITABLE); 159 ENTRY(VFW_E_COPYPROT_FAILED); 160 ENTRY(VFW_S_NOPREVIEWPIN); 161 ENTRY(VFW_E_TIME_EXPIRED); 162 ENTRY(VFW_S_DVD_NON_ONE_SEQUENTIAL); 163 ENTRY(VFW_E_DVD_WRONG_SPEED); 164 ENTRY(VFW_E_DVD_MENU_DOES_NOT_EXIST); 165 ENTRY(VFW_E_DVD_CMD_CANCELLED); 166 ENTRY(VFW_E_DVD_STATE_WRONG_VERSION); 167 ENTRY(VFW_E_DVD_STATE_CORRUPT); 168 ENTRY(VFW_E_DVD_STATE_WRONG_DISC); 169 ENTRY(VFW_E_DVD_INCOMPATIBLE_REGION); 170 ENTRY(VFW_E_DVD_NO_ATTRIBUTES); 171 ENTRY(VFW_E_DVD_NO_GOUP_PGC); 172 ENTRY(VFW_E_DVD_LOW_PARENTAL_LEVEL); 173 ENTRY(VFW_E_DVD_NOT_IN_KARAOKE_MODE); 174 ENTRY(VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE); 175 ENTRY(VFW_S_DVD_NOT_ACCURATE); 176 ENTRY(VFW_E_FRAME_STEP_UNSUPPORTED); 177 ENTRY(VFW_E_DVD_STREAM_DISABLED); 178 ENTRY(VFW_E_DVD_TITLE_UNKNOWN); 179 ENTRY(VFW_E_DVD_INVALID_DISC); 180 ENTRY(VFW_E_DVD_NO_RESUME_INFORMATION); 181 ENTRY(VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD); 182 ENTRY(VFW_E_PIN_ALREADY_BLOCKED); 183 ENTRY(VFW_E_CERTIFICATION_FAILURE); 184 #undef ENTRY 185 } 186 187 return NULL; 189 188 } 190 189 191 190 /*********************************************************************** 192 * AMGetErrorTextA(quartz.@)191 * AMGetErrorTextA (quartz.@) 193 192 */ 194 193 DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR pszbuf, DWORD dwBufLen) 195 194 { 196 LPCSTRlpszRes;197 DWORD len;198 199 lpszRes = hresult_to_string( hr );200 if ( lpszRes == NULL )201 return 0;202 len = (DWORD)(strlen(lpszRes)+1);203 if ( len > dwBufLen )204 return 0;205 206 memcpy( pszbuf, lpszRes, len );207 return len;195 LPCSTR lpszRes; 196 DWORD len; 197 198 lpszRes = hresult_to_string( hr ); 199 if ( lpszRes == NULL ) 200 return 0; 201 len = (DWORD)(strlen(lpszRes)+1); 202 if ( len > dwBufLen ) 203 return 0; 204 205 memcpy( pszbuf, lpszRes, len ); 206 return len; 208 207 } 209 208 210 209 /*********************************************************************** 211 * AMGetErrorTextW(quartz.@)210 * AMGetErrorTextW (quartz.@) 212 211 */ 213 212 DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR pwszbuf, DWORD dwBufLen) 214 213 { 215 CHARszBuf[MAX_ERROR_TEXT_LEN+1];216 DWORDdwLen;217 218 dwLen = AMGetErrorTextA(hr,szBuf,MAX_ERROR_TEXT_LEN);219 if ( dwLen == 0 )220 return 0;221 szBuf[dwLen] = 0;222 223 QUARTZ_strncpyAtoW( pwszbuf, szBuf, dwBufLen );224 225 return lstrlenW( pwszbuf );226 } 214 CHAR szBuf[MAX_ERROR_TEXT_LEN+1]; 215 DWORD dwLen; 216 217 dwLen = AMGetErrorTextA(hr,szBuf,MAX_ERROR_TEXT_LEN); 218 if ( dwLen == 0 ) 219 return 0; 220 szBuf[dwLen] = 0; 221 222 QUARTZ_strncpyAtoW( pwszbuf, szBuf, dwBufLen ); 223 224 return lstrlenW( pwszbuf ); 225 }  - 
      
trunk/src/quartz/complist.c
r6649 r6710 1 /* $Id: complist.c,v 1.2 2001-09-05 13:36:34 bird Exp $ */2 1 /* 3 2 * List of components. (for internal use) … … 25 24 struct QUARTZ_CompList 26 25 { 27 QUARTZ_CompListItem* pFirst; 28 QUARTZ_CompListItem* pLast; 26 QUARTZ_CompListItem* pFirst; 27 QUARTZ_CompListItem* pLast; 28 CRITICAL_SECTION csList; 29 29 }; 30 30 31 31 struct QUARTZ_CompListItem 32 32 { 33 IUnknown* punk; 34 QUARTZ_CompListItem* pNext; 35 QUARTZ_CompListItem* pPrev; 33 IUnknown* punk; 34 QUARTZ_CompListItem* pNext; 35 QUARTZ_CompListItem* pPrev; 36 void* pvData; 37 DWORD dwDataLen; 36 38 }; 37 39 … … 39 41 QUARTZ_CompList* QUARTZ_CompList_Alloc( void ) 40 42 { 41 QUARTZ_CompList* pList; 42 43 pList = (QUARTZ_CompList*)QUARTZ_AllocMem( sizeof(QUARTZ_CompList) ); 44 if ( pList != NULL ) 45 { 46 /* construct. */ 47 pList->pFirst = NULL; 48 pList->pLast = NULL; 49 } 50 51 return pList; 43 QUARTZ_CompList* pList; 44 45 pList = (QUARTZ_CompList*)QUARTZ_AllocMem( sizeof(QUARTZ_CompList) ); 46 if ( pList != NULL ) 47 { 48 /* construct. */ 49 pList->pFirst = NULL; 50 pList->pLast = NULL; 51 52 InitializeCriticalSection( &pList->csList ); 53 } 54 55 return pList; 52 56 } 53 57 54 58 void QUARTZ_CompList_Free( QUARTZ_CompList* pList ) 55 59 { 56 QUARTZ_CompListItem* pCur; 57 QUARTZ_CompListItem* pNext; 58 59 if ( pList != NULL ) 60 { 61 pCur = pList->pFirst; 62 while ( pCur != NULL ) 63 { 64 pNext = pCur->pNext; 65 if ( pCur->punk != NULL ) 66 IUnknown_Release( pCur->punk ); 67 QUARTZ_FreeMem( pCur ); 68 pCur = pNext; 69 } 70 QUARTZ_FreeMem( pList ); 71 } 72 } 73 74 QUARTZ_CompList* QUARTZ_CompList_Dup( QUARTZ_CompList* pList ) 75 { 76 QUARTZ_CompList* pNewList; 77 QUARTZ_CompListItem* pCur; 78 HRESULT hr; 79 80 pNewList = QUARTZ_CompList_Alloc(); 81 if ( pNewList == NULL ) 82 return NULL; 83 84 pCur = pList->pFirst; 85 while ( pCur != NULL ) 86 { 87 if ( pCur->punk != NULL ) 88 { 89 hr = QUARTZ_CompList_AddComp( pNewList, pCur->punk ); 90 if ( FAILED(hr) ) 91 { 92 QUARTZ_CompList_Free( pNewList ); 93 return NULL; 94 } 95 } 96 pCur = pCur->pNext; 97 } 98 99 return pNewList; 100 } 101 102 HRESULT QUARTZ_CompList_AddComp( QUARTZ_CompList* pList, IUnknown* punk ) 103 { 104 QUARTZ_CompListItem* pItem; 105 106 pItem = (QUARTZ_CompListItem*)QUARTZ_AllocMem( sizeof(QUARTZ_CompListItem) ); 107 if ( pItem == NULL ) 108 return E_OUTOFMEMORY; /* out of memory. */ 109 pItem->punk = punk; IUnknown_AddRef(punk); 110 111 if ( pList->pFirst != NULL ) 112 pList->pFirst->pPrev = pItem; 113 else 114 pList->pLast = pItem; 115 pList->pFirst = pItem; 116 pItem->pNext = pList->pFirst; 117 pItem->pPrev = NULL; 118 119 return S_OK; 60 QUARTZ_CompListItem* pCur; 61 QUARTZ_CompListItem* pNext; 62 63 if ( pList != NULL ) 64 { 65 pCur = pList->pFirst; 66 while ( pCur != NULL ) 67 { 68 pNext = pCur->pNext; 69 if ( pCur->punk != NULL ) 70 IUnknown_Release( pCur->punk ); 71 if ( pCur->pvData != NULL ) 72 QUARTZ_FreeMem( pCur->pvData ); 73 QUARTZ_FreeMem( pCur ); 74 pCur = pNext; 75 } 76 77 DeleteCriticalSection( &pList->csList ); 78 79 QUARTZ_FreeMem( pList ); 80 } 81 } 82 83 void QUARTZ_CompList_Lock( QUARTZ_CompList* pList ) 84 { 85 EnterCriticalSection( &pList->csList ); 86 } 87 88 void QUARTZ_CompList_Unlock( QUARTZ_CompList* pList ) 89 { 90 LeaveCriticalSection( &pList->csList ); 91 } 92 93 QUARTZ_CompList* QUARTZ_CompList_Dup( 94 const QUARTZ_CompList* pList, BOOL fDupData ) 95 { 96 QUARTZ_CompList* pNewList; 97 const QUARTZ_CompListItem* pCur; 98 HRESULT hr; 99 100 pNewList = QUARTZ_CompList_Alloc(); 101 if ( pNewList == NULL ) 102 return NULL; 103 104 pCur = pList->pFirst; 105 while ( pCur != NULL ) 106 { 107 if ( pCur->punk != NULL ) 108 { 109 if ( fDupData ) 110 hr = QUARTZ_CompList_AddComp( 111 pNewList, pCur->punk, 112 pCur->pvData, pCur->dwDataLen ); 113 else 114 hr = QUARTZ_CompList_AddComp( 115 pNewList, pCur->punk, NULL, 0 ); 116 if ( FAILED(hr) ) 117 { 118 QUARTZ_CompList_Free( pNewList ); 119 return NULL; 120 } 121 } 122 pCur = pCur->pNext; 123 } 124 125 return pNewList; 126 } 127 128 HRESULT QUARTZ_CompList_AddComp( 129 QUARTZ_CompList* pList, IUnknown* punk, 130 const void* pvData, DWORD dwDataLen ) 131 { 132 QUARTZ_CompListItem* pItem; 133 134 pItem = (QUARTZ_CompListItem*)QUARTZ_AllocMem( sizeof(QUARTZ_CompListItem) ); 135 if ( pItem == NULL ) 136 return E_OUTOFMEMORY; /* out of memory. */ 137 138 pItem->pvData = NULL; 139 pItem->dwDataLen = 0; 140 if ( pvData != NULL ) 141 { 142 pItem->pvData = (void*)QUARTZ_AllocMem( dwDataLen ); 143 if ( pItem->pvData == NULL ) 144 { 145 QUARTZ_FreeMem( pItem ); 146 return E_OUTOFMEMORY; 147 } 148 memcpy( pItem->pvData, pvData, dwDataLen ); 149 pItem->dwDataLen = dwDataLen; 150 } 151 152 pItem->punk = punk; IUnknown_AddRef(punk); 153 154 if ( pList->pFirst != NULL ) 155 pList->pFirst->pPrev = pItem; 156 else 157 pList->pLast = pItem; 158 pItem->pNext = pList->pFirst; 159 pList->pFirst = pItem; 160 pItem->pPrev = NULL; 161 162 return S_OK; 120 163 } 121 164 122 165 HRESULT QUARTZ_CompList_RemoveComp( QUARTZ_CompList* pList, IUnknown* punk ) 123 166 { 124 QUARTZ_CompListItem* pCur; 125 126 pCur = QUARTZ_CompList_SearchComp( pList, punk ); 127 if ( pCur == NULL ) 128 return S_FALSE; /* already removed. */ 129 130 /* remove from list. */ 131 if ( pCur->pNext != NULL ) 132 pCur->pNext->pPrev = pCur->pPrev; 133 else 134 pList->pLast = pCur->pPrev; 135 if ( pCur->pPrev != NULL ) 136 pCur->pPrev->pNext = pCur->pNext; 137 else 138 pList->pFirst = pCur->pNext; 139 140 /* release this item. */ 141 if ( pCur->punk != NULL ) 142 IUnknown_Release( pCur->punk ); 143 QUARTZ_FreeMem( pCur ); 144 145 return S_OK; 167 QUARTZ_CompListItem* pCur; 168 169 pCur = QUARTZ_CompList_SearchComp( pList, punk ); 170 if ( pCur == NULL ) 171 return S_FALSE; /* already removed. */ 172 173 /* remove from list. */ 174 if ( pCur->pNext != NULL ) 175 pCur->pNext->pPrev = pCur->pPrev; 176 else 177 pList->pLast = pCur->pPrev; 178 if ( pCur->pPrev != NULL ) 179 pCur->pPrev->pNext = pCur->pNext; 180 else 181 pList->pFirst = pCur->pNext; 182 183 /* release this item. */ 184 if ( pCur->punk != NULL ) 185 IUnknown_Release( pCur->punk ); 186 if ( pCur->pvData != NULL ) 187 QUARTZ_FreeMem( pCur->pvData ); 188 QUARTZ_FreeMem( pCur ); 189 190 return S_OK; 146 191 } 147 192 148 193 QUARTZ_CompListItem* QUARTZ_CompList_SearchComp( 149 QUARTZ_CompList* pList, IUnknown* punk ) 150 { 151 QUARTZ_CompListItem* pCur; 152 153 pCur = pList->pFirst; 154 while ( pCur != NULL ) 155 { 156 if ( pCur->punk == punk ) 157 return pCur; 158 pCur = pCur->pNext; 159 } 160 161 return NULL; 194 QUARTZ_CompList* pList, IUnknown* punk ) 195 { 196 QUARTZ_CompListItem* pCur; 197 198 pCur = pList->pFirst; 199 while ( pCur != NULL ) 200 { 201 if ( pCur->punk == punk ) 202 return pCur; 203 pCur = pCur->pNext; 204 } 205 206 return NULL; 207 } 208 209 QUARTZ_CompListItem* QUARTZ_CompList_SearchData( 210 QUARTZ_CompList* pList, const void* pvData, DWORD dwDataLen ) 211 { 212 QUARTZ_CompListItem* pCur; 213 214 pCur = pList->pFirst; 215 while ( pCur != NULL ) 216 { 217 if ( pCur->dwDataLen == dwDataLen && 218 !memcmp( pCur->pvData, pvData, dwDataLen ) ) 219 return pCur; 220 pCur = pCur->pNext; 221 } 222 223 return NULL; 162 224 } 163 225 164 226 QUARTZ_CompListItem* QUARTZ_CompList_GetFirst( 165 QUARTZ_CompList* pList )166 { 167 return pList->pFirst;227 QUARTZ_CompList* pList ) 228 { 229 return pList->pFirst; 168 230 } 169 231 170 232 QUARTZ_CompListItem* QUARTZ_CompList_GetNext( 171 QUARTZ_CompList* pList, QUARTZ_CompListItem* pPrev )172 { 173 return pPrev->pNext;233 QUARTZ_CompList* pList, QUARTZ_CompListItem* pPrev ) 234 { 235 return pPrev->pNext; 174 236 } 175 237 176 238 IUnknown* QUARTZ_CompList_GetItemPtr( QUARTZ_CompListItem* pItem ) 177 239 { 178 return pItem->punk; 179 } 240 return pItem->punk; 241 } 242 243 const void* QUARTZ_CompList_GetDataPtr( QUARTZ_CompListItem* pItem ) 244 { 245 return pItem->pvData; 246 } 247 248 DWORD QUARTZ_CompList_GetDataLength( QUARTZ_CompListItem* pItem ) 249 { 250 return pItem->dwDataLen; 251 }  - 
      
trunk/src/quartz/complist.h
r6578 r6710 13 13 QUARTZ_CompList* QUARTZ_CompList_Alloc( void ); 14 14 void QUARTZ_CompList_Free( QUARTZ_CompList* pList ); 15 QUARTZ_CompList* QUARTZ_CompList_Dup( QUARTZ_CompList* pList ); 16 HRESULT QUARTZ_CompList_AddComp( QUARTZ_CompList* pList, IUnknown* punk ); 15 void QUARTZ_CompList_Lock( QUARTZ_CompList* pList ); 16 void QUARTZ_CompList_Unlock( QUARTZ_CompList* pList ); 17 18 QUARTZ_CompList* QUARTZ_CompList_Dup( 19 const QUARTZ_CompList* pList, BOOL fDupData ); 20 HRESULT QUARTZ_CompList_AddComp( 21 QUARTZ_CompList* pList, IUnknown* punk, 22 const void* pvData, DWORD dwDataLen ); 17 23 HRESULT QUARTZ_CompList_RemoveComp( QUARTZ_CompList* pList, IUnknown* punk ); 18 24 QUARTZ_CompListItem* QUARTZ_CompList_SearchComp( 19 25 QUARTZ_CompList* pList, IUnknown* punk ); 26 QUARTZ_CompListItem* QUARTZ_CompList_SearchData( 27 QUARTZ_CompList* pList, const void* pvData, DWORD dwDataLen ); 20 28 QUARTZ_CompListItem* QUARTZ_CompList_GetFirst( 21 29 QUARTZ_CompList* pList ); … … 23 31 QUARTZ_CompList* pList, QUARTZ_CompListItem* pPrev ); 24 32 IUnknown* QUARTZ_CompList_GetItemPtr( QUARTZ_CompListItem* pItem ); 33 const void* QUARTZ_CompList_GetDataPtr( QUARTZ_CompListItem* pItem ); 34 DWORD QUARTZ_CompList_GetDataLength( QUARTZ_CompListItem* pItem ); 25 35 26 36  - 
      
trunk/src/quartz/fgraph.c
r6649 r6710 1 /* $Id: fgraph.c,v 1.3 2001-09-05 13:36:34 bird Exp $ */2 1 /* 3 2 * Implementation of CLSID_FilterGraph. 4 *5 * FIXME - stub.6 3 * 7 4 * hidenori@a2.ctktv.ne.jp … … 29 26 static QUARTZ_IFEntry IFEntries[] = 30 27 { 28 { &IID_IPersist, offsetof(CFilterGraph,persist)-offsetof(CFilterGraph,unk) }, 29 { &IID_IDispatch, offsetof(CFilterGraph,disp)-offsetof(CFilterGraph,unk) }, 31 30 { &IID_IFilterGraph, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) }, 32 31 { &IID_IGraphBuilder, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) }, 33 32 { &IID_IFilterGraph2, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) }, 33 { &IID_IGraphVersion, offsetof(CFilterGraph,graphversion)-offsetof(CFilterGraph,unk) }, 34 34 { &IID_IMediaControl, offsetof(CFilterGraph,mediacontrol)-offsetof(CFilterGraph,unk) }, 35 { &IID_IMediaFilter, offsetof(CFilterGraph,mediafilter)-offsetof(CFilterGraph,unk) }, 35 36 { &IID_IMediaEvent, offsetof(CFilterGraph,mediaevent)-offsetof(CFilterGraph,unk) }, 36 37 { &IID_IMediaEventEx, offsetof(CFilterGraph,mediaevent)-offsetof(CFilterGraph,unk) }, 38 { &IID_IMediaEventSink, offsetof(CFilterGraph,mediaeventsink)-offsetof(CFilterGraph,unk) }, 37 39 { &IID_IMediaPosition, offsetof(CFilterGraph,mediaposition)-offsetof(CFilterGraph,unk) }, 38 40 { &IID_IMediaSeeking, offsetof(CFilterGraph,mediaseeking)-offsetof(CFilterGraph,unk) }, 39 41 { &IID_IBasicVideo, offsetof(CFilterGraph,basvid)-offsetof(CFilterGraph,unk) }, 42 { &IID_IBasicVideo2, offsetof(CFilterGraph,basvid)-offsetof(CFilterGraph,unk) }, 40 43 { &IID_IBasicAudio, offsetof(CFilterGraph,basaud)-offsetof(CFilterGraph,unk) }, 41 44 { &IID_IVideoWindow, offsetof(CFilterGraph,vidwin)-offsetof(CFilterGraph,unk) }, 42 45 }; 43 46 47 48 struct FGInitEntry 49 { 50 HRESULT (*pInit)(CFilterGraph*); 51 void (*pUninit)(CFilterGraph*); 52 }; 53 54 static const struct FGInitEntry FGRAPH_Init[] = 55 { 56 #define FGENT(a) {&CFilterGraph_Init##a,&CFilterGraph_Uninit##a}, 57 58 FGENT(IPersist) 59 FGENT(IDispatch) 60 FGENT(IFilterGraph2) 61 FGENT(IGraphVersion) 62 FGENT(IMediaControl) 63 FGENT(IMediaFilter) 64 FGENT(IMediaEventEx) 65 FGENT(IMediaEventSink) 66 FGENT(IMediaPosition) 67 FGENT(IMediaSeeking) 68 FGENT(IBasicVideo2) 69 FGENT(IBasicAudio) 70 FGENT(IVideoWindow) 71 72 #undef FGENT 73 { NULL, NULL }, 74 }; 75 76 77 static void QUARTZ_DestroyFilterGraph(IUnknown* punk) 78 { 79 CFilterGraph_THIS(punk,unk); 80 int i; 81 82 /* At first, call Stop. */ 83 IMediaControl_Stop( CFilterGraph_IMediaControl(This) ); 84 IMediaFilter_Stop( CFilterGraph_IMediaFilter(This) ); 85 86 i = 0; 87 while ( FGRAPH_Init[i].pInit != NULL ) 88 { 89 FGRAPH_Init[i].pUninit( This ); 90 i++; 91 } 92 93 TRACE( "succeeded.\n" ); 94 } 95 44 96 HRESULT QUARTZ_CreateFilterGraph(IUnknown* punkOuter,void** ppobj) 45 97 { 46 CFilterGraph* pfg; 98 CFilterGraph* pfg; 99 HRESULT hr; 100 int i; 47 101 48 TRACE("(%p,%p)\n",punkOuter,ppobj);102 TRACE("(%p,%p)\n",punkOuter,ppobj); 49 103 50 pfg = (CFilterGraph*)QUARTZ_AllocObj( sizeof(CFilterGraph) );51 if ( pfg == NULL )52 return E_OUTOFMEMORY;104 pfg = (CFilterGraph*)QUARTZ_AllocObj( sizeof(CFilterGraph) ); 105 if ( pfg == NULL ) 106 return E_OUTOFMEMORY; 53 107 54 QUARTZ_IUnkInit( &pfg->unk, punkOuter ); 55 CFilterGraph_InitIFilterGraph2( pfg ); 56 CFilterGraph_InitIMediaControl( pfg ); 57 CFilterGraph_InitIMediaEventEx( pfg ); 58 CFilterGraph_InitIMediaPosition( pfg ); 59 CFilterGraph_InitIMediaSeeking( pfg ); 60 CFilterGraph_InitIBasicVideo2( pfg ); 61 CFilterGraph_InitIBasicAudio( pfg ); 62 CFilterGraph_InitIVideoWindow( pfg ); 108 QUARTZ_IUnkInit( &pfg->unk, punkOuter ); 63 109 64 pfg->unk.pEntries = IFEntries; 65 pfg->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 110 i = 0; 111 hr = NOERROR; 112 while ( FGRAPH_Init[i].pInit != NULL ) 113 { 114 hr = FGRAPH_Init[i].pInit( pfg ); 115 if ( FAILED(hr) ) 116 break; 117 i++; 118 } 66 119 67 *ppobj = (void*)(&pfg->unk); 120 if ( FAILED(hr) ) 121 { 122 while ( --i >= 0 ) 123 FGRAPH_Init[i].pUninit( pfg ); 124 QUARTZ_FreeObj( pfg ); 125 return hr; 126 } 68 127 69 return S_OK; 128 pfg->unk.pEntries = IFEntries; 129 pfg->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 130 pfg->unk.pOnFinalRelease = QUARTZ_DestroyFilterGraph; 131 132 *ppobj = (void*)(&pfg->unk); 133 134 return S_OK; 70 135 } 136 137  - 
      
trunk/src/quartz/fgraph.h
r6578 r6710 8 8 9 9 IUnknown 10 + IPersist 11 + IDispatch 10 12 + IFilterGraph - IGraphBuilder - IFilterGraph2 13 + IGraphVersion 11 14 + IDispatch - IMediaControl 15 + IPersist - IMediaFilter 12 16 + IDispatch - IMediaEvent - IMediaEventEx 17 + IMediaEventSink 13 18 + IDispatch - IMediaPosition 14 19 + IMediaSeeking 15 + IDispatch - IBasicVideo (pass to a renderer)20 + IDispatch - IBasicVideo[2] (pass to a renderer) 16 21 + IDispatch - IBasicAudio (pass to a renderer) 17 22 + IDispatch - IVideoWindow (pass to a renderer) 23 (following interfaces are not implemented) 24 + IMarshal 25 + IFilterMapper2 - IFilterMapper3 26 FIXME - Are there any missing interfaces??? 18 27 */ 19 28 20 29 #include "iunk.h" 30 #include "complist.h" 31 32 33 typedef struct FG_IPersistImpl 34 { 35 ICOM_VFIELD(IPersist); 36 } FG_IPersistImpl; 37 38 typedef struct FG_IDispatchImpl 39 { 40 ICOM_VFIELD(IDispatch); 41 } FG_IDispatchImpl; 21 42 22 43 typedef struct FG_IFilterGraph2Impl … … 25 46 } FG_IFilterGraph2Impl; 26 47 48 typedef struct FG_IGraphVersionImpl 49 { 50 ICOM_VFIELD(IGraphVersion); 51 } FG_IGraphVersionImpl; 52 27 53 typedef struct FG_IMediaControlImpl 28 54 { … … 30 56 } FG_IMediaControlImpl; 31 57 58 typedef struct FG_IMediaFilterImpl 59 { 60 ICOM_VFIELD(IMediaFilter); 61 } FG_IMediaFilterImpl; 62 32 63 typedef struct FG_IMediaEventImpl 33 64 { 34 65 ICOM_VFIELD(IMediaEventEx); 35 66 } FG_IMediaEventImpl; 67 68 typedef struct FG_IMediaEventSinkImpl 69 { 70 ICOM_VFIELD(IMediaEventSink); 71 } FG_IMediaEventSinkImpl; 36 72 37 73 typedef struct FG_IMediaPositionImpl … … 64 100 { 65 101 QUARTZ_IUnkImpl unk; 102 FG_IPersistImpl persist; 103 FG_IDispatchImpl disp; 66 104 FG_IFilterGraph2Impl fgraph; 105 FG_IGraphVersionImpl graphversion; 67 106 FG_IMediaControlImpl mediacontrol; 107 FG_IMediaFilterImpl mediafilter; 68 108 FG_IMediaEventImpl mediaevent; 109 FG_IMediaEventSinkImpl mediaeventsink; 69 110 FG_IMediaPositionImpl mediaposition; 70 111 FG_IMediaSeekingImpl mediaseeking; … … 73 114 FG_IVideoWindowImpl vidwin; 74 115 116 /* IDispatch fields. */ 75 117 /* IFilterGraph2 fields. */ 118 QUARTZ_CompList* m_pFilterList; 119 /* IGraphVersion fields. */ 120 CRITICAL_SECTION m_csGraphVersion; 121 LONG m_lGraphVersion; 76 122 /* IMediaControl fields. */ 123 /* IMediaFilter fields. */ 124 CRITICAL_SECTION m_csGraphState; 125 FILTER_STATE m_stateGraph; /* must NOT accessed directly! */ 77 126 /* IMediaEvent fields. */ 127 HANDLE m_hMediaEvent; 128 /* IMediaEventSink fields. */ 78 129 /* IMediaPosition fields. */ 79 130 /* IMediaSeeking fields. */ 80 /* IBasicVideo fields. */131 /* IBasicVideo2 fields. */ 81 132 /* IBasicAudio fields. */ 82 133 /* IVideoWindow fields. */ … … 84 135 85 136 #define CFilterGraph_THIS(iface,member) CFilterGraph* This = ((CFilterGraph*)(((char*)iface)-offsetof(CFilterGraph,member))) 137 #define CFilterGraph_IPersist(th) ((IPersist*)&((th)->persist)) 138 #define CFilterGraph_IDispatch(th) ((IDispatch*)&((th)->disp)) 139 #define CFilterGraph_IFilterGraph2(th) ((IFilterGraph2*)&((th)->fgraph)) 140 #define CFilterGraph_IMediaFilter(th) ((IMediaFilter*)&((th)->mediafilter)) 141 #define CFilterGraph_IMediaControl(th) ((IMediaControl*)&((th)->mediacontrol)) 86 142 87 143 HRESULT QUARTZ_CreateFilterGraph(IUnknown* punkOuter,void** ppobj); 88 144 89 void CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg ); 90 void CFilterGraph_InitIMediaControl( CFilterGraph* pfg ); 91 void CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg ); 92 void CFilterGraph_InitIMediaPosition( CFilterGraph* pfg ); 93 void CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg ); 94 void CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg ); 95 void CFilterGraph_InitIBasicAudio( CFilterGraph* pfg ); 96 void CFilterGraph_InitIVideoWindow( CFilterGraph* pfg ); 145 HRESULT CFilterGraph_InitIPersist( CFilterGraph* pfg ); 146 void CFilterGraph_UninitIPersist( CFilterGraph* pfg ); 147 HRESULT CFilterGraph_InitIDispatch( CFilterGraph* pfg ); 148 void CFilterGraph_UninitIDispatch( CFilterGraph* pfg ); 149 HRESULT CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg ); 150 void CFilterGraph_UninitIFilterGraph2( CFilterGraph* pfg ); 151 HRESULT CFilterGraph_InitIGraphVersion( CFilterGraph* pfg ); 152 void CFilterGraph_UninitIGraphVersion( CFilterGraph* pfg ); 153 HRESULT CFilterGraph_InitIMediaControl( CFilterGraph* pfg ); 154 void CFilterGraph_UninitIMediaControl( CFilterGraph* pfg ); 155 HRESULT CFilterGraph_InitIMediaFilter( CFilterGraph* pfg ); 156 void CFilterGraph_UninitIMediaFilter( CFilterGraph* pfg ); 157 HRESULT CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg ); 158 void CFilterGraph_UninitIMediaEventEx( CFilterGraph* pfg ); 159 HRESULT CFilterGraph_InitIMediaEventSink( CFilterGraph* pfg ); 160 void CFilterGraph_UninitIMediaEventSink( CFilterGraph* pfg ); 161 HRESULT CFilterGraph_InitIMediaPosition( CFilterGraph* pfg ); 162 void CFilterGraph_UninitIMediaPosition( CFilterGraph* pfg ); 163 HRESULT CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg ); 164 void CFilterGraph_UninitIMediaSeeking( CFilterGraph* pfg ); 165 HRESULT CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg ); 166 void CFilterGraph_UninitIBasicVideo2( CFilterGraph* pfg ); 167 HRESULT CFilterGraph_InitIBasicAudio( CFilterGraph* pfg ); 168 void CFilterGraph_UninitIBasicAudio( CFilterGraph* pfg ); 169 HRESULT CFilterGraph_InitIVideoWindow( CFilterGraph* pfg ); 170 void CFilterGraph_UninitIVideoWindow( CFilterGraph* pfg ); 97 171 98 172  - 
      
trunk/src/quartz/guid.c
r6649 r6710 1 /* $Id: guid.c,v 1.3 2001-09-05 13:36:35 bird Exp $ */2 1 // This causes all the DEFINE_GUID macros to instantiate their GUID's 3 2 #define INITGUID … … 14 13 #include "uuids.h" 15 14 #include "control.h" 15 #include "wine/obj_property.h" 16 #include "wine/obj_propertystorage.h"  - 
      
trunk/src/quartz/ibasaud.c
r6649 r6710 1 /* $Id: ibasaud.c,v 1.2 2001-09-05 13:36:35 bird Exp $ */2 1 /* 3 2 * Implementation of IBasicAudio for FilterGraph. … … 31 30 IBasicAudio_fnQueryInterface(IBasicAudio* iface,REFIID riid,void** ppobj) 32 31 { 33 CFilterGraph_THIS(iface,basaud);32 CFilterGraph_THIS(iface,basaud); 34 33 35 TRACE("(%p)->()\n",This);34 TRACE("(%p)->()\n",This); 36 35 37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);36 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 38 37 } 39 38 … … 41 40 IBasicAudio_fnAddRef(IBasicAudio* iface) 42 41 { 43 CFilterGraph_THIS(iface,basaud);42 CFilterGraph_THIS(iface,basaud); 44 43 45 TRACE("(%p)->()\n",This);44 TRACE("(%p)->()\n",This); 46 45 47 return IUnknown_AddRef(This->unk.punkControl);46 return IUnknown_AddRef(This->unk.punkControl); 48 47 } 49 48 … … 51 50 IBasicAudio_fnRelease(IBasicAudio* iface) 52 51 { 53 CFilterGraph_THIS(iface,basaud);52 CFilterGraph_THIS(iface,basaud); 54 53 55 TRACE("(%p)->()\n",This);54 TRACE("(%p)->()\n",This); 56 55 57 return IUnknown_Release(This->unk.punkControl);56 return IUnknown_Release(This->unk.punkControl); 58 57 } 59 58 … … 61 60 IBasicAudio_fnGetTypeInfoCount(IBasicAudio* iface,UINT* pcTypeInfo) 62 61 { 63 CFilterGraph_THIS(iface,basaud);62 CFilterGraph_THIS(iface,basaud); 64 63 65 FIXME("(%p)->()\n",This);64 FIXME("(%p)->()\n",This); 66 65 67 return E_NOTIMPL;66 return E_NOTIMPL; 68 67 } 69 68 … … 71 70 IBasicAudio_fnGetTypeInfo(IBasicAudio* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj) 72 71 { 73 CFilterGraph_THIS(iface,basaud);72 CFilterGraph_THIS(iface,basaud); 74 73 75 FIXME("(%p)->()\n",This);74 FIXME("(%p)->()\n",This); 76 75 77 return E_NOTIMPL;76 return E_NOTIMPL; 78 77 } 79 78 … … 81 80 IBasicAudio_fnGetIDsOfNames(IBasicAudio* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId) 82 81 { 83 CFilterGraph_THIS(iface,basaud);82 CFilterGraph_THIS(iface,basaud); 84 83 85 FIXME("(%p)->()\n",This);84 FIXME("(%p)->()\n",This); 86 85 87 return E_NOTIMPL;86 return E_NOTIMPL; 88 87 } 89 88 … … 91 90 IBasicAudio_fnInvoke(IBasicAudio* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr) 92 91 { 93 CFilterGraph_THIS(iface,basaud);92 CFilterGraph_THIS(iface,basaud); 94 93 95 FIXME("(%p)->()\n",This);94 FIXME("(%p)->()\n",This); 96 95 97 return E_NOTIMPL;96 return E_NOTIMPL; 98 97 } 99 98 … … 102 101 IBasicAudio_fnput_Volume(IBasicAudio* iface,long lVol) 103 102 { 104 CFilterGraph_THIS(iface,basaud);103 CFilterGraph_THIS(iface,basaud); 105 104 106 FIXME("(%p)->()\n",This);105 FIXME("(%p)->()\n",This); 107 106 108 return E_NOTIMPL;107 return E_NOTIMPL; 109 108 } 110 109 … … 112 111 IBasicAudio_fnget_Volume(IBasicAudio* iface,long* plVol) 113 112 { 114 CFilterGraph_THIS(iface,basaud);113 CFilterGraph_THIS(iface,basaud); 115 114 116 FIXME("(%p)->()\n",This);115 FIXME("(%p)->()\n",This); 117 116 118 return E_NOTIMPL;117 return E_NOTIMPL; 119 118 } 120 119 … … 122 121 IBasicAudio_fnput_Balance(IBasicAudio* iface,long lBalance) 123 122 { 124 CFilterGraph_THIS(iface,basaud);123 CFilterGraph_THIS(iface,basaud); 125 124 126 FIXME("(%p)->()\n",This);125 FIXME("(%p)->()\n",This); 127 126 128 return E_NOTIMPL;127 return E_NOTIMPL; 129 128 } 130 129 … … 132 131 IBasicAudio_fnget_Balance(IBasicAudio* iface,long* plBalance) 133 132 { 134 CFilterGraph_THIS(iface,basaud);133 CFilterGraph_THIS(iface,basaud); 135 134 136 FIXME("(%p)->()\n",This);135 FIXME("(%p)->()\n",This); 137 136 138 return E_NOTIMPL;137 return E_NOTIMPL; 139 138 } 140 139 … … 142 141 static ICOM_VTABLE(IBasicAudio) ibasicaudio = 143 142 { 144 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE145 /* IUnknown fields */146 IBasicAudio_fnQueryInterface,147 IBasicAudio_fnAddRef,148 IBasicAudio_fnRelease,149 /* IDispatch fields */150 IBasicAudio_fnGetTypeInfoCount,151 IBasicAudio_fnGetTypeInfo,152 IBasicAudio_fnGetIDsOfNames,153 IBasicAudio_fnInvoke,154 /* IBasicAudio fields */155 IBasicAudio_fnput_Volume,156 IBasicAudio_fnget_Volume,157 IBasicAudio_fnput_Balance,158 IBasicAudio_fnget_Balance,143 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 144 /* IUnknown fields */ 145 IBasicAudio_fnQueryInterface, 146 IBasicAudio_fnAddRef, 147 IBasicAudio_fnRelease, 148 /* IDispatch fields */ 149 IBasicAudio_fnGetTypeInfoCount, 150 IBasicAudio_fnGetTypeInfo, 151 IBasicAudio_fnGetIDsOfNames, 152 IBasicAudio_fnInvoke, 153 /* IBasicAudio fields */ 154 IBasicAudio_fnput_Volume, 155 IBasicAudio_fnget_Volume, 156 IBasicAudio_fnput_Balance, 157 IBasicAudio_fnget_Balance, 159 158 }; 160 159 161 160 162 voidCFilterGraph_InitIBasicAudio( CFilterGraph* pfg )161 HRESULT CFilterGraph_InitIBasicAudio( CFilterGraph* pfg ) 163 162 { 164 TRACE("(%p)\n",pfg); 165 ICOM_VTBL(&pfg->basaud) = &ibasicaudio; 163 TRACE("(%p)\n",pfg); 164 ICOM_VTBL(&pfg->basaud) = &ibasicaudio; 165 166 return NOERROR; 166 167 } 167 168 169 void CFilterGraph_UninitIBasicAudio( CFilterGraph* pfg ) 170 { 171 TRACE("(%p)\n",pfg); 172 } 173  - 
      
trunk/src/quartz/ibasvid.c
r6649 r6710 1 /* $Id: ibasvid.c,v 1.2 2001-09-05 13:36:35 bird Exp $ */2 1 /* 3 2 * Implementation of IBasicVideo2 for FilterGraph. … … 30 29 IBasicVideo2_fnQueryInterface(IBasicVideo2* iface,REFIID riid,void** ppobj) 31 30 { 32 CFilterGraph_THIS(iface,basvid);33 34 TRACE("(%p)->()\n",This);35 36 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);31 CFilterGraph_THIS(iface,basvid); 32 33 TRACE("(%p)->()\n",This); 34 35 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 37 36 } 38 37 … … 40 39 IBasicVideo2_fnAddRef(IBasicVideo2* iface) 41 40 { 42 CFilterGraph_THIS(iface,basvid);43 44 TRACE("(%p)->()\n",This);45 46 return IUnknown_AddRef(This->unk.punkControl);41 CFilterGraph_THIS(iface,basvid); 42 43 TRACE("(%p)->()\n",This); 44 45 return IUnknown_AddRef(This->unk.punkControl); 47 46 } 48 47 … … 50 49 IBasicVideo2_fnRelease(IBasicVideo2* iface) 51 50 { 52 CFilterGraph_THIS(iface,basvid);53 54 TRACE("(%p)->()\n",This);55 56 return IUnknown_Release(This->unk.punkControl);51 CFilterGraph_THIS(iface,basvid); 52 53 TRACE("(%p)->()\n",This); 54 55 return IUnknown_Release(This->unk.punkControl); 57 56 } 58 57 … … 60 59 IBasicVideo2_fnGetTypeInfoCount(IBasicVideo2* iface,UINT* pcTypeInfo) 61 60 { 62 CFilterGraph_THIS(iface,basvid);63 64 FIXME("(%p)->()\n",This);65 66 return E_NOTIMPL;61 CFilterGraph_THIS(iface,basvid); 62 63 FIXME("(%p)->()\n",This); 64 65 return E_NOTIMPL; 67 66 } 68 67 … … 70 69 IBasicVideo2_fnGetTypeInfo(IBasicVideo2* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj) 71 70 { 72 CFilterGraph_THIS(iface,basvid);73 74 FIXME("(%p)->()\n",This);75 76 return E_NOTIMPL;71 CFilterGraph_THIS(iface,basvid); 72 73 FIXME("(%p)->()\n",This); 74 75 return E_NOTIMPL; 77 76 } 78 77 … … 80 79 IBasicVideo2_fnGetIDsOfNames(IBasicVideo2* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId) 81 80 { 82 CFilterGraph_THIS(iface,basvid);83 84 FIXME("(%p)->()\n",This);85 86 return E_NOTIMPL;81 CFilterGraph_THIS(iface,basvid); 82 83 FIXME("(%p)->()\n",This); 84 85 return E_NOTIMPL; 87 86 } 88 87 … … 90 89 IBasicVideo2_fnInvoke(IBasicVideo2* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr) 91 90 { 92 CFilterGraph_THIS(iface,basvid);93 94 FIXME("(%p)->()\n",This);95 96 return E_NOTIMPL;91 CFilterGraph_THIS(iface,basvid); 92 93 FIXME("(%p)->()\n",This); 94 95 return E_NOTIMPL; 97 96 } 98 97 … … 101 100 IBasicVideo2_fnget_AvgTimePerFrame(IBasicVideo2* iface,REFTIME* prefTime) 102 101 { 103 CFilterGraph_THIS(iface,basvid);104 105 FIXME("(%p)->()\n",This);106 107 return E_NOTIMPL;102 CFilterGraph_THIS(iface,basvid); 103 104 FIXME("(%p)->()\n",This); 105 106 return E_NOTIMPL; 108 107 } 109 108 … … 111 110 IBasicVideo2_fnget_BitRate(IBasicVideo2* iface,long* plRate) 112 111 { 113 CFilterGraph_THIS(iface,basvid);114 115 FIXME("(%p)->()\n",This);116 117 return E_NOTIMPL;112 CFilterGraph_THIS(iface,basvid); 113 114 FIXME("(%p)->()\n",This); 115 116 return E_NOTIMPL; 118 117 } 119 118 … … 121 120 IBasicVideo2_fnget_BitErrorRate(IBasicVideo2* iface,long* plRate) 122 121 { 123 CFilterGraph_THIS(iface,basvid);124 125 FIXME("(%p)->()\n",This);126 127 return E_NOTIMPL;122 CFilterGraph_THIS(iface,basvid); 123 124 FIXME("(%p)->()\n",This); 125 126 return E_NOTIMPL; 128 127 } 129 128 … … 131 130 IBasicVideo2_fnget_VideoWidth(IBasicVideo2* iface,long* plWidth) 132 131 { 133 CFilterGraph_THIS(iface,basvid);134 135 FIXME("(%p)->()\n",This);136 137 return E_NOTIMPL;132 CFilterGraph_THIS(iface,basvid); 133 134 FIXME("(%p)->()\n",This); 135 136 return E_NOTIMPL; 138 137 } 139 138 … … 141 140 IBasicVideo2_fnget_VideoHeight(IBasicVideo2* iface,long* plHeight) 142 141 { 143 CFilterGraph_THIS(iface,basvid);144 145 FIXME("(%p)->()\n",This);146 147 return E_NOTIMPL;142 CFilterGraph_THIS(iface,basvid); 143 144 FIXME("(%p)->()\n",This); 145 146 return E_NOTIMPL; 148 147 } 149 148 … … 151 150 IBasicVideo2_fnput_SourceLeft(IBasicVideo2* iface,long lLeft) 152 151 { 153 CFilterGraph_THIS(iface,basvid);154 155 FIXME("(%p)->()\n",This);156 157 return E_NOTIMPL;152 CFilterGraph_THIS(iface,basvid); 153 154 FIXME("(%p)->()\n",This); 155 156 return E_NOTIMPL; 158 157 } 159 158 … … 161 160 IBasicVideo2_fnget_SourceLeft(IBasicVideo2* iface,long* plLeft) 162 161 { 163 CFilterGraph_THIS(iface,basvid);164 165 FIXME("(%p)->()\n",This);166 167 return E_NOTIMPL;162 CFilterGraph_THIS(iface,basvid); 163 164 FIXME("(%p)->()\n",This); 165 166 return E_NOTIMPL; 168 167 } 169 168 … … 171 170 IBasicVideo2_fnput_SourceWidth(IBasicVideo2* iface,long lWidth) 172 171 { 173 CFilterGraph_THIS(iface,basvid);174 175 FIXME("(%p)->()\n",This);176 177 return E_NOTIMPL;172 CFilterGraph_THIS(iface,basvid); 173 174 FIXME("(%p)->()\n",This); 175 176 return E_NOTIMPL; 178 177 } 179 178 … … 181 180 IBasicVideo2_fnget_SourceWidth(IBasicVideo2* iface,long* plWidth) 182 181 { 183 CFilterGraph_THIS(iface,basvid);184 185 FIXME("(%p)->()\n",This);186 187 return E_NOTIMPL;182 CFilterGraph_THIS(iface,basvid); 183 184 FIXME("(%p)->()\n",This); 185 186 return E_NOTIMPL; 188 187 } 189 188 … … 191 190 IBasicVideo2_fnput_SourceTop(IBasicVideo2* iface,long lTop) 192 191 { 193 CFilterGraph_THIS(iface,basvid);194 195 FIXME("(%p)->()\n",This);196 197 return E_NOTIMPL;192 CFilterGraph_THIS(iface,basvid); 193 194 FIXME("(%p)->()\n",This); 195 196 return E_NOTIMPL; 198 197 } 199 198 … … 201 200 IBasicVideo2_fnget_SourceTop(IBasicVideo2* iface,long* plTop) 202 201 { 203 CFilterGraph_THIS(iface,basvid);204 205 FIXME("(%p)->()\n",This);206 207 return E_NOTIMPL;202 CFilterGraph_THIS(iface,basvid); 203 204 FIXME("(%p)->()\n",This); 205 206 return E_NOTIMPL; 208 207 } 209 208 … … 211 210 IBasicVideo2_fnput_SourceHeight(IBasicVideo2* iface,long lHeight) 212 211 { 213 CFilterGraph_THIS(iface,basvid);214 215 FIXME("(%p)->()\n",This);216 217 return E_NOTIMPL;212 CFilterGraph_THIS(iface,basvid); 213 214 FIXME("(%p)->()\n",This); 215 216 return E_NOTIMPL; 218 217 } 219 218 … … 221 220 IBasicVideo2_fnget_SourceHeight(IBasicVideo2* iface,long* plHeight) 222 221 { 223 CFilterGraph_THIS(iface,basvid);224 225 FIXME("(%p)->()\n",This);226 227 return E_NOTIMPL;222 CFilterGraph_THIS(iface,basvid); 223 224 FIXME("(%p)->()\n",This); 225 226 return E_NOTIMPL; 228 227 } 229 228 … … 231 230 IBasicVideo2_fnput_DestinationLeft(IBasicVideo2* iface,long lLeft) 232 231 { 233 CFilterGraph_THIS(iface,basvid);234 235 FIXME("(%p)->()\n",This);236 237 return E_NOTIMPL;232 CFilterGraph_THIS(iface,basvid); 233 234 FIXME("(%p)->()\n",This); 235 236 return E_NOTIMPL; 238 237 } 239 238 … … 241 240 IBasicVideo2_fnget_DestinationLeft(IBasicVideo2* iface,long* plLeft) 242 241 { 243 CFilterGraph_THIS(iface,basvid);244 245 FIXME("(%p)->()\n",This);246 247 return E_NOTIMPL;242 CFilterGraph_THIS(iface,basvid); 243 244 FIXME("(%p)->()\n",This); 245 246 return E_NOTIMPL; 248 247 } 249 248 … … 251 250 IBasicVideo2_fnput_DestinationWidth(IBasicVideo2* iface,long lWidth) 252 251 { 253 CFilterGraph_THIS(iface,basvid);254 255 FIXME("(%p)->()\n",This);256 257 return E_NOTIMPL;252 CFilterGraph_THIS(iface,basvid); 253 254 FIXME("(%p)->()\n",This); 255 256 return E_NOTIMPL; 258 257 } 259 258 … … 261 260 IBasicVideo2_fnget_DestinationWidth(IBasicVideo2* iface,long* plWidth) 262 261 { 263 CFilterGraph_THIS(iface,basvid);264 265 FIXME("(%p)->()\n",This);266 267 return E_NOTIMPL;262 CFilterGraph_THIS(iface,basvid); 263 264 FIXME("(%p)->()\n",This); 265 266 return E_NOTIMPL; 268 267 } 269 268 … … 271 270 IBasicVideo2_fnput_DestinationTop(IBasicVideo2* iface,long lTop) 272 271 { 273 CFilterGraph_THIS(iface,basvid);274 275 FIXME("(%p)->()\n",This);276 277 return E_NOTIMPL;272 CFilterGraph_THIS(iface,basvid); 273 274 FIXME("(%p)->()\n",This); 275 276 return E_NOTIMPL; 278 277 } 279 278 … … 281 280 IBasicVideo2_fnget_DestinationTop(IBasicVideo2* iface,long* plTop) 282 281 { 283 CFilterGraph_THIS(iface,basvid);284 285 FIXME("(%p)->()\n",This);286 287 return E_NOTIMPL;282 CFilterGraph_THIS(iface,basvid); 283 284 FIXME("(%p)->()\n",This); 285 286 return E_NOTIMPL; 288 287 } 289 288 … … 291 290 IBasicVideo2_fnput_DestinationHeight(IBasicVideo2* iface,long lHeight) 292 291 { 293 CFilterGraph_THIS(iface,basvid);294 295 FIXME("(%p)->()\n",This);296 297 return E_NOTIMPL;292 CFilterGraph_THIS(iface,basvid); 293 294 FIXME("(%p)->()\n",This); 295 296 return E_NOTIMPL; 298 297 } 299 298 … … 301 300 IBasicVideo2_fnget_DestinationHeight(IBasicVideo2* iface,long* plHeight) 302 301 { 303 CFilterGraph_THIS(iface,basvid);304 305 FIXME("(%p)->()\n",This);306 307 return E_NOTIMPL;302 CFilterGraph_THIS(iface,basvid); 303 304 FIXME("(%p)->()\n",This); 305 306 return E_NOTIMPL; 308 307 } 309 308 … … 311 310 IBasicVideo2_fnSetSourcePosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight) 312 311 { 313 CFilterGraph_THIS(iface,basvid);314 315 FIXME("(%p)->()\n",This);316 317 return E_NOTIMPL;312 CFilterGraph_THIS(iface,basvid); 313 314 FIXME("(%p)->()\n",This); 315 316 return E_NOTIMPL; 318 317 } 319 318 … … 321 320 IBasicVideo2_fnGetSourcePosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight) 322 321 { 323 CFilterGraph_THIS(iface,basvid);324 325 FIXME("(%p)->()\n",This);326 327 return E_NOTIMPL;322 CFilterGraph_THIS(iface,basvid); 323 324 FIXME("(%p)->()\n",This); 325 326 return E_NOTIMPL; 328 327 } 329 328 … … 331 330 IBasicVideo2_fnSetDefaultSourcePosition(IBasicVideo2* iface) 332 331 { 333 CFilterGraph_THIS(iface,basvid);334 335 FIXME("(%p)->()\n",This);336 337 return E_NOTIMPL;332 CFilterGraph_THIS(iface,basvid); 333 334 FIXME("(%p)->()\n",This); 335 336 return E_NOTIMPL; 338 337 } 339 338 … … 341 340 IBasicVideo2_fnSetDestinationPosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight) 342 341 { 343 CFilterGraph_THIS(iface,basvid);344 345 FIXME("(%p)->()\n",This);346 347 return E_NOTIMPL;342 CFilterGraph_THIS(iface,basvid); 343 344 FIXME("(%p)->()\n",This); 345 346 return E_NOTIMPL; 348 347 } 349 348 … … 351 350 IBasicVideo2_fnGetDestinationPosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight) 352 351 { 353 CFilterGraph_THIS(iface,basvid);354 355 FIXME("(%p)->()\n",This);356 357 return E_NOTIMPL;352 CFilterGraph_THIS(iface,basvid); 353 354 FIXME("(%p)->()\n",This); 355 356 return E_NOTIMPL; 358 357 } 359 358 … … 361 360 IBasicVideo2_fnSetDefaultDestinationPosition(IBasicVideo2* iface) 362 361 { 363 CFilterGraph_THIS(iface,basvid);364 365 FIXME("(%p)->()\n",This);366 367 return E_NOTIMPL;362 CFilterGraph_THIS(iface,basvid); 363 364 FIXME("(%p)->()\n",This); 365 366 return E_NOTIMPL; 368 367 } 369 368 … … 371 370 IBasicVideo2_fnGetVideoSize(IBasicVideo2* iface,long* plWidth,long* plHeight) 372 371 { 373 CFilterGraph_THIS(iface,basvid);374 375 FIXME("(%p)->()\n",This);376 377 return E_NOTIMPL;372 CFilterGraph_THIS(iface,basvid); 373 374 FIXME("(%p)->()\n",This); 375 376 return E_NOTIMPL; 378 377 } 379 378 … … 381 380 IBasicVideo2_fnGetVideoPaletteEntries(IBasicVideo2* iface,long lStart,long lCount,long* plRet,long* plPaletteEntry) 382 381 { 383 CFilterGraph_THIS(iface,basvid);384 385 FIXME("(%p)->()\n",This);386 387 return E_NOTIMPL;382 CFilterGraph_THIS(iface,basvid); 383 384 FIXME("(%p)->()\n",This); 385 386 return E_NOTIMPL; 388 387 } 389 388 … … 391 390 IBasicVideo2_fnGetCurrentImage(IBasicVideo2* iface,long* plBufferSize,long* plDIBBuffer) 392 391 { 393 CFilterGraph_THIS(iface,basvid);394 395 FIXME("(%p)->()\n",This);396 397 return E_NOTIMPL;392 CFilterGraph_THIS(iface,basvid); 393 394 FIXME("(%p)->()\n",This); 395 396 return E_NOTIMPL; 398 397 } 399 398 … … 401 400 IBasicVideo2_fnIsUsingDefaultSource(IBasicVideo2* iface) 402 401 { 403 CFilterGraph_THIS(iface,basvid);404 405 FIXME("(%p)->()\n",This);406 407 return E_NOTIMPL;402 CFilterGraph_THIS(iface,basvid); 403 404 FIXME("(%p)->()\n",This); 405 406 return E_NOTIMPL; 408 407 } 409 408 … … 411 410 IBasicVideo2_fnIsUsingDefaultDestination(IBasicVideo2* iface) 412 411 { 413 CFilterGraph_THIS(iface,basvid);414 415 FIXME("(%p)->()\n",This);416 417 return E_NOTIMPL;412 CFilterGraph_THIS(iface,basvid); 413 414 FIXME("(%p)->()\n",This); 415 416 return E_NOTIMPL; 418 417 } 419 418 … … 421 420 IBasicVideo2_fnGetPreferredAspectRatio(IBasicVideo2* iface,long* plRateX,long* plRateY) 422 421 { 423 CFilterGraph_THIS(iface,basvid);424 425 FIXME("(%p)->()\n",This);426 427 return E_NOTIMPL;422 CFilterGraph_THIS(iface,basvid); 423 424 FIXME("(%p)->()\n",This); 425 426 return E_NOTIMPL; 428 427 } 429 428 … … 433 432 static ICOM_VTABLE(IBasicVideo2) ibasicvideo = 434 433 { 435 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE436 /* IUnknown fields */437 IBasicVideo2_fnQueryInterface,438 IBasicVideo2_fnAddRef,439 IBasicVideo2_fnRelease,440 /* IDispatch fields */441 IBasicVideo2_fnGetTypeInfoCount,442 IBasicVideo2_fnGetTypeInfo,443 IBasicVideo2_fnGetIDsOfNames,444 IBasicVideo2_fnInvoke,445 /* IBasicVideo fields */446 IBasicVideo2_fnget_AvgTimePerFrame,447 IBasicVideo2_fnget_BitRate,448 IBasicVideo2_fnget_BitErrorRate,449 IBasicVideo2_fnget_VideoWidth,450 IBasicVideo2_fnget_VideoHeight,451 IBasicVideo2_fnput_SourceLeft,452 IBasicVideo2_fnget_SourceLeft,453 IBasicVideo2_fnput_SourceWidth,454 IBasicVideo2_fnget_SourceWidth,455 IBasicVideo2_fnput_SourceTop,456 IBasicVideo2_fnget_SourceTop,457 IBasicVideo2_fnput_SourceHeight,458 IBasicVideo2_fnget_SourceHeight,459 IBasicVideo2_fnput_DestinationLeft,460 IBasicVideo2_fnget_DestinationLeft,461 IBasicVideo2_fnput_DestinationWidth,462 IBasicVideo2_fnget_DestinationWidth,463 IBasicVideo2_fnput_DestinationTop,464 IBasicVideo2_fnget_DestinationTop,465 IBasicVideo2_fnput_DestinationHeight,466 IBasicVideo2_fnget_DestinationHeight,467 IBasicVideo2_fnSetSourcePosition,468 IBasicVideo2_fnGetSourcePosition,469 IBasicVideo2_fnSetDefaultSourcePosition,470 IBasicVideo2_fnSetDestinationPosition,471 IBasicVideo2_fnGetDestinationPosition,472 IBasicVideo2_fnSetDefaultDestinationPosition,473 IBasicVideo2_fnGetVideoSize,474 IBasicVideo2_fnGetVideoPaletteEntries,475 IBasicVideo2_fnGetCurrentImage,476 IBasicVideo2_fnIsUsingDefaultSource,477 IBasicVideo2_fnIsUsingDefaultDestination,478 /* IBasicVideo2 fields */479 IBasicVideo2_fnGetPreferredAspectRatio,434 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 435 /* IUnknown fields */ 436 IBasicVideo2_fnQueryInterface, 437 IBasicVideo2_fnAddRef, 438 IBasicVideo2_fnRelease, 439 /* IDispatch fields */ 440 IBasicVideo2_fnGetTypeInfoCount, 441 IBasicVideo2_fnGetTypeInfo, 442 IBasicVideo2_fnGetIDsOfNames, 443 IBasicVideo2_fnInvoke, 444 /* IBasicVideo fields */ 445 IBasicVideo2_fnget_AvgTimePerFrame, 446 IBasicVideo2_fnget_BitRate, 447 IBasicVideo2_fnget_BitErrorRate, 448 IBasicVideo2_fnget_VideoWidth, 449 IBasicVideo2_fnget_VideoHeight, 450 IBasicVideo2_fnput_SourceLeft, 451 IBasicVideo2_fnget_SourceLeft, 452 IBasicVideo2_fnput_SourceWidth, 453 IBasicVideo2_fnget_SourceWidth, 454 IBasicVideo2_fnput_SourceTop, 455 IBasicVideo2_fnget_SourceTop, 456 IBasicVideo2_fnput_SourceHeight, 457 IBasicVideo2_fnget_SourceHeight, 458 IBasicVideo2_fnput_DestinationLeft, 459 IBasicVideo2_fnget_DestinationLeft, 460 IBasicVideo2_fnput_DestinationWidth, 461 IBasicVideo2_fnget_DestinationWidth, 462 IBasicVideo2_fnput_DestinationTop, 463 IBasicVideo2_fnget_DestinationTop, 464 IBasicVideo2_fnput_DestinationHeight, 465 IBasicVideo2_fnget_DestinationHeight, 466 IBasicVideo2_fnSetSourcePosition, 467 IBasicVideo2_fnGetSourcePosition, 468 IBasicVideo2_fnSetDefaultSourcePosition, 469 IBasicVideo2_fnSetDestinationPosition, 470 IBasicVideo2_fnGetDestinationPosition, 471 IBasicVideo2_fnSetDefaultDestinationPosition, 472 IBasicVideo2_fnGetVideoSize, 473 IBasicVideo2_fnGetVideoPaletteEntries, 474 IBasicVideo2_fnGetCurrentImage, 475 IBasicVideo2_fnIsUsingDefaultSource, 476 IBasicVideo2_fnIsUsingDefaultDestination, 477 /* IBasicVideo2 fields */ 478 IBasicVideo2_fnGetPreferredAspectRatio, 480 479 }; 481 480 482 481 483 void CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg ) 484 { 485 TRACE("(%p)\n",pfg); 486 ICOM_VTBL(&pfg->basvid) = &ibasicvideo; 487 } 488 482 HRESULT CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg ) 483 { 484 TRACE("(%p)\n",pfg); 485 ICOM_VTBL(&pfg->basvid) = &ibasicvideo; 486 487 return NOERROR; 488 } 489 490 void CFilterGraph_UninitIBasicVideo2( CFilterGraph* pfg ) 491 { 492 TRACE("(%p)\n",pfg); 493 }  - 
      
trunk/src/quartz/ifgraph.c
r6649 r6710 1 /* $Id: ifgraph.c,v 1.3 2001-09-05 13:36:35 bird Exp $ */2 1 /* 3 2 * Implementation of IFilterGraph. … … 20 19 #include "control.h" 21 20 #include "uuids.h" 21 #include "vfwmsgs.h" 22 #include "wine/unicode.h" 22 23 23 24 #include "debugtools.h" … … 26 27 #include "quartz_private.h" 27 28 #include "fgraph.h" 29 #include "enumunk.h" 30 31 32 static HRESULT CFilterGraph_DisconnectAllPins( IBaseFilter* pFilter ) 33 { 34 IEnumPins* pEnum = NULL; 35 IPin* pPin; 36 IPin* pConnTo; 37 ULONG cFetched; 38 HRESULT hr; 39 40 hr = IBaseFilter_EnumPins( pFilter, &pEnum ); 41 if ( FAILED(hr) ) 42 return hr; 43 if ( pEnum == NULL ) 44 return E_FAIL; 45 46 while ( 1 ) 47 { 48 pPin = NULL; 49 cFetched = 0; 50 hr = IEnumPins_Next( pEnum, 1, &pPin, &cFetched ); 51 if ( FAILED(hr) ) 52 break; 53 if ( hr != NOERROR || pPin == NULL || cFetched != 1 ) 54 { 55 hr = NOERROR; 56 break; 57 } 58 59 pConnTo = NULL; 60 hr = IPin_ConnectedTo(pPin,&pConnTo); 61 if ( hr == NOERROR && pConnTo != NULL ) 62 { 63 IPin_Disconnect(pPin); 64 IPin_Disconnect(pConnTo); 65 IPin_Release(pConnTo); 66 } 67 68 IPin_Release( pPin ); 69 } 70 71 IEnumPins_Release( pEnum ); 72 73 return hr; 74 } 75 76 77 /****************************************************************************/ 28 78 29 79 static HRESULT WINAPI 30 80 IFilterGraph2_fnQueryInterface(IFilterGraph2* iface,REFIID riid,void** ppobj) 31 81 { 32 CFilterGraph_THIS(iface,fgraph);33 34 TRACE("(%p)->()\n",This);35 36 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);82 CFilterGraph_THIS(iface,fgraph); 83 84 TRACE("(%p)->()\n",This); 85 86 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 37 87 } 38 88 … … 40 90 IFilterGraph2_fnAddRef(IFilterGraph2* iface) 41 91 { 42 CFilterGraph_THIS(iface,fgraph);43 44 TRACE("(%p)->()\n",This);45 46 return IUnknown_AddRef(This->unk.punkControl);92 CFilterGraph_THIS(iface,fgraph); 93 94 TRACE("(%p)->()\n",This); 95 96 return IUnknown_AddRef(This->unk.punkControl); 47 97 } 48 98 … … 50 100 IFilterGraph2_fnRelease(IFilterGraph2* iface) 51 101 { 52 CFilterGraph_THIS(iface,fgraph);53 54 TRACE("(%p)->()\n",This);55 56 return IUnknown_Release(This->unk.punkControl);102 CFilterGraph_THIS(iface,fgraph); 103 104 TRACE("(%p)->()\n",This); 105 106 return IUnknown_Release(This->unk.punkControl); 57 107 } 58 108 … … 60 110 IFilterGraph2_fnAddFilter(IFilterGraph2* iface,IBaseFilter* pFilter, LPCWSTR pName) 61 111 { 62 CFilterGraph_THIS(iface,fgraph); 63 64 FIXME( "(%p)->() stub!\n", This ); 65 return E_NOTIMPL; 112 CFilterGraph_THIS(iface,fgraph); 113 FILTER_INFO info; 114 HRESULT hr; 115 HRESULT hrSucceeded = S_OK; 116 QUARTZ_CompListItem* pItem; 117 int i,iLen; 118 119 TRACE( "(%p)->(%p,%s)\n",This,pFilter,debugstr_w(pName) ); 120 121 QUARTZ_CompList_Lock( This->m_pFilterList ); 122 123 if ( pName != NULL ) 124 { 125 pItem = QUARTZ_CompList_SearchData( 126 This->m_pFilterList, 127 pName, sizeof(WCHAR)*(strlenW(pName)+1) ); 128 if ( pItem == NULL ) 129 goto name_ok; 130 131 hrSucceeded = VFW_S_DUPLICATE_NAME; 132 133 iLen = strlenW(pName); 134 if ( iLen > 32 ) 135 iLen = 32; 136 memcpy( info.achName, pName, sizeof(WCHAR)*iLen ); 137 info.achName[iLen] = 0; 138 } 139 else 140 { 141 ZeroMemory( &info, sizeof(info) ); 142 hr = IBaseFilter_QueryFilterInfo( pFilter, &info ); 143 if ( FAILED(hr) ) 144 goto end; 145 146 iLen = strlenW(info.achName); 147 pItem = QUARTZ_CompList_SearchData( 148 This->m_pFilterList, 149 info.achName, sizeof(WCHAR)*(iLen+1) ); 150 if ( pItem == NULL ) 151 { 152 pName = info.achName; 153 goto name_ok; 154 } 155 } 156 157 /* generate modified names for this filter.. */ 158 iLen = strlenW(info.achName); 159 if ( iLen > 32 ) 160 iLen = 32; 161 info.achName[iLen++] = ' '; 162 163 for ( i = 0; i <= 99; i++ ) 164 { 165 info.achName[iLen+0] = (i%10) + '0'; 166 info.achName[iLen+1] = ((i/10)%10) + '0'; 167 info.achName[iLen+2] = 0; 168 pItem = QUARTZ_CompList_SearchData( 169 This->m_pFilterList, 170 info.achName, sizeof(WCHAR)*(iLen+3) ); 171 if ( pItem == NULL ) 172 { 173 pName = info.achName; 174 goto name_ok; 175 } 176 } 177 178 hr = ( pName == NULL ) ? E_FAIL : VFW_E_DUPLICATE_NAME; 179 goto end; 180 181 name_ok: 182 /* register this filter. */ 183 hr = QUARTZ_CompList_AddComp( 184 This->m_pFilterList, (IUnknown*)pFilter, 185 pName, sizeof(WCHAR)*(strlenW(pName)+1) ); 186 if ( FAILED(hr) ) 187 goto end; 188 189 hr = IBaseFilter_JoinFilterGraph(pFilter,(IFilterGraph*)iface,pName); 190 if ( FAILED(hr) ) 191 { 192 QUARTZ_CompList_RemoveComp( 193 This->m_pFilterList,(IUnknown*)pFilter); 194 goto end; 195 } 196 197 EnterCriticalSection( &This->m_csGraphVersion ); 198 This->m_lGraphVersion ++; 199 LeaveCriticalSection( &This->m_csGraphVersion ); 200 201 hr = hrSucceeded; 202 end: 203 QUARTZ_CompList_Unlock( This->m_pFilterList ); 204 205 return hr; 66 206 } 67 207 … … 69 209 IFilterGraph2_fnRemoveFilter(IFilterGraph2* iface,IBaseFilter* pFilter) 70 210 { 71 CFilterGraph_THIS(iface,fgraph); 72 73 FIXME( "(%p)->() stub!\n", This ); 74 return E_NOTIMPL; 211 CFilterGraph_THIS(iface,fgraph); 212 QUARTZ_CompListItem* pItem; 213 HRESULT hr = NOERROR; 214 215 TRACE( "(%p)->(%p)\n",This,pFilter ); 216 217 QUARTZ_CompList_Lock( This->m_pFilterList ); 218 219 pItem = QUARTZ_CompList_SearchComp( 220 This->m_pFilterList, (IUnknown*)pFilter ); 221 if ( pItem != NULL ) 222 { 223 CFilterGraph_DisconnectAllPins(pFilter); 224 hr = IBaseFilter_JoinFilterGraph( 225 pFilter, NULL, QUARTZ_CompList_GetDataPtr(pItem) ); 226 QUARTZ_CompList_RemoveComp( 227 This->m_pFilterList, (IUnknown*)pFilter ); 228 } 229 230 EnterCriticalSection( &This->m_csGraphVersion ); 231 This->m_lGraphVersion ++; 232 LeaveCriticalSection( &This->m_csGraphVersion ); 233 234 QUARTZ_CompList_Unlock( This->m_pFilterList ); 235 236 return hr; 75 237 } 76 238 … … 78 240 IFilterGraph2_fnEnumFilters(IFilterGraph2* iface,IEnumFilters** ppEnum) 79 241 { 80 CFilterGraph_THIS(iface,fgraph); 81 82 FIXME( "(%p)->() stub!\n", This ); 83 return E_NOTIMPL; 242 CFilterGraph_THIS(iface,fgraph); 243 HRESULT hr; 244 245 TRACE( "(%p)->(%p)\n",This,ppEnum ); 246 247 QUARTZ_CompList_Lock( This->m_pFilterList ); 248 249 hr = QUARTZ_CreateEnumUnknown( 250 &IID_IEnumFilters, (void**)ppEnum, This->m_pFilterList ); 251 252 QUARTZ_CompList_Unlock( This->m_pFilterList ); 253 254 return hr; 84 255 } 85 256 … … 87 258 IFilterGraph2_fnFindFilterByName(IFilterGraph2* iface,LPCWSTR pName,IBaseFilter** ppFilter) 88 259 { 89 CFilterGraph_THIS(iface,fgraph); 90 91 FIXME( "(%p)->() stub!\n", This ); 92 return E_NOTIMPL; 260 CFilterGraph_THIS(iface,fgraph); 261 QUARTZ_CompListItem* pItem; 262 HRESULT hr = E_FAIL; 263 264 TRACE( "(%p)->(%s,%p)\n",This,debugstr_w(pName),ppFilter ); 265 266 if ( ppFilter == NULL ) 267 return E_POINTER; 268 *ppFilter = NULL; 269 270 QUARTZ_CompList_Lock( This->m_pFilterList ); 271 272 pItem = QUARTZ_CompList_SearchData( 273 This->m_pFilterList, 274 pName, sizeof(WCHAR)*(strlenW(pName)+1) ); 275 if ( pItem != NULL ) 276 { 277 *ppFilter = (IBaseFilter*)QUARTZ_CompList_GetItemPtr(pItem); 278 hr = NOERROR; 279 } 280 281 QUARTZ_CompList_Unlock( This->m_pFilterList ); 282 283 return hr; 93 284 } 94 285 … … 96 287 IFilterGraph2_fnConnectDirect(IFilterGraph2* iface,IPin* pOut,IPin* pIn,const AM_MEDIA_TYPE* pmt) 97 288 { 98 CFilterGraph_THIS(iface,fgraph); 99 100 FIXME( "(%p)->() stub!\n", This ); 101 return E_NOTIMPL; 289 CFilterGraph_THIS(iface,fgraph); 290 IPin* pConnTo; 291 PIN_INFO infoIn; 292 PIN_INFO infoOut; 293 FILTER_INFO finfoIn; 294 FILTER_INFO finfoOut; 295 HRESULT hr; 296 297 TRACE( "(%p)->(%p,%p,%p)\n",This,pOut,pIn,pmt ); 298 299 infoIn.pFilter = NULL; 300 infoOut.pFilter = NULL; 301 finfoIn.pGraph = NULL; 302 finfoOut.pGraph = NULL; 303 304 QUARTZ_CompList_Lock( This->m_pFilterList ); 305 306 hr = IPin_QueryPinInfo(pIn,&infoIn); 307 if ( FAILED(hr) ) 308 goto end; 309 hr = IPin_QueryPinInfo(pOut,&infoOut); 310 if ( FAILED(hr) ) 311 goto end; 312 if ( infoIn.pFilter == NULL || infoOut.pFilter == NULL || 313 infoIn.dir != PINDIR_INPUT || infoOut.dir != PINDIR_OUTPUT ) 314 { 315 hr = E_FAIL; 316 goto end; 317 } 318 319 hr = IBaseFilter_QueryFilterInfo(infoIn.pFilter,&finfoIn); 320 if ( FAILED(hr) ) 321 goto end; 322 hr = IBaseFilter_QueryFilterInfo(infoOut.pFilter,&finfoOut); 323 if ( FAILED(hr) ) 324 goto end; 325 if ( finfoIn.pGraph != ((IFilterGraph*)iface) || 326 finfoOut.pGraph != ((IFilterGraph*)iface) ) 327 { 328 hr = E_FAIL; 329 goto end; 330 } 331 332 pConnTo = NULL; 333 hr = IPin_ConnectedTo(pIn,&pConnTo); 334 if ( FAILED(hr) ) 335 goto end; 336 if ( pConnTo != NULL ) 337 { 338 IPin_Release(pConnTo); 339 goto end; 340 } 341 342 pConnTo = NULL; 343 hr = IPin_ConnectedTo(pOut,&pConnTo); 344 if ( FAILED(hr) ) 345 goto end; 346 if ( pConnTo != NULL ) 347 { 348 IPin_Release(pConnTo); 349 goto end; 350 } 351 352 hr = IPin_Connect(pIn,pOut,pmt); 353 if ( FAILED(hr) ) 354 goto end; 355 hr = IPin_Connect(pOut,pIn,pmt); 356 if ( FAILED(hr) ) 357 { 358 IPin_Disconnect(pIn); 359 goto end; 360 } 361 362 EnterCriticalSection( &This->m_csGraphVersion ); 363 This->m_lGraphVersion ++; 364 LeaveCriticalSection( &This->m_csGraphVersion ); 365 366 end: 367 QUARTZ_CompList_Unlock( This->m_pFilterList ); 368 369 if ( infoIn.pFilter != NULL ) 370 IBaseFilter_Release(infoIn.pFilter); 371 if ( infoOut.pFilter != NULL ) 372 IBaseFilter_Release(infoOut.pFilter); 373 if ( finfoIn.pGraph != NULL ) 374 IFilterGraph_Release(finfoIn.pGraph); 375 if ( finfoOut.pGraph != NULL ) 376 IFilterGraph_Release(finfoOut.pGraph); 377 378 return hr; 102 379 } 103 380 … … 105 382 IFilterGraph2_fnReconnect(IFilterGraph2* iface,IPin* pPin) 106 383 { 107 CFilterGraph_THIS(iface,fgraph); 108 109 FIXME( "(%p)->() stub!\n", This ); 110 return E_NOTIMPL; 384 CFilterGraph_THIS(iface,fgraph); 385 386 FIXME( "(%p)->(%p) stub!\n",This,pPin ); 387 388 EnterCriticalSection( &This->m_csGraphVersion ); 389 This->m_lGraphVersion ++; 390 LeaveCriticalSection( &This->m_csGraphVersion ); 391 392 return E_NOTIMPL; 111 393 } 112 394 … … 114 396 IFilterGraph2_fnDisconnect(IFilterGraph2* iface,IPin* pPin) 115 397 { 116 CFilterGraph_THIS(iface,fgraph); 117 118 FIXME( "(%p)->() stub!\n", This ); 119 return E_NOTIMPL; 398 CFilterGraph_THIS(iface,fgraph); 399 400 FIXME( "(%p)->(%p) stub!\n",This,pPin ); 401 402 EnterCriticalSection( &This->m_csGraphVersion ); 403 This->m_lGraphVersion ++; 404 LeaveCriticalSection( &This->m_csGraphVersion ); 405 406 return E_NOTIMPL; 120 407 } 121 408 … … 123 410 IFilterGraph2_fnSetDefaultSyncSource(IFilterGraph2* iface) 124 411 { 125 CFilterGraph_THIS(iface,fgraph);126 127 FIXME( "(%p)->() stub!\n", This );128 return E_NOTIMPL;412 CFilterGraph_THIS(iface,fgraph); 413 414 FIXME( "(%p)->() stub!\n", This ); 415 return E_NOTIMPL; 129 416 } 130 417 … … 132 419 IFilterGraph2_fnConnect(IFilterGraph2* iface,IPin* pOut,IPin* pIn) 133 420 { 134 CFilterGraph_THIS(iface,fgraph); 135 136 FIXME( "(%p)->() stub!\n", This ); 137 return E_NOTIMPL; 421 CFilterGraph_THIS(iface,fgraph); 422 HRESULT hr; 423 424 TRACE( "(%p)->(%p,%p)\n",This,pOut,pIn ); 425 426 /* At first, try to connect directly. */ 427 hr = IFilterGraph_ConnectDirect(iface,pOut,pIn,NULL); 428 if ( hr == NOERROR ) 429 return NOERROR; 430 431 /* FIXME - try to connect indirectly. */ 432 FIXME( "(%p)->(%p,%p) stub!\n",This,pOut,pIn ); 433 434 435 return E_NOTIMPL; 138 436 } 139 437 … … 141 439 IFilterGraph2_fnRender(IFilterGraph2* iface,IPin* pOut) 142 440 { 143 CFilterGraph_THIS(iface,fgraph);144 145 FIXME( "(%p)->() stub!\n", This);146 return E_NOTIMPL;441 CFilterGraph_THIS(iface,fgraph); 442 443 FIXME( "(%p)->(%p) stub!\n",This,pOut ); 444 return E_NOTIMPL; 147 445 } 148 446 … … 150 448 IFilterGraph2_fnRenderFile(IFilterGraph2* iface,LPCWSTR lpFileName,LPCWSTR lpPlayList) 151 449 { 152 CFilterGraph_THIS(iface,fgraph); 153 154 FIXME( "(%p)->() stub!\n", This ); 155 return E_NOTIMPL; 450 CFilterGraph_THIS(iface,fgraph); 451 HRESULT hr; 452 IBaseFilter* pFilter = NULL; 453 IEnumPins* pEnum = NULL; 454 IPin* pPin; 455 ULONG cFetched; 456 PIN_DIRECTION dir; 457 ULONG cTryToRender; 458 ULONG cActRender; 459 460 TRACE( "(%p)->(%s,%s)\n",This, 461 debugstr_w(lpFileName),debugstr_w(lpPlayList) ); 462 463 if ( lpPlayList != NULL ) 464 return E_INVALIDARG; 465 466 pFilter = NULL; 467 hr = IFilterGraph2_AddSourceFilter(iface,lpFileName,NULL,&pFilter); 468 if ( FAILED(hr) ) 469 goto end; 470 if ( pFilter == NULL ) 471 { 472 hr = E_FAIL; 473 goto end; 474 } 475 pEnum = NULL; 476 hr = IBaseFilter_EnumPins( pFilter, &pEnum ); 477 if ( FAILED(hr) ) 478 goto end; 479 if ( pEnum == NULL ) 480 { 481 hr = E_FAIL; 482 goto end; 483 } 484 485 cTryToRender = 0; 486 cActRender = 0; 487 488 while ( 1 ) 489 { 490 pPin = NULL; 491 cFetched = 0; 492 hr = IEnumPins_Next( pEnum, 1, &pPin, &cFetched ); 493 if ( FAILED(hr) ) 494 goto end; 495 if ( hr != NOERROR || pPin == NULL || cFetched != 1 ) 496 { 497 hr = NOERROR; 498 break; 499 } 500 hr = IPin_QueryDirection( pPin, &dir ); 501 if ( hr == NOERROR && dir == PINDIR_OUTPUT ) 502 { 503 cTryToRender ++; 504 hr = IFilterGraph2_Render( iface, pPin ); 505 if ( hr == NOERROR ) 506 cActRender ++; 507 } 508 IPin_Release( pPin ); 509 } 510 511 if ( hr == NOERROR ) 512 { 513 if ( cTryToRender > cActRender ) 514 hr = VFW_S_PARTIAL_RENDER; 515 if ( cActRender == 0 ) 516 hr = E_FAIL; 517 } 518 519 end: 520 if ( pEnum != NULL ) 521 IEnumPins_Release( pEnum ); 522 if ( pFilter != NULL ) 523 IBaseFilter_Release( pFilter ); 524 525 return hr; 156 526 } 157 527 … … 159 529 IFilterGraph2_fnAddSourceFilter(IFilterGraph2* iface,LPCWSTR lpFileName,LPCWSTR lpFilterName,IBaseFilter** ppBaseFilter) 160 530 { 161 CFilterGraph_THIS(iface,fgraph); 162 163 FIXME( "(%p)->() stub!\n", This ); 164 return E_NOTIMPL; 531 CFilterGraph_THIS(iface,fgraph); 532 533 FIXME( "(%p)->(%s,%s,%p) stub!\n",This, 534 debugstr_w(lpFileName),debugstr_w(lpFilterName),ppBaseFilter ); 535 return E_NOTIMPL; 165 536 } 166 537 … … 168 539 IFilterGraph2_fnSetLogFile(IFilterGraph2* iface,DWORD_PTR hFile) 169 540 { 170 CFilterGraph_THIS(iface,fgraph);171 172 FIXME( "(%p)->() stub!\n", This );173 return E_NOTIMPL;541 CFilterGraph_THIS(iface,fgraph); 542 543 FIXME( "(%p)->() stub!\n", This ); 544 return E_NOTIMPL; 174 545 } 175 546 … … 177 548 IFilterGraph2_fnAbort(IFilterGraph2* iface) 178 549 { 179 CFilterGraph_THIS(iface,fgraph);180 181 /* undoc. */182 183 FIXME( "(%p)->() stub!\n", This );184 return E_NOTIMPL;550 CFilterGraph_THIS(iface,fgraph); 551 552 /* undoc. */ 553 554 FIXME( "(%p)->() stub!\n", This ); 555 return E_NOTIMPL; 185 556 } 186 557 … … 188 559 IFilterGraph2_fnShouldOperationContinue(IFilterGraph2* iface) 189 560 { 190 CFilterGraph_THIS(iface,fgraph);191 192 /* undoc. */193 194 FIXME( "(%p)->() stub!\n", This );195 return E_NOTIMPL;561 CFilterGraph_THIS(iface,fgraph); 562 563 /* undoc. */ 564 565 FIXME( "(%p)->() stub!\n", This ); 566 return E_NOTIMPL; 196 567 } 197 568 … … 199 570 IFilterGraph2_fnAddSourceFilterForMoniker(IFilterGraph2* iface,IMoniker* pMon,IBindCtx* pCtx,LPCWSTR pFilterName,IBaseFilter** ppFilter) 200 571 { 201 CFilterGraph_THIS(iface,fgraph);202 203 FIXME( "(%p)->() stub!\n", This );204 return E_NOTIMPL;572 CFilterGraph_THIS(iface,fgraph); 573 574 FIXME( "(%p)->() stub!\n", This ); 575 return E_NOTIMPL; 205 576 } 206 577 … … 208 579 IFilterGraph2_fnReconnectEx(IFilterGraph2* iface,IPin* pPin,const AM_MEDIA_TYPE* pmt) 209 580 { 210 CFilterGraph_THIS(iface,fgraph); 211 212 FIXME( "(%p)->() stub!\n", This ); 213 return E_NOTIMPL; 581 CFilterGraph_THIS(iface,fgraph); 582 583 FIXME( "(%p)->(%p,%p) stub!\n",This,pPin,pmt ); 584 585 EnterCriticalSection( &This->m_csGraphVersion ); 586 This->m_lGraphVersion ++; 587 LeaveCriticalSection( &This->m_csGraphVersion ); 588 589 return E_NOTIMPL; 214 590 } 215 591 … … 217 593 IFilterGraph2_fnRenderEx(IFilterGraph2* iface,IPin* pPin,DWORD dwParam1,DWORD* pdwParam2) 218 594 { 219 CFilterGraph_THIS(iface,fgraph);220 221 /* undoc. */222 FIXME( "(%p)->() stub!\n", This);223 return E_NOTIMPL;595 CFilterGraph_THIS(iface,fgraph); 596 597 /* undoc. */ 598 FIXME( "(%p)->(%p,%08lx,%p) stub!\n",This,pPin,dwParam1,pdwParam2); 599 return E_NOTIMPL; 224 600 } 225 601 … … 229 605 static ICOM_VTABLE(IFilterGraph2) ifgraph = 230 606 { 231 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE232 /* IUnknown fields */233 IFilterGraph2_fnQueryInterface,234 IFilterGraph2_fnAddRef,235 IFilterGraph2_fnRelease,236 /* IFilterGraph fields */237 IFilterGraph2_fnAddFilter,238 IFilterGraph2_fnRemoveFilter,239 IFilterGraph2_fnEnumFilters,240 IFilterGraph2_fnFindFilterByName,241 IFilterGraph2_fnConnectDirect,242 IFilterGraph2_fnReconnect,243 IFilterGraph2_fnDisconnect,244 IFilterGraph2_fnSetDefaultSyncSource,245 /* IGraphBuilder fields */246 IFilterGraph2_fnConnect,247 IFilterGraph2_fnRender,248 IFilterGraph2_fnRenderFile,249 IFilterGraph2_fnAddSourceFilter,250 IFilterGraph2_fnSetLogFile,251 IFilterGraph2_fnAbort,252 IFilterGraph2_fnShouldOperationContinue,253 /* IFilterGraph2 fields */254 IFilterGraph2_fnAddSourceFilterForMoniker,255 IFilterGraph2_fnReconnectEx,256 IFilterGraph2_fnRenderEx,607 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 608 /* IUnknown fields */ 609 IFilterGraph2_fnQueryInterface, 610 IFilterGraph2_fnAddRef, 611 IFilterGraph2_fnRelease, 612 /* IFilterGraph fields */ 613 IFilterGraph2_fnAddFilter, 614 IFilterGraph2_fnRemoveFilter, 615 IFilterGraph2_fnEnumFilters, 616 IFilterGraph2_fnFindFilterByName, 617 IFilterGraph2_fnConnectDirect, 618 IFilterGraph2_fnReconnect, 619 IFilterGraph2_fnDisconnect, 620 IFilterGraph2_fnSetDefaultSyncSource, 621 /* IGraphBuilder fields */ 622 IFilterGraph2_fnConnect, 623 IFilterGraph2_fnRender, 624 IFilterGraph2_fnRenderFile, 625 IFilterGraph2_fnAddSourceFilter, 626 IFilterGraph2_fnSetLogFile, 627 IFilterGraph2_fnAbort, 628 IFilterGraph2_fnShouldOperationContinue, 629 /* IFilterGraph2 fields */ 630 IFilterGraph2_fnAddSourceFilterForMoniker, 631 IFilterGraph2_fnReconnectEx, 632 IFilterGraph2_fnRenderEx, 257 633 }; 258 634 259 void CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg ) 260 { 261 TRACE("(%p)\n",pfg); 262 ICOM_VTBL(&pfg->fgraph) = &ifgraph; 263 } 635 HRESULT CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg ) 636 { 637 TRACE("(%p)\n",pfg); 638 ICOM_VTBL(&pfg->fgraph) = &ifgraph; 639 640 pfg->m_pFilterList = QUARTZ_CompList_Alloc(); 641 if ( pfg->m_pFilterList == NULL ) 642 return E_OUTOFMEMORY; 643 644 return NOERROR; 645 } 646 647 void CFilterGraph_UninitIFilterGraph2( CFilterGraph* pfg ) 648 { 649 QUARTZ_CompListItem* pItem; 650 651 TRACE("(%p)\n",pfg); 652 653 /* remove all filters... */ 654 while ( 1 ) 655 { 656 pItem = QUARTZ_CompList_GetFirst( pfg->m_pFilterList ); 657 if ( pItem == NULL ) 658 break; 659 IFilterGraph2_fnRemoveFilter( 660 (IFilterGraph2*)(&pfg->fgraph), 661 (IBaseFilter*)QUARTZ_CompList_GetItemPtr(pItem) ); 662 } 663 664 QUARTZ_CompList_Free( pfg->m_pFilterList ); 665 }  - 
      
trunk/src/quartz/imcntl.c
r6649 r6710 1 /* $Id: imcntl.c,v 1.2 2001-09-05 13:36:35 bird Exp $ */2 1 /* 3 2 * Implementation of IMediaControl for FilterGraph. … … 16 15 #include "wine/obj_base.h" 17 16 #include "wine/obj_oleaut.h" 17 #include "oleauto.h" 18 18 #include "strmif.h" 19 19 #include "control.h" … … 31 31 IMediaControl_fnQueryInterface(IMediaControl* iface,REFIID riid,void** ppobj) 32 32 { 33 CFilterGraph_THIS(iface,mediacontrol);34 35 TRACE("(%p)->()\n",This);36 37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);33 CFilterGraph_THIS(iface,mediacontrol); 34 35 TRACE("(%p)->()\n",This); 36 37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 38 38 } 39 39 … … 41 41 IMediaControl_fnAddRef(IMediaControl* iface) 42 42 { 43 CFilterGraph_THIS(iface,mediacontrol);44 45 TRACE("(%p)->()\n",This);46 47 return IUnknown_AddRef(This->unk.punkControl);43 CFilterGraph_THIS(iface,mediacontrol); 44 45 TRACE("(%p)->()\n",This); 46 47 return IUnknown_AddRef(This->unk.punkControl); 48 48 } 49 49 … … 51 51 IMediaControl_fnRelease(IMediaControl* iface) 52 52 { 53 CFilterGraph_THIS(iface,mediacontrol);54 55 TRACE("(%p)->()\n",This);56 57 return IUnknown_Release(This->unk.punkControl);53 CFilterGraph_THIS(iface,mediacontrol); 54 55 TRACE("(%p)->()\n",This); 56 57 return IUnknown_Release(This->unk.punkControl); 58 58 } 59 59 … … 61 61 IMediaControl_fnGetTypeInfoCount(IMediaControl* iface,UINT* pcTypeInfo) 62 62 { 63 CFilterGraph_THIS(iface,mediacontrol);64 65 FIXME("(%p)->()\n",This);66 67 return E_NOTIMPL;63 CFilterGraph_THIS(iface,mediacontrol); 64 65 FIXME("(%p)->()\n",This); 66 67 return E_NOTIMPL; 68 68 } 69 69 … … 71 71 IMediaControl_fnGetTypeInfo(IMediaControl* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj) 72 72 { 73 CFilterGraph_THIS(iface,mediacontrol);74 75 FIXME("(%p)->()\n",This);76 77 return E_NOTIMPL;73 CFilterGraph_THIS(iface,mediacontrol); 74 75 FIXME("(%p)->()\n",This); 76 77 return E_NOTIMPL; 78 78 } 79 79 … … 81 81 IMediaControl_fnGetIDsOfNames(IMediaControl* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId) 82 82 { 83 CFilterGraph_THIS(iface,mediacontrol);84 85 FIXME("(%p)->()\n",This);86 87 return E_NOTIMPL;83 CFilterGraph_THIS(iface,mediacontrol); 84 85 FIXME("(%p)->()\n",This); 86 87 return E_NOTIMPL; 88 88 } 89 89 … … 91 91 IMediaControl_fnInvoke(IMediaControl* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr) 92 92 { 93 CFilterGraph_THIS(iface,mediacontrol);94 95 FIXME("(%p)->()\n",This);96 97 return E_NOTIMPL;93 CFilterGraph_THIS(iface,mediacontrol); 94 95 FIXME("(%p)->()\n",This); 96 97 return E_NOTIMPL; 98 98 } 99 99 … … 102 102 IMediaControl_fnRun(IMediaControl* iface) 103 103 { 104 CFilterGraph_THIS(iface,mediacontrol); 105 106 FIXME("(%p)->()\n",This); 107 108 return E_NOTIMPL; 104 CFilterGraph_THIS(iface,mediacontrol); 105 106 TRACE("(%p)->()\n",This); 107 108 return IMediaFilter_Run( CFilterGraph_IMediaFilter(This), 109 (REFERENCE_TIME)0 ); 109 110 } 110 111 … … 112 113 IMediaControl_fnPause(IMediaControl* iface) 113 114 { 114 CFilterGraph_THIS(iface,mediacontrol);115 116 FIXME("(%p)->()\n",This);117 118 return E_NOTIMPL;115 CFilterGraph_THIS(iface,mediacontrol); 116 117 TRACE("(%p)->()\n",This); 118 119 return IMediaFilter_Pause( CFilterGraph_IMediaFilter(This) ); 119 120 } 120 121 … … 122 123 IMediaControl_fnStop(IMediaControl* iface) 123 124 { 124 CFilterGraph_THIS(iface,mediacontrol); 125 126 FIXME("(%p)->()\n",This); 127 128 return E_NOTIMPL; 125 CFilterGraph_THIS(iface,mediacontrol); 126 HRESULT hr; 127 FILTER_STATE fs; 128 129 TRACE("(%p)->()\n",This); 130 131 hr = IMediaControl_GetState(iface,INFINITE,(OAFilterState*)&fs); 132 if ( SUCCEEDED(hr) && fs == State_Running ) 133 { 134 hr = IMediaControl_Pause(iface); 135 if ( SUCCEEDED(hr) ) 136 hr = IMediaControl_GetState(iface,INFINITE,(OAFilterState*)&fs); 137 } 138 139 if ( SUCCEEDED(hr) && fs == State_Paused ) 140 { 141 hr = IMediaFilter_Stop(CFilterGraph_IMediaFilter(This)); 142 if ( SUCCEEDED(hr) ) 143 hr = IMediaControl_GetState(iface,INFINITE,(OAFilterState*)&fs); 144 } 145 146 return hr; 129 147 } 130 148 … … 132 150 IMediaControl_fnGetState(IMediaControl* iface,LONG lTimeOut,OAFilterState* pFilterState) 133 151 { 134 CFilterGraph_THIS(iface,mediacontrol);135 136 FIXME("(%p)->()\n",This);137 138 return E_NOTIMPL;152 CFilterGraph_THIS(iface,mediacontrol); 153 154 TRACE("(%p)->()\n",This); 155 156 return IMediaFilter_GetState( CFilterGraph_IMediaFilter(This), (DWORD)lTimeOut, (FILTER_STATE*)pFilterState ); 139 157 } 140 158 … … 142 160 IMediaControl_fnRenderFile(IMediaControl* iface,BSTR bstrFileName) 143 161 { 144 CFilterGraph_THIS(iface,mediacontrol); 145 146 FIXME("(%p)->()\n",This); 147 148 return E_NOTIMPL; 162 CFilterGraph_THIS(iface,mediacontrol); 163 UINT uLen; 164 WCHAR* pwszName; 165 HRESULT hr; 166 167 TRACE("(%p)->()\n",This); 168 169 uLen = SysStringLen(bstrFileName); 170 pwszName = (WCHAR*)QUARTZ_AllocMem( sizeof(WCHAR) * (uLen+1) ); 171 if ( pwszName == NULL ) 172 return E_OUTOFMEMORY; 173 memcpy( pwszName, bstrFileName, sizeof(WCHAR)*uLen ); 174 pwszName[uLen] = (WCHAR)0; 175 176 hr = IFilterGraph2_RenderFile( 177 CFilterGraph_IFilterGraph2(This), pwszName, NULL ); 178 179 QUARTZ_FreeMem( pwszName ); 180 181 return hr; 149 182 } 150 183 … … 152 185 IMediaControl_fnAddSourceFilter(IMediaControl* iface,BSTR bstrFileName,IDispatch** ppobj) 153 186 { 154 CFilterGraph_THIS(iface,mediacontrol);155 156 FIXME("(%p)->()\n",This);157 158 return E_NOTIMPL;187 CFilterGraph_THIS(iface,mediacontrol); 188 189 FIXME("(%p)->()\n",This); 190 191 return E_NOTIMPL; 159 192 } 160 193 … … 162 195 IMediaControl_fnget_FilterCollection(IMediaControl* iface,IDispatch** ppobj) 163 196 { 164 CFilterGraph_THIS(iface,mediacontrol);165 166 FIXME("(%p)->()\n",This);167 168 return E_NOTIMPL;197 CFilterGraph_THIS(iface,mediacontrol); 198 199 FIXME("(%p)->()\n",This); 200 201 return E_NOTIMPL; 169 202 } 170 203 … … 172 205 IMediaControl_fnget_RegFilterCollection(IMediaControl* iface,IDispatch** ppobj) 173 206 { 174 CFilterGraph_THIS(iface,mediacontrol);175 176 FIXME("(%p)->()\n",This);177 178 return E_NOTIMPL;207 CFilterGraph_THIS(iface,mediacontrol); 208 209 FIXME("(%p)->()\n",This); 210 211 return E_NOTIMPL; 179 212 } 180 213 … … 182 215 IMediaControl_fnStopWhenReady(IMediaControl* iface) 183 216 { 184 CFilterGraph_THIS(iface,mediacontrol);185 186 FIXME("(%p)->()\n",This);187 188 return E_NOTIMPL;217 CFilterGraph_THIS(iface,mediacontrol); 218 219 TRACE("(%p)->()\n",This); 220 221 return IMediaFilter_Stop( CFilterGraph_IMediaFilter(This) ); 189 222 } 190 223 … … 192 225 static ICOM_VTABLE(IMediaControl) imediacontrol = 193 226 { 194 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE195 /* IUnknown fields */196 IMediaControl_fnQueryInterface,197 IMediaControl_fnAddRef,198 IMediaControl_fnRelease,199 /* IDispatch fields */200 IMediaControl_fnGetTypeInfoCount,201 IMediaControl_fnGetTypeInfo,202 IMediaControl_fnGetIDsOfNames,203 IMediaControl_fnInvoke,204 /* IMediaControl fields */205 IMediaControl_fnRun,206 IMediaControl_fnPause,207 IMediaControl_fnStop,208 IMediaControl_fnGetState,209 IMediaControl_fnRenderFile,210 IMediaControl_fnAddSourceFilter,211 IMediaControl_fnget_FilterCollection,212 IMediaControl_fnget_RegFilterCollection,213 IMediaControl_fnStopWhenReady,227 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 228 /* IUnknown fields */ 229 IMediaControl_fnQueryInterface, 230 IMediaControl_fnAddRef, 231 IMediaControl_fnRelease, 232 /* IDispatch fields */ 233 IMediaControl_fnGetTypeInfoCount, 234 IMediaControl_fnGetTypeInfo, 235 IMediaControl_fnGetIDsOfNames, 236 IMediaControl_fnInvoke, 237 /* IMediaControl fields */ 238 IMediaControl_fnRun, 239 IMediaControl_fnPause, 240 IMediaControl_fnStop, 241 IMediaControl_fnGetState, 242 IMediaControl_fnRenderFile, 243 IMediaControl_fnAddSourceFilter, 244 IMediaControl_fnget_FilterCollection, 245 IMediaControl_fnget_RegFilterCollection, 246 IMediaControl_fnStopWhenReady, 214 247 }; 215 248 216 249 217 void CFilterGraph_InitIMediaControl( CFilterGraph* pfg ) 218 { 219 TRACE("(%p)\n",pfg); 220 ICOM_VTBL(&pfg->mediacontrol) = &imediacontrol; 221 } 250 HRESULT CFilterGraph_InitIMediaControl( CFilterGraph* pfg ) 251 { 252 TRACE("(%p)\n",pfg); 253 ICOM_VTBL(&pfg->mediacontrol) = &imediacontrol; 254 255 return NOERROR; 256 } 257 258 void CFilterGraph_UninitIMediaControl( CFilterGraph* pfg ) 259 { 260 TRACE("(%p)\n",pfg); 261 }  - 
      
trunk/src/quartz/imem.c
r6649 r6710 1 /* $Id: imem.c,v 1.3 2001-09-05 13:36:35 bird Exp $ */2 1 /* 3 2 * Implementation of CLSID_MemoryAllocator. … … 28 27 IMemAllocator_fnQueryInterface(IMemAllocator* iface,REFIID riid,void** ppobj) 29 28 { 30 CMemoryAllocator_THIS(iface,memalloc);29 CMemoryAllocator_THIS(iface,memalloc); 31 30 32 TRACE("(%p)->()\n",This);31 TRACE("(%p)->()\n",This); 33 32 34 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);33 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 35 34 } 36 35 … … 38 37 IMemAllocator_fnAddRef(IMemAllocator* iface) 39 38 { 40 CMemoryAllocator_THIS(iface,memalloc);39 CMemoryAllocator_THIS(iface,memalloc); 41 40 42 TRACE("(%p)->()\n",This);41 TRACE("(%p)->()\n",This); 43 42 44 return IUnknown_AddRef(This->unk.punkControl);43 return IUnknown_AddRef(This->unk.punkControl); 45 44 } 46 45 … … 48 47 IMemAllocator_fnRelease(IMemAllocator* iface) 49 48 { 50 CMemoryAllocator_THIS(iface,memalloc);49 CMemoryAllocator_THIS(iface,memalloc); 51 50 52 TRACE("(%p)->()\n",This);51 TRACE("(%p)->()\n",This); 53 52 54 return IUnknown_Release(This->unk.punkControl);53 return IUnknown_Release(This->unk.punkControl); 55 54 } 56 55 … … 58 57 IMemAllocator_fnSetProperties(IMemAllocator* iface,ALLOCATOR_PROPERTIES* pPropReq,ALLOCATOR_PROPERTIES* pPropActual) 59 58 { 60 CMemoryAllocator_THIS(iface,memalloc); 59 CMemoryAllocator_THIS(iface,memalloc); 60 long padding; 61 61 62 FIXME( "(%p)->() stub!\n", This ); 63 return E_NOTIMPL; 62 TRACE( "(%p)->(%p,%p)\n", This, pPropReq, pPropActual ); 63 64 if ( pPropReq == NULL || pPropActual == NULL ) 65 return E_POINTER; 66 if ( pPropReq->cBuffers < 0 || 67 pPropReq->cbBuffer < 0 || 68 pPropReq->cbAlign < 0 || 69 pPropReq->cbPrefix < 0 ) 70 return E_INVALIDARG; 71 72 if ( ( pPropReq->cbAlign & (pPropReq->cbAlign-1) ) != 0 ) 73 return E_INVALIDARG; 74 75 EnterCriticalSection( &This->csMem ); 76 77 This->prop.cBuffers = pPropReq->cBuffers; 78 This->prop.cbBuffer = pPropReq->cbBuffer; 79 This->prop.cbAlign = pPropReq->cbAlign; 80 This->prop.cbPrefix = pPropReq->cbPrefix; 81 82 if ( This->prop.cbAlign == 0 ) 83 This->prop.cbAlign = 1; 84 padding = This->prop.cbAlign - 85 ( (This->prop.cbBuffer+This->prop.cbPrefix) % This->prop.cbAlign ); 86 87 This->prop.cbBuffer += padding; 88 89 memcpy( pPropActual, &This->prop, sizeof(ALLOCATOR_PROPERTIES) ); 90 91 LeaveCriticalSection( &This->csMem ); 92 93 return NOERROR; 64 94 } 65 95 … … 67 97 IMemAllocator_fnGetProperties(IMemAllocator* iface,ALLOCATOR_PROPERTIES* pProp) 68 98 { 69 CMemoryAllocator_THIS(iface,memalloc);99 CMemoryAllocator_THIS(iface,memalloc); 70 100 71 FIXME( "(%p)->() stub!\n", This ); 72 return E_NOTIMPL; 101 TRACE( "(%p)->(%p)\n", This, pProp ); 102 103 if ( pProp == NULL ) 104 return E_POINTER; 105 106 EnterCriticalSection( &This->csMem ); 107 108 memcpy( pProp, &This->prop, sizeof(ALLOCATOR_PROPERTIES) ); 109 110 LeaveCriticalSection( &This->csMem ); 111 112 return NOERROR; 73 113 } 74 114 … … 76 116 IMemAllocator_fnCommit(IMemAllocator* iface) 77 117 { 78 CMemoryAllocator_THIS(iface,memalloc);118 CMemoryAllocator_THIS(iface,memalloc); 79 119 80 FIXME( "(%p)->() stub!\n", This );81 return E_NOTIMPL;120 FIXME( "(%p)->() stub!\n", This ); 121 return E_NOTIMPL; 82 122 } 83 123 … … 85 125 IMemAllocator_fnDecommit(IMemAllocator* iface) 86 126 { 87 CMemoryAllocator_THIS(iface,memalloc);127 CMemoryAllocator_THIS(iface,memalloc); 88 128 89 FIXME( "(%p)->() stub!\n", This );90 return E_NOTIMPL;129 FIXME( "(%p)->() stub!\n", This ); 130 return E_NOTIMPL; 91 131 } 92 132 … … 94 134 IMemAllocator_fnGetBuffer(IMemAllocator* iface,IMediaSample** ppSample,REFERENCE_TIME* prtStart,REFERENCE_TIME* prtEnd,DWORD dwFlags) 95 135 { 96 CMemoryAllocator_THIS(iface,memalloc);136 CMemoryAllocator_THIS(iface,memalloc); 97 137 98 FIXME( "(%p)->() stub!\n", This );99 return E_NOTIMPL;138 FIXME( "(%p)->() stub!\n", This ); 139 return E_NOTIMPL; 100 140 } 101 141 … … 103 143 IMemAllocator_fnReleaseBuffer(IMemAllocator* iface,IMediaSample* pSample) 104 144 { 105 CMemoryAllocator_THIS(iface,memalloc);145 CMemoryAllocator_THIS(iface,memalloc); 106 146 107 FIXME( "(%p)->() stub!\n", This );108 return E_NOTIMPL;147 FIXME( "(%p)->() stub!\n", This ); 148 return E_NOTIMPL; 109 149 } 110 150 … … 113 153 static ICOM_VTABLE(IMemAllocator) imemalloc = 114 154 { 115 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE116 /* IUnknown fields */117 IMemAllocator_fnQueryInterface,118 IMemAllocator_fnAddRef,119 IMemAllocator_fnRelease,120 /* IMemAllocator fields */121 IMemAllocator_fnSetProperties,122 IMemAllocator_fnGetProperties,123 IMemAllocator_fnCommit,124 IMemAllocator_fnDecommit,125 IMemAllocator_fnGetBuffer,126 IMemAllocator_fnReleaseBuffer,155 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 156 /* IUnknown fields */ 157 IMemAllocator_fnQueryInterface, 158 IMemAllocator_fnAddRef, 159 IMemAllocator_fnRelease, 160 /* IMemAllocator fields */ 161 IMemAllocator_fnSetProperties, 162 IMemAllocator_fnGetProperties, 163 IMemAllocator_fnCommit, 164 IMemAllocator_fnDecommit, 165 IMemAllocator_fnGetBuffer, 166 IMemAllocator_fnReleaseBuffer, 127 167 }; 128 168 129 169 130 voidCMemoryAllocator_InitIMemAllocator( CMemoryAllocator* pma )170 HRESULT CMemoryAllocator_InitIMemAllocator( CMemoryAllocator* pma ) 131 171 { 132 TRACE("(%p)\n",pma); 133 ICOM_VTBL(&pma->memalloc) = &imemalloc; 172 TRACE("(%p)\n",pma); 173 174 ICOM_VTBL(&pma->memalloc) = &imemalloc; 175 176 ZeroMemory( &pma->prop, sizeof(pma->prop) ); 177 178 InitializeCriticalSection( &pma->csMem ); 179 180 return NOERROR; 134 181 } 182 183 void CMemoryAllocator_UninitIMemAllocator( CMemoryAllocator* pma ) 184 { 185 TRACE("(%p)\n",pma); 186 187 IMemAllocator_Decommit( (IMemAllocator*)(&pma->memalloc) ); 188 189 DeleteCriticalSection( &pma->csMem ); 190 }  - 
      
trunk/src/quartz/imevent.c
r6649 r6710 1 /* $Id: imevent.c,v 1.2 2001-09-05 13:36:36 bird Exp $ */2 1 /* 3 2 * Implementation of IMediaEvent[Ex] for FilterGraph. … … 31 30 IMediaEventEx_fnQueryInterface(IMediaEventEx* iface,REFIID riid,void** ppobj) 32 31 { 33 CFilterGraph_THIS(iface,mediaevent);34 35 TRACE("(%p)->()\n",This);36 37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);32 CFilterGraph_THIS(iface,mediaevent); 33 34 TRACE("(%p)->()\n",This); 35 36 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 38 37 } 39 38 … … 41 40 IMediaEventEx_fnAddRef(IMediaEventEx* iface) 42 41 { 43 CFilterGraph_THIS(iface,mediaevent);44 45 TRACE("(%p)->()\n",This);46 47 return IUnknown_AddRef(This->unk.punkControl);42 CFilterGraph_THIS(iface,mediaevent); 43 44 TRACE("(%p)->()\n",This); 45 46 return IUnknown_AddRef(This->unk.punkControl); 48 47 } 49 48 … … 51 50 IMediaEventEx_fnRelease(IMediaEventEx* iface) 52 51 { 53 CFilterGraph_THIS(iface,mediaevent);54 55 TRACE("(%p)->()\n",This);56 57 return IUnknown_Release(This->unk.punkControl);52 CFilterGraph_THIS(iface,mediaevent); 53 54 TRACE("(%p)->()\n",This); 55 56 return IUnknown_Release(This->unk.punkControl); 58 57 } 59 58 … … 61 60 IMediaEventEx_fnGetTypeInfoCount(IMediaEventEx* iface,UINT* pcTypeInfo) 62 61 { 63 CFilterGraph_THIS(iface,mediaevent);64 65 FIXME("(%p)->()\n",This);66 67 return E_NOTIMPL;62 CFilterGraph_THIS(iface,mediaevent); 63 64 FIXME("(%p)->()\n",This); 65 66 return E_NOTIMPL; 68 67 } 69 68 … … 71 70 IMediaEventEx_fnGetTypeInfo(IMediaEventEx* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj) 72 71 { 73 CFilterGraph_THIS(iface,mediaevent);74 75 FIXME("(%p)->()\n",This);76 77 return E_NOTIMPL;72 CFilterGraph_THIS(iface,mediaevent); 73 74 FIXME("(%p)->()\n",This); 75 76 return E_NOTIMPL; 78 77 } 79 78 … … 81 80 IMediaEventEx_fnGetIDsOfNames(IMediaEventEx* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId) 82 81 { 83 CFilterGraph_THIS(iface,mediaevent);84 85 FIXME("(%p)->()\n",This);86 87 return E_NOTIMPL;82 CFilterGraph_THIS(iface,mediaevent); 83 84 FIXME("(%p)->()\n",This); 85 86 return E_NOTIMPL; 88 87 } 89 88 … … 91 90 IMediaEventEx_fnInvoke(IMediaEventEx* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr) 92 91 { 93 CFilterGraph_THIS(iface,mediaevent);94 95 FIXME("(%p)->()\n",This);96 97 return E_NOTIMPL;92 CFilterGraph_THIS(iface,mediaevent); 93 94 FIXME("(%p)->()\n",This); 95 96 return E_NOTIMPL; 98 97 } 99 98 … … 102 101 IMediaEventEx_fnGetEventHandle(IMediaEventEx* iface,OAEVENT* hEvent) 103 102 { 104 CFilterGraph_THIS(iface,mediaevent); 105 106 FIXME("(%p)->() stub!\n",This); 107 108 return E_NOTIMPL; 103 CFilterGraph_THIS(iface,mediaevent); 104 105 TRACE("(%p)->()\n",This); 106 107 *hEvent = (OAEVENT)This->m_hMediaEvent; 108 109 return NOERROR; 109 110 } 110 111 … … 112 113 IMediaEventEx_fnGetEvent(IMediaEventEx* iface,long* lEventCode,LONG_PTR* plParam1,LONG_PTR* plParam2,long lTimeOut) 113 114 { 114 CFilterGraph_THIS(iface,mediaevent);115 116 FIXME("(%p)->() stub!\n",This);117 118 return E_NOTIMPL;115 CFilterGraph_THIS(iface,mediaevent); 116 117 FIXME("(%p)->() stub!\n",This); 118 119 return E_NOTIMPL; 119 120 } 120 121 … … 122 123 IMediaEventEx_fnWaitForCompletion(IMediaEventEx* iface,long lTimeOut,long* plEventCode) 123 124 { 124 CFilterGraph_THIS(iface,mediaevent);125 126 FIXME("(%p)->() stub!\n",This);127 128 return E_NOTIMPL;125 CFilterGraph_THIS(iface,mediaevent); 126 127 FIXME("(%p)->() stub!\n",This); 128 129 return E_NOTIMPL; 129 130 } 130 131 … … 132 133 IMediaEventEx_fnCancelDefaultHandling(IMediaEventEx* iface,long lEventCode) 133 134 { 134 CFilterGraph_THIS(iface,mediaevent);135 136 FIXME("(%p)->() stub!\n",This);137 138 return E_NOTIMPL;135 CFilterGraph_THIS(iface,mediaevent); 136 137 FIXME("(%p)->() stub!\n",This); 138 139 return E_NOTIMPL; 139 140 } 140 141 … … 142 143 IMediaEventEx_fnRestoreDefaultHandling(IMediaEventEx* iface,long lEventCode) 143 144 { 144 CFilterGraph_THIS(iface,mediaevent);145 146 FIXME("(%p)->() stub!\n",This);147 148 return E_NOTIMPL;145 CFilterGraph_THIS(iface,mediaevent); 146 147 FIXME("(%p)->() stub!\n",This); 148 149 return E_NOTIMPL; 149 150 } 150 151 … … 152 153 IMediaEventEx_fnFreeEventParams(IMediaEventEx* iface,long lEventCode,LONG_PTR lParam1,LONG_PTR lParam2) 153 154 { 154 CFilterGraph_THIS(iface,mediaevent);155 156 FIXME("(%p)->() stub!\n",This);157 158 return E_NOTIMPL;155 CFilterGraph_THIS(iface,mediaevent); 156 157 FIXME("(%p)->() stub!\n",This); 158 159 return E_NOTIMPL; 159 160 } 160 161 … … 162 163 IMediaEventEx_fnSetNotifyWindow(IMediaEventEx* iface,OAHWND hwnd,long message,LONG_PTR lParam) 163 164 { 164 CFilterGraph_THIS(iface,mediaevent);165 166 FIXME("(%p)->() stub!\n",This);167 168 return E_NOTIMPL;165 CFilterGraph_THIS(iface,mediaevent); 166 167 FIXME("(%p)->() stub!\n",This); 168 169 return E_NOTIMPL; 169 170 } 170 171 … … 172 173 IMediaEventEx_fnSetNotifyFlags(IMediaEventEx* iface,long lNotifyFlags) 173 174 { 174 CFilterGraph_THIS(iface,mediaevent);175 176 FIXME("(%p)->() stub!\n",This);177 178 return E_NOTIMPL;175 CFilterGraph_THIS(iface,mediaevent); 176 177 FIXME("(%p)->() stub!\n",This); 178 179 return E_NOTIMPL; 179 180 } 180 181 … … 182 183 IMediaEventEx_fnGetNotifyFlags(IMediaEventEx* iface,long* plNotifyFlags) 183 184 { 184 CFilterGraph_THIS(iface,mediaevent);185 186 FIXME("(%p)->() stub!\n",This);187 188 return E_NOTIMPL;185 CFilterGraph_THIS(iface,mediaevent); 186 187 FIXME("(%p)->() stub!\n",This); 188 189 return E_NOTIMPL; 189 190 } 190 191 … … 193 194 static ICOM_VTABLE(IMediaEventEx) imediaevent = 194 195 { 195 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE196 /* IUnknown fields */197 IMediaEventEx_fnQueryInterface,198 IMediaEventEx_fnAddRef,199 IMediaEventEx_fnRelease,200 /* IDispatch fields */201 IMediaEventEx_fnGetTypeInfoCount,202 IMediaEventEx_fnGetTypeInfo,203 IMediaEventEx_fnGetIDsOfNames,204 IMediaEventEx_fnInvoke,205 /* IMediaEvent fields */206 IMediaEventEx_fnGetEventHandle,207 IMediaEventEx_fnGetEvent,208 IMediaEventEx_fnWaitForCompletion,209 IMediaEventEx_fnCancelDefaultHandling,210 IMediaEventEx_fnRestoreDefaultHandling,211 IMediaEventEx_fnFreeEventParams,212 /* IMediaEventEx fields */213 IMediaEventEx_fnSetNotifyWindow,214 IMediaEventEx_fnSetNotifyFlags,215 IMediaEventEx_fnGetNotifyFlags,196 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 197 /* IUnknown fields */ 198 IMediaEventEx_fnQueryInterface, 199 IMediaEventEx_fnAddRef, 200 IMediaEventEx_fnRelease, 201 /* IDispatch fields */ 202 IMediaEventEx_fnGetTypeInfoCount, 203 IMediaEventEx_fnGetTypeInfo, 204 IMediaEventEx_fnGetIDsOfNames, 205 IMediaEventEx_fnInvoke, 206 /* IMediaEvent fields */ 207 IMediaEventEx_fnGetEventHandle, 208 IMediaEventEx_fnGetEvent, 209 IMediaEventEx_fnWaitForCompletion, 210 IMediaEventEx_fnCancelDefaultHandling, 211 IMediaEventEx_fnRestoreDefaultHandling, 212 IMediaEventEx_fnFreeEventParams, 213 /* IMediaEventEx fields */ 214 IMediaEventEx_fnSetNotifyWindow, 215 IMediaEventEx_fnSetNotifyFlags, 216 IMediaEventEx_fnGetNotifyFlags, 216 217 }; 217 218 218 219 219 void CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg ) 220 { 221 TRACE("(%p)\n",pfg); 222 ICOM_VTBL(&pfg->mediaevent) = &imediaevent; 223 } 220 HRESULT CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg ) 221 { 222 TRACE("(%p)\n",pfg); 223 ICOM_VTBL(&pfg->mediaevent) = &imediaevent; 224 225 pfg->m_hMediaEvent = CreateEventA( NULL, TRUE, FALSE, NULL ); 226 if ( pfg->m_hMediaEvent == (HANDLE)NULL ) 227 return E_OUTOFMEMORY; 228 229 return NOERROR; 230 } 231 232 void CFilterGraph_UninitIMediaEventEx( CFilterGraph* pfg ) 233 { 234 TRACE("(%p)\n",pfg); 235 236 CloseHandle( pfg->m_hMediaEvent ); 237 }  - 
      
trunk/src/quartz/impos.c
r6649 r6710 1 /* $Id: impos.c,v 1.2 2001-09-05 13:36:36 bird Exp $ */2 1 /* 3 2 * Implementation of IMediaPosition for FilterGraph. … … 30 29 IMediaPosition_fnQueryInterface(IMediaPosition* iface,REFIID riid,void** ppobj) 31 30 { 32 CFilterGraph_THIS(iface,mediaposition);33 34 TRACE("(%p)->()\n",This);35 36 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);31 CFilterGraph_THIS(iface,mediaposition); 32 33 TRACE("(%p)->()\n",This); 34 35 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 37 36 } 38 37 … … 40 39 IMediaPosition_fnAddRef(IMediaPosition* iface) 41 40 { 42 CFilterGraph_THIS(iface,mediaposition);43 44 TRACE("(%p)->()\n",This);45 46 return IUnknown_AddRef(This->unk.punkControl);41 CFilterGraph_THIS(iface,mediaposition); 42 43 TRACE("(%p)->()\n",This); 44 45 return IUnknown_AddRef(This->unk.punkControl); 47 46 } 48 47 … … 50 49 IMediaPosition_fnRelease(IMediaPosition* iface) 51 50 { 52 CFilterGraph_THIS(iface,mediaposition);53 54 TRACE("(%p)->()\n",This);55 56 return IUnknown_Release(This->unk.punkControl);51 CFilterGraph_THIS(iface,mediaposition); 52 53 TRACE("(%p)->()\n",This); 54 55 return IUnknown_Release(This->unk.punkControl); 57 56 } 58 57 … … 60 59 IMediaPosition_fnGetTypeInfoCount(IMediaPosition* iface,UINT* pcTypeInfo) 61 60 { 62 CFilterGraph_THIS(iface,mediaposition); 63 64 FIXME("(%p)->()\n",This); 65 66 return E_NOTIMPL; 61 CFilterGraph_THIS(iface,mediaposition); 62 63 TRACE("(%p)->()\n",This); 64 65 return IDispatch_GetTypeInfoCount( 66 CFilterGraph_IDispatch(This),pcTypeInfo); 67 67 } 68 68 … … 70 70 IMediaPosition_fnGetTypeInfo(IMediaPosition* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj) 71 71 { 72 CFilterGraph_THIS(iface,mediaposition); 73 74 FIXME("(%p)->()\n",This); 75 76 return E_NOTIMPL; 72 CFilterGraph_THIS(iface,mediaposition); 73 74 TRACE("(%p)->()\n",This); 75 76 return IDispatch_GetTypeInfo( 77 CFilterGraph_IDispatch(This),iTypeInfo,lcid,ppobj); 77 78 } 78 79 … … 80 81 IMediaPosition_fnGetIDsOfNames(IMediaPosition* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId) 81 82 { 82 CFilterGraph_THIS(iface,mediaposition); 83 84 FIXME("(%p)->()\n",This); 85 86 return E_NOTIMPL; 83 CFilterGraph_THIS(iface,mediaposition); 84 85 TRACE("(%p)->()\n",This); 86 87 return IDispatch_GetIDsOfNames( 88 CFilterGraph_IDispatch(This),riid,ppwszName,cNames,lcid,pDispId); 87 89 } 88 90 … … 90 92 IMediaPosition_fnInvoke(IMediaPosition* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr) 91 93 { 92 CFilterGraph_THIS(iface,mediaposition); 93 94 FIXME("(%p)->()\n",This); 95 96 return E_NOTIMPL; 94 CFilterGraph_THIS(iface,mediaposition); 95 96 TRACE("(%p)->()\n",This); 97 98 return IDispatch_Invoke( 99 CFilterGraph_IDispatch(This), 100 DispId,riid,lcid,wFlags,pDispParams,pVarRes,pExcepInfo,puArgErr); 97 101 } 98 102 … … 101 105 IMediaPosition_fnget_Duration(IMediaPosition* iface,REFTIME* prefTime) 102 106 { 103 CFilterGraph_THIS(iface,mediaposition);104 105 FIXME("(%p)->() stub!\n",This);106 107 return E_NOTIMPL;107 CFilterGraph_THIS(iface,mediaposition); 108 109 FIXME("(%p)->() stub!\n",This); 110 111 return E_NOTIMPL; 108 112 } 109 113 … … 111 115 IMediaPosition_fnput_CurrentPosition(IMediaPosition* iface,REFTIME refTime) 112 116 { 113 CFilterGraph_THIS(iface,mediaposition);114 115 FIXME("(%p)->() stub!\n",This);116 117 return E_NOTIMPL;117 CFilterGraph_THIS(iface,mediaposition); 118 119 FIXME("(%p)->() stub!\n",This); 120 121 return E_NOTIMPL; 118 122 } 119 123 … … 121 125 IMediaPosition_fnget_CurrentPosition(IMediaPosition* iface,REFTIME* prefTime) 122 126 { 123 CFilterGraph_THIS(iface,mediaposition);124 125 FIXME("(%p)->() stub!\n",This);126 127 return E_NOTIMPL;127 CFilterGraph_THIS(iface,mediaposition); 128 129 FIXME("(%p)->() stub!\n",This); 130 131 return E_NOTIMPL; 128 132 } 129 133 … … 131 135 IMediaPosition_fnget_StopTime(IMediaPosition* iface,REFTIME* prefTime) 132 136 { 133 CFilterGraph_THIS(iface,mediaposition);134 135 FIXME("(%p)->() stub!\n",This);136 137 return E_NOTIMPL;137 CFilterGraph_THIS(iface,mediaposition); 138 139 FIXME("(%p)->() stub!\n",This); 140 141 return E_NOTIMPL; 138 142 } 139 143 … … 141 145 IMediaPosition_fnput_StopTime(IMediaPosition* iface,REFTIME refTime) 142 146 { 143 CFilterGraph_THIS(iface,mediaposition);144 145 FIXME("(%p)->() stub!\n",This);146 147 return E_NOTIMPL;147 CFilterGraph_THIS(iface,mediaposition); 148 149 FIXME("(%p)->() stub!\n",This); 150 151 return E_NOTIMPL; 148 152 } 149 153 … … 151 155 IMediaPosition_fnget_PrerollTime(IMediaPosition* iface,REFTIME* prefTime) 152 156 { 153 CFilterGraph_THIS(iface,mediaposition);154 155 FIXME("(%p)->() stub!\n",This);156 157 return E_NOTIMPL;157 CFilterGraph_THIS(iface,mediaposition); 158 159 FIXME("(%p)->() stub!\n",This); 160 161 return E_NOTIMPL; 158 162 } 159 163 … … 161 165 IMediaPosition_fnput_PrerollTime(IMediaPosition* iface,REFTIME refTime) 162 166 { 163 CFilterGraph_THIS(iface,mediaposition);164 165 FIXME("(%p)->() stub!\n",This);166 167 return E_NOTIMPL;167 CFilterGraph_THIS(iface,mediaposition); 168 169 FIXME("(%p)->() stub!\n",This); 170 171 return E_NOTIMPL; 168 172 } 169 173 … … 171 175 IMediaPosition_fnput_Rate(IMediaPosition* iface,double dblRate) 172 176 { 173 CFilterGraph_THIS(iface,mediaposition);174 175 FIXME("(%p)->() stub!\n",This);176 177 return E_NOTIMPL;177 CFilterGraph_THIS(iface,mediaposition); 178 179 FIXME("(%p)->() stub!\n",This); 180 181 return E_NOTIMPL; 178 182 } 179 183 … … 181 185 IMediaPosition_fnget_Rate(IMediaPosition* iface,double* pdblRate) 182 186 { 183 CFilterGraph_THIS(iface,mediaposition);184 185 FIXME("(%p)->() stub!\n",This);186 187 return E_NOTIMPL;187 CFilterGraph_THIS(iface,mediaposition); 188 189 FIXME("(%p)->() stub!\n",This); 190 191 return E_NOTIMPL; 188 192 } 189 193 … … 191 195 IMediaPosition_fnCanSeekForward(IMediaPosition* iface,LONG* pCanSeek) 192 196 { 193 CFilterGraph_THIS(iface,mediaposition);194 195 FIXME("(%p)->() stub!\n",This);196 197 return E_NOTIMPL;197 CFilterGraph_THIS(iface,mediaposition); 198 199 FIXME("(%p)->() stub!\n",This); 200 201 return E_NOTIMPL; 198 202 } 199 203 … … 201 205 IMediaPosition_fnCanSeekBackward(IMediaPosition* iface,LONG* pCanSeek) 202 206 { 203 CFilterGraph_THIS(iface,mediaposition);204 205 FIXME("(%p)->() stub!\n",This);206 207 return E_NOTIMPL;207 CFilterGraph_THIS(iface,mediaposition); 208 209 FIXME("(%p)->() stub!\n",This); 210 211 return E_NOTIMPL; 208 212 } 209 213 … … 211 215 static ICOM_VTABLE(IMediaPosition) imediaposition = 212 216 { 213 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE214 /* IUnknown fields */215 IMediaPosition_fnQueryInterface,216 IMediaPosition_fnAddRef,217 IMediaPosition_fnRelease,218 /* IDispatch fields */219 IMediaPosition_fnGetTypeInfoCount,220 IMediaPosition_fnGetTypeInfo,221 IMediaPosition_fnGetIDsOfNames,222 IMediaPosition_fnInvoke,223 /* IMediaPosition fields */224 IMediaPosition_fnget_Duration,225 IMediaPosition_fnput_CurrentPosition,226 IMediaPosition_fnget_CurrentPosition,227 IMediaPosition_fnget_StopTime,228 IMediaPosition_fnput_StopTime,229 IMediaPosition_fnget_PrerollTime,230 IMediaPosition_fnput_PrerollTime,231 IMediaPosition_fnput_Rate,232 IMediaPosition_fnget_Rate,233 IMediaPosition_fnCanSeekForward,234 IMediaPosition_fnCanSeekBackward,217 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 218 /* IUnknown fields */ 219 IMediaPosition_fnQueryInterface, 220 IMediaPosition_fnAddRef, 221 IMediaPosition_fnRelease, 222 /* IDispatch fields */ 223 IMediaPosition_fnGetTypeInfoCount, 224 IMediaPosition_fnGetTypeInfo, 225 IMediaPosition_fnGetIDsOfNames, 226 IMediaPosition_fnInvoke, 227 /* IMediaPosition fields */ 228 IMediaPosition_fnget_Duration, 229 IMediaPosition_fnput_CurrentPosition, 230 IMediaPosition_fnget_CurrentPosition, 231 IMediaPosition_fnget_StopTime, 232 IMediaPosition_fnput_StopTime, 233 IMediaPosition_fnget_PrerollTime, 234 IMediaPosition_fnput_PrerollTime, 235 IMediaPosition_fnput_Rate, 236 IMediaPosition_fnget_Rate, 237 IMediaPosition_fnCanSeekForward, 238 IMediaPosition_fnCanSeekBackward, 235 239 }; 236 240 237 241 238 void CFilterGraph_InitIMediaPosition( CFilterGraph* pfg ) 239 { 240 TRACE("(%p)\n",pfg); 241 ICOM_VTBL(&pfg->mediaposition) = &imediaposition; 242 } 242 HRESULT CFilterGraph_InitIMediaPosition( CFilterGraph* pfg ) 243 { 244 TRACE("(%p)\n",pfg); 245 ICOM_VTBL(&pfg->mediaposition) = &imediaposition; 246 247 return NOERROR; 248 } 249 250 void CFilterGraph_UninitIMediaPosition( CFilterGraph* pfg ) 251 { 252 TRACE("(%p)\n",pfg); 253 }  - 
      
trunk/src/quartz/imseek.c
r6649 r6710 1 /* $Id: imseek.c,v 1.2 2001-09-05 13:36:36 bird Exp $ */2 1 /* 3 2 * Implementation of IMediaSeeking for FilterGraph. … … 31 30 IMediaSeeking_fnQueryInterface(IMediaSeeking* iface,REFIID riid,void** ppobj) 32 31 { 33 CFilterGraph_THIS(iface,mediaseeking);34 35 TRACE("(%p)->()\n",This);36 37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);32 CFilterGraph_THIS(iface,mediaseeking); 33 34 TRACE("(%p)->()\n",This); 35 36 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 38 37 } 39 38 … … 41 40 IMediaSeeking_fnAddRef(IMediaSeeking* iface) 42 41 { 43 CFilterGraph_THIS(iface,mediaseeking);44 45 TRACE("(%p)->()\n",This);46 47 return IUnknown_AddRef(This->unk.punkControl);42 CFilterGraph_THIS(iface,mediaseeking); 43 44 TRACE("(%p)->()\n",This); 45 46 return IUnknown_AddRef(This->unk.punkControl); 48 47 } 49 48 … … 51 50 IMediaSeeking_fnRelease(IMediaSeeking* iface) 52 51 { 53 CFilterGraph_THIS(iface,mediaseeking);54 55 TRACE("(%p)->()\n",This);56 57 return IUnknown_Release(This->unk.punkControl);52 CFilterGraph_THIS(iface,mediaseeking); 53 54 TRACE("(%p)->()\n",This); 55 56 return IUnknown_Release(This->unk.punkControl); 58 57 } 59 58 … … 62 61 IMediaSeeking_fnGetCapabilities(IMediaSeeking* iface,DWORD* pdwCaps) 63 62 { 64 CFilterGraph_THIS(iface,mediaseeking);65 66 FIXME("(%p)->() stub!\n",This);67 68 return E_NOTIMPL;63 CFilterGraph_THIS(iface,mediaseeking); 64 65 FIXME("(%p)->() stub!\n",This); 66 67 return E_NOTIMPL; 69 68 } 70 69 … … 72 71 IMediaSeeking_fnCheckCapabilities(IMediaSeeking* iface,DWORD* pdwCaps) 73 72 { 74 CFilterGraph_THIS(iface,mediaseeking);75 76 FIXME("(%p)->() stub!\n",This);77 78 return E_NOTIMPL;73 CFilterGraph_THIS(iface,mediaseeking); 74 75 FIXME("(%p)->() stub!\n",This); 76 77 return E_NOTIMPL; 79 78 } 80 79 … … 82 81 IMediaSeeking_fnIsFormatSupported(IMediaSeeking* iface,const GUID* pidFormat) 83 82 { 84 CFilterGraph_THIS(iface,mediaseeking);85 86 FIXME("(%p)->() stub!\n",This);87 88 return E_NOTIMPL;83 CFilterGraph_THIS(iface,mediaseeking); 84 85 FIXME("(%p)->() stub!\n",This); 86 87 return E_NOTIMPL; 89 88 } 90 89 … … 92 91 IMediaSeeking_fnQueryPreferredFormat(IMediaSeeking* iface,GUID* pidFormat) 93 92 { 94 CFilterGraph_THIS(iface,mediaseeking);95 96 FIXME("(%p)->() stub!\n",This);97 98 return E_NOTIMPL;93 CFilterGraph_THIS(iface,mediaseeking); 94 95 FIXME("(%p)->() stub!\n",This); 96 97 return E_NOTIMPL; 99 98 } 100 99 … … 102 101 IMediaSeeking_fnGetTimeFormat(IMediaSeeking* iface,GUID* pidFormat) 103 102 { 104 CFilterGraph_THIS(iface,mediaseeking);105 106 FIXME("(%p)->() stub!\n",This);107 108 return E_NOTIMPL;103 CFilterGraph_THIS(iface,mediaseeking); 104 105 FIXME("(%p)->() stub!\n",This); 106 107 return E_NOTIMPL; 109 108 } 110 109 … … 112 111 IMediaSeeking_fnIsUsingTimeFormat(IMediaSeeking* iface,const GUID* pidFormat) 113 112 { 114 CFilterGraph_THIS(iface,mediaseeking);115 116 FIXME("(%p)->() stub!\n",This);117 118 return E_NOTIMPL;113 CFilterGraph_THIS(iface,mediaseeking); 114 115 FIXME("(%p)->() stub!\n",This); 116 117 return E_NOTIMPL; 119 118 } 120 119 … … 122 121 IMediaSeeking_fnSetTimeFormat(IMediaSeeking* iface,const GUID* pidFormat) 123 122 { 124 CFilterGraph_THIS(iface,mediaseeking);125 126 FIXME("(%p)->() stub!\n",This);127 128 return E_NOTIMPL;123 CFilterGraph_THIS(iface,mediaseeking); 124 125 FIXME("(%p)->() stub!\n",This); 126 127 return E_NOTIMPL; 129 128 } 130 129 … … 132 131 IMediaSeeking_fnGetDuration(IMediaSeeking* iface,LONGLONG* pllDuration) 133 132 { 134 CFilterGraph_THIS(iface,mediaseeking);135 136 FIXME("(%p)->() stub!\n",This);137 138 return E_NOTIMPL;133 CFilterGraph_THIS(iface,mediaseeking); 134 135 FIXME("(%p)->() stub!\n",This); 136 137 return E_NOTIMPL; 139 138 } 140 139 … … 142 141 IMediaSeeking_fnGetStopPosition(IMediaSeeking* iface,LONGLONG* pllPos) 143 142 { 144 CFilterGraph_THIS(iface,mediaseeking);145 146 FIXME("(%p)->() stub!\n",This);147 148 return E_NOTIMPL;143 CFilterGraph_THIS(iface,mediaseeking); 144 145 FIXME("(%p)->() stub!\n",This); 146 147 return E_NOTIMPL; 149 148 } 150 149 … … 152 151 IMediaSeeking_fnGetCurrentPosition(IMediaSeeking* iface,LONGLONG* pllPos) 153 152 { 154 CFilterGraph_THIS(iface,mediaseeking);155 156 FIXME("(%p)->() stub!\n",This);157 158 return E_NOTIMPL;153 CFilterGraph_THIS(iface,mediaseeking); 154 155 FIXME("(%p)->() stub!\n",This); 156 157 return E_NOTIMPL; 159 158 } 160 159 … … 162 161 IMediaSeeking_fnConvertTimeFormat(IMediaSeeking* iface,LONGLONG* pllOut,const GUID* pidFmtOut,LONGLONG llIn,const GUID* pidFmtIn) 163 162 { 164 CFilterGraph_THIS(iface,mediaseeking);165 166 FIXME("(%p)->() stub!\n",This);167 168 return E_NOTIMPL;163 CFilterGraph_THIS(iface,mediaseeking); 164 165 FIXME("(%p)->() stub!\n",This); 166 167 return E_NOTIMPL; 169 168 } 170 169 … … 172 171 IMediaSeeking_fnSetPositions(IMediaSeeking* iface,LONGLONG* pllCur,DWORD dwCurFlags,LONGLONG* pllStop,DWORD dwStopFlags) 173 172 { 174 CFilterGraph_THIS(iface,mediaseeking);175 176 FIXME("(%p)->() stub!\n",This);177 178 return E_NOTIMPL;173 CFilterGraph_THIS(iface,mediaseeking); 174 175 FIXME("(%p)->() stub!\n",This); 176 177 return E_NOTIMPL; 179 178 } 180 179 … … 182 181 IMediaSeeking_fnGetPositions(IMediaSeeking* iface,LONGLONG* pllCur,LONGLONG* pllStop) 183 182 { 184 CFilterGraph_THIS(iface,mediaseeking);185 186 FIXME("(%p)->() stub!\n",This);187 188 return E_NOTIMPL;183 CFilterGraph_THIS(iface,mediaseeking); 184 185 FIXME("(%p)->() stub!\n",This); 186 187 return E_NOTIMPL; 189 188 } 190 189 … … 192 191 IMediaSeeking_fnGetAvailable(IMediaSeeking* iface,LONGLONG* pllFirst,LONGLONG* pllLast) 193 192 { 194 CFilterGraph_THIS(iface,mediaseeking);195 196 FIXME("(%p)->() stub!\n",This);197 198 return E_NOTIMPL;193 CFilterGraph_THIS(iface,mediaseeking); 194 195 FIXME("(%p)->() stub!\n",This); 196 197 return E_NOTIMPL; 199 198 } 200 199 … … 202 201 IMediaSeeking_fnSetRate(IMediaSeeking* iface,double dblRate) 203 202 { 204 CFilterGraph_THIS(iface,mediaseeking);205 206 FIXME("(%p)->() stub!\n",This);207 208 return E_NOTIMPL;203 CFilterGraph_THIS(iface,mediaseeking); 204 205 FIXME("(%p)->() stub!\n",This); 206 207 return E_NOTIMPL; 209 208 } 210 209 … … 212 211 IMediaSeeking_fnGetRate(IMediaSeeking* iface,double* pdblRate) 213 212 { 214 CFilterGraph_THIS(iface,mediaseeking);215 216 FIXME("(%p)->() stub!\n",This);217 218 return E_NOTIMPL;213 CFilterGraph_THIS(iface,mediaseeking); 214 215 FIXME("(%p)->() stub!\n",This); 216 217 return E_NOTIMPL; 219 218 } 220 219 … … 222 221 IMediaSeeking_fnGetPreroll(IMediaSeeking* iface,LONGLONG* pllPreroll) 223 222 { 224 CFilterGraph_THIS(iface,mediaseeking);225 226 FIXME("(%p)->() stub!\n",This);227 228 return E_NOTIMPL;223 CFilterGraph_THIS(iface,mediaseeking); 224 225 FIXME("(%p)->() stub!\n",This); 226 227 return E_NOTIMPL; 229 228 } 230 229 … … 234 233 static ICOM_VTABLE(IMediaSeeking) imediaseeking = 235 234 { 236 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE237 /* IUnknown fields */238 IMediaSeeking_fnQueryInterface,239 IMediaSeeking_fnAddRef,240 IMediaSeeking_fnRelease,241 /* IMediaSeeking fields */242 IMediaSeeking_fnGetCapabilities,243 IMediaSeeking_fnCheckCapabilities,244 IMediaSeeking_fnIsFormatSupported,245 IMediaSeeking_fnQueryPreferredFormat,246 IMediaSeeking_fnGetTimeFormat,247 IMediaSeeking_fnIsUsingTimeFormat,248 IMediaSeeking_fnSetTimeFormat,249 IMediaSeeking_fnGetDuration,250 IMediaSeeking_fnGetStopPosition,251 IMediaSeeking_fnGetCurrentPosition,252 IMediaSeeking_fnConvertTimeFormat,253 IMediaSeeking_fnSetPositions,254 IMediaSeeking_fnGetPositions,255 IMediaSeeking_fnGetAvailable,256 IMediaSeeking_fnSetRate,257 IMediaSeeking_fnGetRate,258 IMediaSeeking_fnGetPreroll,235 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 236 /* IUnknown fields */ 237 IMediaSeeking_fnQueryInterface, 238 IMediaSeeking_fnAddRef, 239 IMediaSeeking_fnRelease, 240 /* IMediaSeeking fields */ 241 IMediaSeeking_fnGetCapabilities, 242 IMediaSeeking_fnCheckCapabilities, 243 IMediaSeeking_fnIsFormatSupported, 244 IMediaSeeking_fnQueryPreferredFormat, 245 IMediaSeeking_fnGetTimeFormat, 246 IMediaSeeking_fnIsUsingTimeFormat, 247 IMediaSeeking_fnSetTimeFormat, 248 IMediaSeeking_fnGetDuration, 249 IMediaSeeking_fnGetStopPosition, 250 IMediaSeeking_fnGetCurrentPosition, 251 IMediaSeeking_fnConvertTimeFormat, 252 IMediaSeeking_fnSetPositions, 253 IMediaSeeking_fnGetPositions, 254 IMediaSeeking_fnGetAvailable, 255 IMediaSeeking_fnSetRate, 256 IMediaSeeking_fnGetRate, 257 IMediaSeeking_fnGetPreroll, 259 258 }; 260 259 261 void CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg ) 262 { 263 TRACE("(%p)\n",pfg); 264 ICOM_VTBL(&pfg->mediaseeking) = &imediaseeking; 265 } 260 HRESULT CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg ) 261 { 262 TRACE("(%p)\n",pfg); 263 ICOM_VTBL(&pfg->mediaseeking) = &imediaseeking; 264 265 return NOERROR; 266 } 267 268 void CFilterGraph_UninitIMediaSeeking( CFilterGraph* pfg ) 269 { 270 TRACE("(%p)\n",pfg); 271 }  - 
      
trunk/src/quartz/initquartz.cpp
r6649 r6710 1 /* $Id: initquartz.cpp,v 1.2 2001-09-05 13:36:36 bird Exp $ */2 1 /* 3 2 * DLL entry point … … 56 55 case DLL_THREAD_ATTACH: 57 56 case DLL_THREAD_DETACH: 58 return QUARTZ_DllMain(hinstDLL, fdwReason, fImpLoad);57 return QUARTZ_DllMain(hinstDLL, fdwReason, fImpLoad); 59 58 60 59 case DLL_PROCESS_DETACH: 61 60 ret = QUARTZ_DllMain(hinstDLL, fdwReason, fImpLoad); 62 ctordtorTerm();63 return ret;61 ctordtorTerm(); 62 return ret; 64 63 } 65 64 return FALSE; … … 88 87 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 89 88 dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&_Resource_PEResTab); 90 if(dllHandle == 0) 91 return 0UL;89 if(dllHandle == 0) 90 return 0UL; 92 91 93 92 break; 94 93 case 1 : 95 94 if(dllHandle) { 96 UnregisterLxDll(dllHandle);95 UnregisterLxDll(dllHandle); 97 96 } 98 97 break;  - 
      
trunk/src/quartz/initterm.cpp
r6649 r6710 1 /* $Id: initterm.cpp,v 1.2 2001-09-05 13:36:37 bird Exp $ */2 1 /* 3 2 * DLL entry point  - 
      
trunk/src/quartz/irclock.c
r6649 r6710 1 /* $Id: irclock.c,v 1.3 2001-09-05 13:36:37 bird Exp $ */2 1 /* 3 2 * Implementation of CLSID_SystemClock. 4 3 * 5 * FIXME - stub.4 * FIXME - not tested yet. 6 5 * 7 6 * hidenori@a2.ctktv.ne.jp … … 13 12 #include "winbase.h" 14 13 #include "wingdi.h" 14 #include "winuser.h" 15 15 #include "winerror.h" 16 16 #include "wine/obj_base.h" … … 25 25 26 26 27 #define QUARTZ_MSG_ADDTIMER (WM_APP+0) 28 #define QUARTZ_MSG_REMOVETIMER (WM_APP+1) 29 #define QUARTZ_MSG_EXITTHREAD (WM_APP+2) 30 31 32 /****************************************************************************/ 33 34 static QUARTZ_TimerEntry* IReferenceClock_AllocTimerEntry(CSystemClock* This) 35 { 36 QUARTZ_TimerEntry* pEntry; 37 DWORD dw; 38 39 pEntry = &This->m_timerEntries[0]; 40 for ( dw = 0; dw < WINE_QUARTZ_SYSCLOCK_TIMER_MAX; dw++ ) 41 { 42 if ( pEntry->hEvent == (HANDLE)NULL ) 43 return pEntry; 44 pEntry ++; 45 } 46 47 return NULL; 48 } 49 50 static QUARTZ_TimerEntry* IReferenceClock_SearchTimer(CSystemClock* This, DWORD dwAdvCookie) 51 { 52 QUARTZ_TimerEntry* pEntry; 53 DWORD dw; 54 55 pEntry = &This->m_timerEntries[0]; 56 for ( dw = 0; dw < WINE_QUARTZ_SYSCLOCK_TIMER_MAX; dw++ ) 57 { 58 if ( pEntry->hEvent != (HANDLE)NULL && 59 pEntry->dwAdvCookie == dwAdvCookie ) 60 return pEntry; 61 pEntry ++; 62 } 63 64 return NULL; 65 } 66 67 static void IReferenceClock_OnTimerUpdated(CSystemClock* This) 68 { 69 QUARTZ_TimerEntry* pEntry; 70 REFERENCE_TIME rtCur; 71 REFERENCE_TIME rtSignal; 72 REFERENCE_TIME rtCount; 73 HRESULT hr; 74 LONG lCount; 75 DWORD dw; 76 77 hr = IReferenceClock_GetTime((IReferenceClock*)(&This->refclk),&rtCur); 78 if ( hr != NOERROR ) 79 return; 80 81 pEntry = &This->m_timerEntries[0]; 82 for ( dw = 0; dw < WINE_QUARTZ_SYSCLOCK_TIMER_MAX; dw++ ) 83 { 84 if ( pEntry->hEvent != (HANDLE)NULL ) 85 { 86 rtSignal = pEntry->rtStart + pEntry->rtInterval; 87 if ( rtCur >= rtSignal ) 88 { 89 if ( pEntry->fPeriodic ) 90 { 91 rtCount = ((rtCur - pEntry->rtStart) / pEntry->rtInterval); 92 lCount = ( rtCount > (REFERENCE_TIME)0x7fffffff ) ? 93 (LONG)0x7fffffff : (LONG)rtCount; 94 if ( !ReleaseSemaphore( pEntry->hEvent, lCount, NULL ) ) 95 { 96 while ( lCount > 0 ) 97 { 98 if ( !ReleaseSemaphore( pEntry->hEvent, 1, NULL ) ) 99 break; 100 } 101 } 102 } 103 else 104 { 105 SetEvent( pEntry->hEvent ); 106 pEntry->hEvent = (HANDLE)NULL; 107 } 108 } 109 } 110 pEntry ++; 111 } 112 } 113 114 static 115 DWORD WINAPI IReferenceClock_TimerEntry( LPVOID lpvParam ) 116 { 117 CSystemClock* This = (CSystemClock*)lpvParam; 118 MSG msg; 119 DWORD dwRes; 120 121 /* initialize the message queue. */ 122 PeekMessageA( &msg, (HWND)NULL, 0, 0, PM_NOREMOVE ); 123 /* resume the owner thread. */ 124 SetEvent( This->m_hEventInit ); 125 126 /* message loop. */ 127 while ( 1 ) 128 { 129 dwRes = MsgWaitForMultipleObjects( 130 0, NULL, FALSE, 131 INFINITE, /* FIXME */ 132 QS_ALLEVENTS ); 133 134 EnterCriticalSection( &This->m_csClock ); 135 IReferenceClock_OnTimerUpdated(This); 136 LeaveCriticalSection( &This->m_csClock ); 137 138 while ( PeekMessageA( &msg, (HWND)NULL, 0, 0, PM_REMOVE ) ) 139 { 140 if ( msg.message == WM_QUIT ) 141 goto quitthread; 142 143 if ( msg.hwnd != (HWND)NULL ) 144 { 145 TranslateMessage( &msg ); 146 DispatchMessageA( &msg ); 147 } 148 else 149 { 150 switch ( msg.message ) 151 { 152 case QUARTZ_MSG_ADDTIMER: 153 case QUARTZ_MSG_REMOVETIMER: 154 break; 155 case QUARTZ_MSG_EXITTHREAD: 156 PostQuitMessage(0); 157 break; 158 default: 159 FIXME( "invalid message %04u\n", (unsigned)msg.message ); 160 break; 161 } 162 } 163 } 164 } 165 166 quitthread: 167 return 0; 168 } 169 170 /****************************************************************************/ 171 27 172 static HRESULT WINAPI 28 173 IReferenceClock_fnQueryInterface(IReferenceClock* iface,REFIID riid,void** ppobj) 29 174 { 30 CSystemClock_THIS(iface,refclk);31 32 TRACE("(%p)->()\n",This);33 34 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);175 CSystemClock_THIS(iface,refclk); 176 177 TRACE("(%p)->()\n",This); 178 179 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 35 180 } 36 181 … … 38 183 IReferenceClock_fnAddRef(IReferenceClock* iface) 39 184 { 40 CSystemClock_THIS(iface,refclk);41 42 TRACE("(%p)->()\n",This);43 44 return IUnknown_AddRef(This->unk.punkControl);185 CSystemClock_THIS(iface,refclk); 186 187 TRACE("(%p)->()\n",This); 188 189 return IUnknown_AddRef(This->unk.punkControl); 45 190 } 46 191 … … 48 193 IReferenceClock_fnRelease(IReferenceClock* iface) 49 194 { 50 CSystemClock_THIS(iface,refclk);51 52 TRACE("(%p)->()\n",This);53 54 return IUnknown_Release(This->unk.punkControl);195 CSystemClock_THIS(iface,refclk); 196 197 TRACE("(%p)->()\n",This); 198 199 return IUnknown_Release(This->unk.punkControl); 55 200 } 56 201 … … 58 203 IReferenceClock_fnGetTime(IReferenceClock* iface,REFERENCE_TIME* prtTime) 59 204 { 60 CSystemClock_THIS(iface,refclk); 61 62 FIXME( "(%p)->() stub!\n", This ); 63 return E_NOTIMPL; 205 CSystemClock_THIS(iface,refclk); 206 DWORD dwTimeCur; 207 208 TRACE( "(%p)->(%p)\n", This, prtTime ); 209 210 if ( prtTime == NULL ) 211 return E_POINTER; 212 213 EnterCriticalSection( &This->m_csClock ); 214 215 dwTimeCur = GetTickCount(); 216 This->m_rtLast += (REFERENCE_TIME)(DWORD)(dwTimeCur - This->m_dwTimeLast); 217 218 This->m_dwTimeLast = dwTimeCur; 219 220 *prtTime = This->m_dwTimeLast; 221 222 LeaveCriticalSection( &This->m_csClock ); 223 224 return NOERROR; 64 225 } 65 226 … … 67 228 IReferenceClock_fnAdviseTime(IReferenceClock* iface,REFERENCE_TIME rtBase,REFERENCE_TIME rtStream,HEVENT hEvent,DWORD_PTR* pdwAdvCookie) 68 229 { 69 CSystemClock_THIS(iface,refclk); 70 71 FIXME( "(%p)->() stub!\n", This ); 72 return E_NOTIMPL; 230 CSystemClock_THIS(iface,refclk); 231 QUARTZ_TimerEntry* pEntry; 232 HRESULT hr; 233 REFERENCE_TIME rtCur; 234 235 TRACE( "(%p)->()\n", This ); 236 237 if ( pdwAdvCookie == NULL ) 238 return E_POINTER; 239 if ( hEvent == (HANDLE)NULL ) 240 return E_INVALIDARG; 241 242 EnterCriticalSection( &This->m_csClock ); 243 244 *pdwAdvCookie = (DWORD_PTR)(This->m_dwAdvCookieNext ++); 245 246 hr = IReferenceClock_GetTime(iface,&rtCur); 247 if ( hr != NOERROR ) 248 goto err; 249 if ( rtCur >= (rtBase+rtStream) ) 250 { 251 SetEvent(hEvent); 252 hr = NOERROR; 253 goto err; 254 } 255 256 pEntry = IReferenceClock_AllocTimerEntry(This); 257 if ( pEntry == NULL ) 258 { 259 hr = E_FAIL; 260 goto err; 261 } 262 263 if ( !PostThreadMessageA( 264 This->m_idThreadTimer, 265 QUARTZ_MSG_ADDTIMER, 266 0, 0 ) ) 267 { 268 hr = E_FAIL; 269 goto err; 270 } 271 272 pEntry->dwAdvCookie = *pdwAdvCookie; 273 pEntry->fPeriodic = FALSE; 274 pEntry->hEvent = hEvent; 275 pEntry->rtStart = rtBase; 276 pEntry->rtInterval = rtStream; 277 278 hr = NOERROR; 279 err: 280 LeaveCriticalSection( &This->m_csClock ); 281 282 return hr; 73 283 } 74 284 … … 76 286 IReferenceClock_fnAdvisePeriodic(IReferenceClock* iface,REFERENCE_TIME rtStart,REFERENCE_TIME rtPeriod,HSEMAPHORE hSemaphore,DWORD_PTR* pdwAdvCookie) 77 287 { 78 CSystemClock_THIS(iface,refclk); 79 80 FIXME( "(%p)->() stub!\n", This ); 81 return E_NOTIMPL; 288 CSystemClock_THIS(iface,refclk); 289 QUARTZ_TimerEntry* pEntry; 290 HRESULT hr; 291 292 TRACE( "(%p)->()\n", This ); 293 294 if ( pdwAdvCookie == NULL ) 295 return E_POINTER; 296 if ( hSemaphore == (HSEMAPHORE)NULL ) 297 return E_INVALIDARG; 298 299 EnterCriticalSection( &This->m_csClock ); 300 301 *pdwAdvCookie = (DWORD_PTR)(This->m_dwAdvCookieNext ++); 302 303 pEntry = IReferenceClock_AllocTimerEntry(This); 304 if ( pEntry == NULL ) 305 { 306 hr = E_FAIL; 307 goto err; 308 } 309 310 if ( !PostThreadMessageA( 311 This->m_idThreadTimer, 312 QUARTZ_MSG_ADDTIMER, 313 0, 0 ) ) 314 { 315 hr = E_FAIL; 316 goto err; 317 } 318 319 pEntry->dwAdvCookie = *pdwAdvCookie; 320 pEntry->fPeriodic = TRUE; 321 pEntry->hEvent = (HANDLE)hSemaphore; 322 pEntry->rtStart = rtStart; 323 pEntry->rtInterval = rtPeriod; 324 325 hr = NOERROR; 326 err: 327 LeaveCriticalSection( &This->m_csClock ); 328 329 return hr; 82 330 } 83 331 … … 85 333 IReferenceClock_fnUnadvise(IReferenceClock* iface,DWORD_PTR dwAdvCookie) 86 334 { 87 CSystemClock_THIS(iface,refclk); 88 89 FIXME( "(%p)->() stub!\n", This ); 90 return E_NOTIMPL; 335 CSystemClock_THIS(iface,refclk); 336 QUARTZ_TimerEntry* pEntry; 337 338 TRACE( "(%p)->(%lu)\n", This, (DWORD)dwAdvCookie ); 339 340 EnterCriticalSection( &This->m_csClock ); 341 342 pEntry = IReferenceClock_SearchTimer(This,(DWORD)dwAdvCookie); 343 if ( pEntry != NULL ) 344 { 345 pEntry->hEvent = (HANDLE)NULL; 346 } 347 348 LeaveCriticalSection( &This->m_csClock ); 349 350 return NOERROR; 91 351 } 92 352 93 353 static ICOM_VTABLE(IReferenceClock) irefclk = 94 354 { 95 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE96 /* IUnknown fields */97 IReferenceClock_fnQueryInterface,98 IReferenceClock_fnAddRef,99 IReferenceClock_fnRelease,100 /* IReferenceClock fields */101 IReferenceClock_fnGetTime,102 IReferenceClock_fnAdviseTime,103 IReferenceClock_fnAdvisePeriodic,104 IReferenceClock_fnUnadvise,355 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 356 /* IUnknown fields */ 357 IReferenceClock_fnQueryInterface, 358 IReferenceClock_fnAddRef, 359 IReferenceClock_fnRelease, 360 /* IReferenceClock fields */ 361 IReferenceClock_fnGetTime, 362 IReferenceClock_fnAdviseTime, 363 IReferenceClock_fnAdvisePeriodic, 364 IReferenceClock_fnUnadvise, 105 365 }; 106 366 107 367 108 void CSystemClock_InitIReferenceClock( CSystemClock* psc ) 109 { 110 TRACE("(%p)\n",psc); 111 ICOM_VTBL(&psc->refclk) = &irefclk; 112 } 368 HRESULT CSystemClock_InitIReferenceClock( CSystemClock* psc ) 369 { 370 HANDLE hEvents[2]; 371 372 TRACE("(%p)\n",psc); 373 ICOM_VTBL(&psc->refclk) = &irefclk; 374 375 InitializeCriticalSection( &psc->m_csClock ); 376 psc->m_dwTimeLast = GetTickCount(); 377 psc->m_rtLast = (REFERENCE_TIME)0; 378 psc->m_hThreadTimer = (HANDLE)NULL; 379 psc->m_hEventInit = (HANDLE)NULL; 380 psc->m_idThreadTimer = 0; 381 psc->m_dwAdvCookieNext = 1; 382 ZeroMemory( psc->m_timerEntries, sizeof(psc->m_timerEntries) ); 383 384 psc->m_hEventInit = CreateEventA( NULL, TRUE, FALSE, NULL ); 385 if ( psc->m_hEventInit == (HANDLE)NULL ) 386 goto err; 387 388 psc->m_hThreadTimer = CreateThread( 389 NULL, 0, 390 IReferenceClock_TimerEntry, 391 psc, 0, &psc->m_idThreadTimer ); 392 393 if ( psc->m_hThreadTimer == (HANDLE)NULL ) 394 { 395 CloseHandle( psc->m_hEventInit ); 396 psc->m_hEventInit = (HANDLE)NULL; 397 goto err; 398 } 399 400 hEvents[0] = psc->m_hEventInit; 401 hEvents[1] = psc->m_hThreadTimer; 402 if ( WaitForMultipleObjects( 2, hEvents, FALSE, INFINITE ) 403 != WAIT_OBJECT_0 ) 404 { 405 CloseHandle( psc->m_hEventInit ); 406 psc->m_hEventInit = (HANDLE)NULL; 407 CloseHandle( psc->m_hThreadTimer ); 408 psc->m_hThreadTimer = (HANDLE)NULL; 409 goto err; 410 } 411 412 return NOERROR; 413 414 err: 415 DeleteCriticalSection( &psc->m_csClock ); 416 return E_FAIL; 417 } 418 419 void CSystemClock_UninitIReferenceClock( CSystemClock* psc ) 420 { 421 TRACE("(%p)\n",psc); 422 423 if ( psc->m_hThreadTimer != (HANDLE)NULL ) 424 { 425 if ( PostThreadMessageA( 426 psc->m_idThreadTimer, 427 QUARTZ_MSG_EXITTHREAD, 428 0, 0 ) ) 429 { 430 WaitForSingleObject( psc->m_hThreadTimer, INFINITE ); 431 } 432 CloseHandle( psc->m_hThreadTimer ); 433 psc->m_hThreadTimer = (HANDLE)NULL; 434 } 435 436 DeleteCriticalSection( &psc->m_csClock ); 437 }  - 
      
trunk/src/quartz/iunk.c
r6649 r6710 1 /* $Id: iunk.c,v 1.3 2001-09-05 13:36:37 bird Exp $ */2 1 /* 3 2 * An implementation of IUnknown. … … 10 9 #include "windef.h" 11 10 #include "winerror.h" 11 #include "winbase.h" 12 12 #include "wine/obj_base.h" 13 13 … … 22 22 IUnknown_fnQueryInterface(IUnknown* iface,REFIID riid,LPVOID *ppobj) 23 23 { 24 ICOM_THIS(QUARTZ_IUnkImpl,iface); 25 size_t ofs; 26 DWORD dwIndex; 24 ICOM_THIS(QUARTZ_IUnkImpl,iface); 25 size_t ofs; 26 DWORD dwIndex; 27 QUARTZ_IFDelegation* pDelegation; 28 HRESULT hr; 27 29 28 TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);30 TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); 29 31 30 if ( ppobj == NULL )31 return E_POINTER;32 *ppobj = NULL;32 if ( ppobj == NULL ) 33 return E_POINTER; 34 *ppobj = NULL; 33 35 34 ofs = 0;36 ofs = 0; 35 37 36 if ( IsEqualGUID( &IID_IUnknown, riid ) ) 37 { 38 TRACE("IID_IUnknown - returns inner object.\n"); 39 } 40 else 41 { 42 for ( dwIndex = 0; dwIndex < This->dwEntries; dwIndex++ ) 43 { 44 if ( IsEqualGUID( This->pEntries[dwIndex].piid, riid ) ) 45 { 46 ofs = This->pEntries[dwIndex].ofsVTPtr; 47 break; 48 } 49 } 50 if ( dwIndex == This->dwEntries ) 51 { 52 FIXME("unknown interface: %s\n",debugstr_guid(riid)); 53 return E_NOINTERFACE; 54 } 55 } 38 if ( IsEqualGUID( &IID_IUnknown, riid ) ) 39 { 40 TRACE("IID_IUnknown - returns inner object.\n"); 41 } 42 else 43 { 44 for ( dwIndex = 0; dwIndex < This->dwEntries; dwIndex++ ) 45 { 46 if ( IsEqualGUID( This->pEntries[dwIndex].piid, riid ) ) 47 { 48 ofs = This->pEntries[dwIndex].ofsVTPtr; 49 break; 50 } 51 } 52 if ( dwIndex == This->dwEntries ) 53 { 54 hr = E_NOINTERFACE; 56 55 57 *ppobj = (LPVOID)(((char*)This) + ofs); 58 IUnknown_AddRef((IUnknown*)(*ppobj)); 56 /* delegation */ 57 pDelegation = This->pDelegationFirst; 58 while ( pDelegation != NULL ) 59 { 60 hr = (*pDelegation->pOnQueryInterface)( iface, riid, ppobj ); 61 if ( hr != E_NOINTERFACE ) 62 break; 63 pDelegation = pDelegation->pNext; 64 } 59 65 60 return S_OK; 66 if ( hr == E_NOINTERFACE ) 67 { 68 FIXME("unknown interface: %s\n",debugstr_guid(riid)); 69 } 70 71 return hr; 72 } 73 } 74 75 *ppobj = (LPVOID)(((char*)This) + ofs); 76 IUnknown_AddRef((IUnknown*)(*ppobj)); 77 78 return S_OK; 61 79 } 62 80 … … 64 82 IUnknown_fnAddRef(IUnknown* iface) 65 83 { 66 ICOM_THIS(QUARTZ_IUnkImpl,iface);84 ICOM_THIS(QUARTZ_IUnkImpl,iface); 67 85 68 TRACE("(%p)->()\n",This);86 TRACE("(%p)->()\n",This); 69 87 70 return ++(This->ref);88 return InterlockedExchangeAdd(&(This->ref),1) + 1; 71 89 } 72 90 … … 74 92 IUnknown_fnRelease(IUnknown* iface) 75 93 { 76 ICOM_THIS(QUARTZ_IUnkImpl,iface); 94 ICOM_THIS(QUARTZ_IUnkImpl,iface); 95 LONG ref; 77 96 78 TRACE("(%p)->()\n",This); 79 if ( (--(This->ref)) > 0 ) 80 return This->ref; 97 TRACE("(%p)->()\n",This); 98 ref = InterlockedExchangeAdd(&(This->ref),-1) - 1; 99 if ( ref > 0 ) 100 return (ULONG)ref; 81 101 82 QUARTZ_FreeObj(This); 102 if ( This->pOnFinalRelease != NULL ) 103 (*(This->pOnFinalRelease))(iface); 83 104 84 return 0; 105 QUARTZ_FreeObj(This); 106 107 return 0; 85 108 } 86 109 87 110 static ICOM_VTABLE(IUnknown) iunknown = 88 111 { 89 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE90 /* IUnknown fields */91 IUnknown_fnQueryInterface,92 IUnknown_fnAddRef,93 IUnknown_fnRelease,112 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 113 /* IUnknown fields */ 114 IUnknown_fnQueryInterface, 115 IUnknown_fnAddRef, 116 IUnknown_fnRelease, 94 117 }; 95 118 … … 97 120 void QUARTZ_IUnkInit( QUARTZ_IUnkImpl* pImpl, IUnknown* punkOuter ) 98 121 { 99 TRACE("(%p)\n",pImpl);122 TRACE("(%p)\n",pImpl); 100 123 101 ICOM_VTBL(pImpl) = &iunknown; 102 pImpl->pEntries = NULL; 103 pImpl->dwEntries = 0; 104 pImpl->ref = 1; 105 pImpl->punkControl = (IUnknown*)pImpl; 124 ICOM_VTBL(pImpl) = &iunknown; 125 pImpl->pEntries = NULL; 126 pImpl->dwEntries = 0; 127 pImpl->pDelegationFirst = NULL; 128 pImpl->pOnFinalRelease = NULL; 129 pImpl->ref = 1; 130 pImpl->punkControl = (IUnknown*)pImpl; 106 131 107 /* for delegation. */108 if ( punkOuter != NULL )109 pImpl->punkControl = punkOuter;132 /* for implementing aggregation. */ 133 if ( punkOuter != NULL ) 134 pImpl->punkControl = punkOuter; 110 135 } 111 136 137 void QUARTZ_IUnkAddDelegation( 138 QUARTZ_IUnkImpl* pImpl, QUARTZ_IFDelegation* pDelegation ) 139 { 140 pDelegation->pNext = pImpl->pDelegationFirst; 141 pImpl->pDelegationFirst = pDelegation; 142 } 143  - 
      
trunk/src/quartz/iunk.h
r6578 r6710 25 25 */ 26 26 27 /* for InterlockedExchangeAdd. */ 28 #include <pshpack4.h> 29 27 30 typedef struct QUARTZ_IFEntry 28 31 { 29 REFIIDpiid; /* interface ID. */32 const IID* piid; /* interface ID. */ 30 33 size_t ofsVTPtr; /* offset from IUnknown. */ 31 34 } QUARTZ_IFEntry; 35 36 typedef struct QUARTZ_IFDelegation 37 { 38 struct QUARTZ_IFDelegation* pNext; 39 HRESULT (*pOnQueryInterface)( 40 IUnknown* punk, const IID* piid, void** ppobj ); 41 } QUARTZ_IFDelegation; 32 42 33 43 typedef struct QUARTZ_IUnkImpl … … 39 49 const QUARTZ_IFEntry* pEntries; 40 50 DWORD dwEntries; 51 /* list of delegation handlers. */ 52 QUARTZ_IFDelegation* pDelegationFirst; 53 /* called on final release. */ 54 void (*pOnFinalRelease)(IUnknown* punk); 41 55 42 56 /* IUnknown fields. */ 43 ULONG ref;57 LONG ref; 44 58 IUnknown* punkControl; 45 59 } QUARTZ_IUnkImpl; 46 60 61 #include <poppack.h> 62 47 63 48 64 void QUARTZ_IUnkInit( QUARTZ_IUnkImpl* pImpl, IUnknown* punkOuter ); 65 void QUARTZ_IUnkAddDelegation( 66 QUARTZ_IUnkImpl* pImpl, QUARTZ_IFDelegation* pDelegation ); 49 67 50 68  - 
      
trunk/src/quartz/ividwin.c
r6649 r6710 1 /* $Id: ividwin.c,v 1.2 2001-09-05 13:36:37 bird Exp $ */2 1 /* 3 2 * Implementation of IVideoWindow for FilterGraph. … … 31 30 IVideoWindow_fnQueryInterface(IVideoWindow* iface,REFIID riid,void** ppobj) 32 31 { 33 CFilterGraph_THIS(iface,vidwin);34 35 TRACE("(%p)->()\n",This);36 37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);32 CFilterGraph_THIS(iface,vidwin); 33 34 TRACE("(%p)->()\n",This); 35 36 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 38 37 } 39 38 … … 41 40 IVideoWindow_fnAddRef(IVideoWindow* iface) 42 41 { 43 CFilterGraph_THIS(iface,vidwin);44 45 TRACE("(%p)->()\n",This);46 47 return IUnknown_AddRef(This->unk.punkControl);42 CFilterGraph_THIS(iface,vidwin); 43 44 TRACE("(%p)->()\n",This); 45 46 return IUnknown_AddRef(This->unk.punkControl); 48 47 } 49 48 … … 51 50 IVideoWindow_fnRelease(IVideoWindow* iface) 52 51 { 53 CFilterGraph_THIS(iface,vidwin);54 55 TRACE("(%p)->()\n",This);56 57 return IUnknown_Release(This->unk.punkControl);52 CFilterGraph_THIS(iface,vidwin); 53 54 TRACE("(%p)->()\n",This); 55 56 return IUnknown_Release(This->unk.punkControl); 58 57 } 59 58 … … 61 60 IVideoWindow_fnGetTypeInfoCount(IVideoWindow* iface,UINT* pcTypeInfo) 62 61 { 63 CFilterGraph_THIS(iface,vidwin);64 65 FIXME("(%p)->()\n",This);66 67 return E_NOTIMPL;62 CFilterGraph_THIS(iface,vidwin); 63 64 FIXME("(%p)->()\n",This); 65 66 return E_NOTIMPL; 68 67 } 69 68 … … 71 70 IVideoWindow_fnGetTypeInfo(IVideoWindow* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj) 72 71 { 73 CFilterGraph_THIS(iface,vidwin);74 75 FIXME("(%p)->()\n",This);76 77 return E_NOTIMPL;72 CFilterGraph_THIS(iface,vidwin); 73 74 FIXME("(%p)->()\n",This); 75 76 return E_NOTIMPL; 78 77 } 79 78 … … 81 80 IVideoWindow_fnGetIDsOfNames(IVideoWindow* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId) 82 81 { 83 CFilterGraph_THIS(iface,vidwin);84 85 FIXME("(%p)->()\n",This);86 87 return E_NOTIMPL;82 CFilterGraph_THIS(iface,vidwin); 83 84 FIXME("(%p)->()\n",This); 85 86 return E_NOTIMPL; 88 87 } 89 88 … … 91 90 IVideoWindow_fnInvoke(IVideoWindow* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr) 92 91 { 93 CFilterGraph_THIS(iface,vidwin);94 95 FIXME("(%p)->()\n",This);96 97 return E_NOTIMPL;92 CFilterGraph_THIS(iface,vidwin); 93 94 FIXME("(%p)->()\n",This); 95 96 return E_NOTIMPL; 98 97 } 99 98 … … 103 102 IVideoWindow_fnput_Caption(IVideoWindow* iface,BSTR strCaption) 104 103 { 105 CFilterGraph_THIS(iface,vidwin);106 107 FIXME("(%p)->() stub!\n",This);108 109 return E_NOTIMPL;104 CFilterGraph_THIS(iface,vidwin); 105 106 FIXME("(%p)->() stub!\n",This); 107 108 return E_NOTIMPL; 110 109 } 111 110 … … 113 112 IVideoWindow_fnget_Caption(IVideoWindow* iface,BSTR* pstrCaption) 114 113 { 115 CFilterGraph_THIS(iface,vidwin);116 117 FIXME("(%p)->() stub!\n",This);118 119 return E_NOTIMPL;114 CFilterGraph_THIS(iface,vidwin); 115 116 FIXME("(%p)->() stub!\n",This); 117 118 return E_NOTIMPL; 120 119 } 121 120 … … 123 122 IVideoWindow_fnput_WindowStyle(IVideoWindow* iface,long lStyle) 124 123 { 125 CFilterGraph_THIS(iface,vidwin);126 127 FIXME("(%p)->() stub!\n",This);128 129 return E_NOTIMPL;124 CFilterGraph_THIS(iface,vidwin); 125 126 FIXME("(%p)->() stub!\n",This); 127 128 return E_NOTIMPL; 130 129 } 131 130 … … 133 132 IVideoWindow_fnget_WindowStyle(IVideoWindow* iface,long* plStyle) 134 133 { 135 CFilterGraph_THIS(iface,vidwin);136 137 FIXME("(%p)->() stub!\n",This);138 139 return E_NOTIMPL;134 CFilterGraph_THIS(iface,vidwin); 135 136 FIXME("(%p)->() stub!\n",This); 137 138 return E_NOTIMPL; 140 139 } 141 140 … … 143 142 IVideoWindow_fnput_WindowStyleEx(IVideoWindow* iface,long lExStyle) 144 143 { 145 CFilterGraph_THIS(iface,vidwin);146 147 FIXME("(%p)->() stub!\n",This);148 149 return E_NOTIMPL;144 CFilterGraph_THIS(iface,vidwin); 145 146 FIXME("(%p)->() stub!\n",This); 147 148 return E_NOTIMPL; 150 149 } 151 150 … … 153 152 IVideoWindow_fnget_WindowStyleEx(IVideoWindow* iface,long* plExStyle) 154 153 { 155 CFilterGraph_THIS(iface,vidwin);156 157 FIXME("(%p)->() stub!\n",This);158 159 return E_NOTIMPL;154 CFilterGraph_THIS(iface,vidwin); 155 156 FIXME("(%p)->() stub!\n",This); 157 158 return E_NOTIMPL; 160 159 } 161 160 … … 163 162 IVideoWindow_fnput_AutoShow(IVideoWindow* iface,long lAutoShow) 164 163 { 165 CFilterGraph_THIS(iface,vidwin);166 167 FIXME("(%p)->() stub!\n",This);168 169 return E_NOTIMPL;164 CFilterGraph_THIS(iface,vidwin); 165 166 FIXME("(%p)->() stub!\n",This); 167 168 return E_NOTIMPL; 170 169 } 171 170 … … 173 172 IVideoWindow_fnget_AutoShow(IVideoWindow* iface,long* plAutoShow) 174 173 { 175 CFilterGraph_THIS(iface,vidwin);176 177 FIXME("(%p)->() stub!\n",This);178 179 return E_NOTIMPL;174 CFilterGraph_THIS(iface,vidwin); 175 176 FIXME("(%p)->() stub!\n",This); 177 178 return E_NOTIMPL; 180 179 } 181 180 … … 183 182 IVideoWindow_fnput_WindowState(IVideoWindow* iface,long lState) 184 183 { 185 CFilterGraph_THIS(iface,vidwin);186 187 FIXME("(%p)->() stub!\n",This);188 189 return E_NOTIMPL;184 CFilterGraph_THIS(iface,vidwin); 185 186 FIXME("(%p)->() stub!\n",This); 187 188 return E_NOTIMPL; 190 189 } 191 190 … … 193 192 IVideoWindow_fnget_WindowState(IVideoWindow* iface,long* plState) 194 193 { 195 CFilterGraph_THIS(iface,vidwin);196 197 FIXME("(%p)->() stub!\n",This);198 199 return E_NOTIMPL;194 CFilterGraph_THIS(iface,vidwin); 195 196 FIXME("(%p)->() stub!\n",This); 197 198 return E_NOTIMPL; 200 199 } 201 200 … … 203 202 IVideoWindow_fnput_BackgroundPalette(IVideoWindow* iface,long lBackPal) 204 203 { 205 CFilterGraph_THIS(iface,vidwin);206 207 FIXME("(%p)->() stub!\n",This);208 209 return E_NOTIMPL;204 CFilterGraph_THIS(iface,vidwin); 205 206 FIXME("(%p)->() stub!\n",This); 207 208 return E_NOTIMPL; 210 209 } 211 210 … … 213 212 IVideoWindow_fnget_BackgroundPalette(IVideoWindow* iface,long* plBackPal) 214 213 { 215 CFilterGraph_THIS(iface,vidwin);216 217 FIXME("(%p)->() stub!\n",This);218 219 return E_NOTIMPL;214 CFilterGraph_THIS(iface,vidwin); 215 216 FIXME("(%p)->() stub!\n",This); 217 218 return E_NOTIMPL; 220 219 } 221 220 … … 223 222 IVideoWindow_fnput_Visible(IVideoWindow* iface,long lVisible) 224 223 { 225 CFilterGraph_THIS(iface,vidwin);226 227 FIXME("(%p)->() stub!\n",This);228 229 return E_NOTIMPL;224 CFilterGraph_THIS(iface,vidwin); 225 226 FIXME("(%p)->() stub!\n",This); 227 228 return E_NOTIMPL; 230 229 } 231 230 … … 233 232 IVideoWindow_fnget_Visible(IVideoWindow* iface,long* plVisible) 234 233 { 235 CFilterGraph_THIS(iface,vidwin);236 237 FIXME("(%p)->() stub!\n",This);238 239 return E_NOTIMPL;234 CFilterGraph_THIS(iface,vidwin); 235 236 FIXME("(%p)->() stub!\n",This); 237 238 return E_NOTIMPL; 240 239 } 241 240 … … 243 242 IVideoWindow_fnput_Left(IVideoWindow* iface,long lLeft) 244 243 { 245 CFilterGraph_THIS(iface,vidwin);246 247 FIXME("(%p)->() stub!\n",This);248 249 return E_NOTIMPL;244 CFilterGraph_THIS(iface,vidwin); 245 246 FIXME("(%p)->() stub!\n",This); 247 248 return E_NOTIMPL; 250 249 } 251 250 … … 253 252 IVideoWindow_fnget_Left(IVideoWindow* iface,long* plLeft) 254 253 { 255 CFilterGraph_THIS(iface,vidwin);256 257 FIXME("(%p)->() stub!\n",This);258 259 return E_NOTIMPL;254 CFilterGraph_THIS(iface,vidwin); 255 256 FIXME("(%p)->() stub!\n",This); 257 258 return E_NOTIMPL; 260 259 } 261 260 … … 263 262 IVideoWindow_fnput_Width(IVideoWindow* iface,long lWidth) 264 263 { 265 CFilterGraph_THIS(iface,vidwin);266 267 FIXME("(%p)->() stub!\n",This);268 269 return E_NOTIMPL;264 CFilterGraph_THIS(iface,vidwin); 265 266 FIXME("(%p)->() stub!\n",This); 267 268 return E_NOTIMPL; 270 269 } 271 270 … … 273 272 IVideoWindow_fnget_Width(IVideoWindow* iface,long* plWidth) 274 273 { 275 CFilterGraph_THIS(iface,vidwin);276 277 FIXME("(%p)->() stub!\n",This);278 279 return E_NOTIMPL;274 CFilterGraph_THIS(iface,vidwin); 275 276 FIXME("(%p)->() stub!\n",This); 277 278 return E_NOTIMPL; 280 279 } 281 280 … … 283 282 IVideoWindow_fnput_Top(IVideoWindow* iface,long lTop) 284 283 { 285 CFilterGraph_THIS(iface,vidwin);286 287 FIXME("(%p)->() stub!\n",This);288 289 return E_NOTIMPL;284 CFilterGraph_THIS(iface,vidwin); 285 286 FIXME("(%p)->() stub!\n",This); 287 288 return E_NOTIMPL; 290 289 } 291 290 … … 293 292 IVideoWindow_fnget_Top(IVideoWindow* iface,long* plTop) 294 293 { 295 CFilterGraph_THIS(iface,vidwin);296 297 FIXME("(%p)->() stub!\n",This);298 299 return E_NOTIMPL;294 CFilterGraph_THIS(iface,vidwin); 295 296 FIXME("(%p)->() stub!\n",This); 297 298 return E_NOTIMPL; 300 299 } 301 300 … … 303 302 IVideoWindow_fnput_Height(IVideoWindow* iface,long lHeight) 304 303 { 305 CFilterGraph_THIS(iface,vidwin);306 307 FIXME("(%p)->() stub!\n",This);308 309 return E_NOTIMPL;304 CFilterGraph_THIS(iface,vidwin); 305 306 FIXME("(%p)->() stub!\n",This); 307 308 return E_NOTIMPL; 310 309 } 311 310 … … 313 312 IVideoWindow_fnget_Height(IVideoWindow* iface,long* plHeight) 314 313 { 315 CFilterGraph_THIS(iface,vidwin);316 317 FIXME("(%p)->() stub!\n",This);318 319 return E_NOTIMPL;314 CFilterGraph_THIS(iface,vidwin); 315 316 FIXME("(%p)->() stub!\n",This); 317 318 return E_NOTIMPL; 320 319 } 321 320 … … 323 322 IVideoWindow_fnput_Owner(IVideoWindow* iface,OAHWND hwnd) 324 323 { 325 CFilterGraph_THIS(iface,vidwin);326 327 FIXME("(%p)->() stub!\n",This);328 329 return E_NOTIMPL;324 CFilterGraph_THIS(iface,vidwin); 325 326 FIXME("(%p)->() stub!\n",This); 327 328 return E_NOTIMPL; 330 329 } 331 330 … … 333 332 IVideoWindow_fnget_Owner(IVideoWindow* iface,OAHWND* phwnd) 334 333 { 335 CFilterGraph_THIS(iface,vidwin);336 337 FIXME("(%p)->() stub!\n",This);338 339 return E_NOTIMPL;334 CFilterGraph_THIS(iface,vidwin); 335 336 FIXME("(%p)->() stub!\n",This); 337 338 return E_NOTIMPL; 340 339 } 341 340 … … 343 342 IVideoWindow_fnput_MessageDrain(IVideoWindow* iface,OAHWND hwnd) 344 343 { 345 CFilterGraph_THIS(iface,vidwin);346 347 FIXME("(%p)->() stub!\n",This);348 349 return E_NOTIMPL;344 CFilterGraph_THIS(iface,vidwin); 345 346 FIXME("(%p)->() stub!\n",This); 347 348 return E_NOTIMPL; 350 349 } 351 350 … … 353 352 IVideoWindow_fnget_MessageDrain(IVideoWindow* iface,OAHWND* phwnd) 354 353 { 355 CFilterGraph_THIS(iface,vidwin);356 357 FIXME("(%p)->() stub!\n",This);358 359 return E_NOTIMPL;354 CFilterGraph_THIS(iface,vidwin); 355 356 FIXME("(%p)->() stub!\n",This); 357 358 return E_NOTIMPL; 360 359 } 361 360 … … 363 362 IVideoWindow_fnget_BorderColor(IVideoWindow* iface,long* plColor) 364 363 { 365 CFilterGraph_THIS(iface,vidwin);366 367 FIXME("(%p)->() stub!\n",This);368 369 return E_NOTIMPL;364 CFilterGraph_THIS(iface,vidwin); 365 366 FIXME("(%p)->() stub!\n",This); 367 368 return E_NOTIMPL; 370 369 } 371 370 … … 373 372 IVideoWindow_fnput_BorderColor(IVideoWindow* iface,long lColor) 374 373 { 375 CFilterGraph_THIS(iface,vidwin);376 377 FIXME("(%p)->() stub!\n",This);378 379 return E_NOTIMPL;374 CFilterGraph_THIS(iface,vidwin); 375 376 FIXME("(%p)->() stub!\n",This); 377 378 return E_NOTIMPL; 380 379 } 381 380 … … 383 382 IVideoWindow_fnget_FullScreenMode(IVideoWindow* iface,long* plMode) 384 383 { 385 CFilterGraph_THIS(iface,vidwin);386 387 FIXME("(%p)->() stub!\n",This);388 389 return E_NOTIMPL;384 CFilterGraph_THIS(iface,vidwin); 385 386 FIXME("(%p)->() stub!\n",This); 387 388 return E_NOTIMPL; 390 389 } 391 390 … … 393 392 IVideoWindow_fnput_FullScreenMode(IVideoWindow* iface,long lMode) 394 393 { 395 CFilterGraph_THIS(iface,vidwin);396 397 FIXME("(%p)->() stub!\n",This);398 399 return E_NOTIMPL;394 CFilterGraph_THIS(iface,vidwin); 395 396 FIXME("(%p)->() stub!\n",This); 397 398 return E_NOTIMPL; 400 399 } 401 400 … … 403 402 IVideoWindow_fnSetWindowForeground(IVideoWindow* iface,long lFocus) 404 403 { 405 CFilterGraph_THIS(iface,vidwin);406 407 FIXME("(%p)->() stub!\n",This);408 409 return E_NOTIMPL;404 CFilterGraph_THIS(iface,vidwin); 405 406 FIXME("(%p)->() stub!\n",This); 407 408 return E_NOTIMPL; 410 409 } 411 410 … … 413 412 IVideoWindow_fnNotifyOwnerMessage(IVideoWindow* iface,OAHWND hwnd,long message,LONG_PTR wParam,LONG_PTR lParam) 414 413 { 415 CFilterGraph_THIS(iface,vidwin);416 417 FIXME("(%p)->() stub!\n",This);418 419 return E_NOTIMPL;414 CFilterGraph_THIS(iface,vidwin); 415 416 FIXME("(%p)->() stub!\n",This); 417 418 return E_NOTIMPL; 420 419 } 421 420 … … 423 422 IVideoWindow_fnSetWindowPosition(IVideoWindow* iface,long lLeft,long lTop,long lWidth,long lHeight) 424 423 { 425 CFilterGraph_THIS(iface,vidwin);426 427 FIXME("(%p)->() stub!\n",This);428 429 return E_NOTIMPL;424 CFilterGraph_THIS(iface,vidwin); 425 426 FIXME("(%p)->() stub!\n",This); 427 428 return E_NOTIMPL; 430 429 } 431 430 … … 433 432 IVideoWindow_fnGetWindowPosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight) 434 433 { 435 CFilterGraph_THIS(iface,vidwin);436 437 FIXME("(%p)->() stub!\n",This);438 439 return E_NOTIMPL;434 CFilterGraph_THIS(iface,vidwin); 435 436 FIXME("(%p)->() stub!\n",This); 437 438 return E_NOTIMPL; 440 439 } 441 440 … … 443 442 IVideoWindow_fnGetMinIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight) 444 443 { 445 CFilterGraph_THIS(iface,vidwin);446 447 FIXME("(%p)->() stub!\n",This);448 449 return E_NOTIMPL;444 CFilterGraph_THIS(iface,vidwin); 445 446 FIXME("(%p)->() stub!\n",This); 447 448 return E_NOTIMPL; 450 449 } 451 450 … … 453 452 IVideoWindow_fnGetMaxIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight) 454 453 { 455 CFilterGraph_THIS(iface,vidwin);456 457 FIXME("(%p)->() stub!\n",This);458 459 return E_NOTIMPL;454 CFilterGraph_THIS(iface,vidwin); 455 456 FIXME("(%p)->() stub!\n",This); 457 458 return E_NOTIMPL; 460 459 } 461 460 … … 463 462 IVideoWindow_fnGetRestorePosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight) 464 463 { 465 CFilterGraph_THIS(iface,vidwin);466 467 FIXME("(%p)->() stub!\n",This);468 469 return E_NOTIMPL;464 CFilterGraph_THIS(iface,vidwin); 465 466 FIXME("(%p)->() stub!\n",This); 467 468 return E_NOTIMPL; 470 469 } 471 470 … … 473 472 IVideoWindow_fnHideCursor(IVideoWindow* iface,long lHide) 474 473 { 475 CFilterGraph_THIS(iface,vidwin);476 477 FIXME("(%p)->() stub!\n",This);478 479 return E_NOTIMPL;474 CFilterGraph_THIS(iface,vidwin); 475 476 FIXME("(%p)->() stub!\n",This); 477 478 return E_NOTIMPL; 480 479 } 481 480 … … 483 482 IVideoWindow_fnIsCursorHidden(IVideoWindow* iface,long* plHide) 484 483 { 485 CFilterGraph_THIS(iface,vidwin);486 487 FIXME("(%p)->() stub!\n",This);488 489 return E_NOTIMPL;484 CFilterGraph_THIS(iface,vidwin); 485 486 FIXME("(%p)->() stub!\n",This); 487 488 return E_NOTIMPL; 490 489 } 491 490 … … 495 494 static ICOM_VTABLE(IVideoWindow) ivideowindow = 496 495 { 497 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE498 /* IUnknown fields */499 IVideoWindow_fnQueryInterface,500 IVideoWindow_fnAddRef,501 IVideoWindow_fnRelease,502 /* IDispatch fields */503 IVideoWindow_fnGetTypeInfoCount,504 IVideoWindow_fnGetTypeInfo,505 IVideoWindow_fnGetIDsOfNames,506 IVideoWindow_fnInvoke,507 /* IVideoWindow fields */508 IVideoWindow_fnput_Caption,509 IVideoWindow_fnget_Caption,510 IVideoWindow_fnput_WindowStyle,511 IVideoWindow_fnget_WindowStyle,512 IVideoWindow_fnput_WindowStyleEx,513 IVideoWindow_fnget_WindowStyleEx,514 IVideoWindow_fnput_AutoShow,515 IVideoWindow_fnget_AutoShow,516 IVideoWindow_fnput_WindowState,517 IVideoWindow_fnget_WindowState,518 IVideoWindow_fnput_BackgroundPalette,519 IVideoWindow_fnget_BackgroundPalette,520 IVideoWindow_fnput_Visible,521 IVideoWindow_fnget_Visible,522 IVideoWindow_fnput_Left,523 IVideoWindow_fnget_Left,524 IVideoWindow_fnput_Width,525 IVideoWindow_fnget_Width,526 IVideoWindow_fnput_Top,527 IVideoWindow_fnget_Top,528 IVideoWindow_fnput_Height,529 IVideoWindow_fnget_Height,530 IVideoWindow_fnput_Owner,531 IVideoWindow_fnget_Owner,532 IVideoWindow_fnput_MessageDrain,533 IVideoWindow_fnget_MessageDrain,534 IVideoWindow_fnget_BorderColor,535 IVideoWindow_fnput_BorderColor,536 IVideoWindow_fnget_FullScreenMode,537 IVideoWindow_fnput_FullScreenMode,538 IVideoWindow_fnSetWindowForeground,539 IVideoWindow_fnNotifyOwnerMessage,540 IVideoWindow_fnSetWindowPosition,541 IVideoWindow_fnGetWindowPosition,542 IVideoWindow_fnGetMinIdealImageSize,543 IVideoWindow_fnGetMaxIdealImageSize,544 IVideoWindow_fnGetRestorePosition,545 IVideoWindow_fnHideCursor,546 IVideoWindow_fnIsCursorHidden,496 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 497 /* IUnknown fields */ 498 IVideoWindow_fnQueryInterface, 499 IVideoWindow_fnAddRef, 500 IVideoWindow_fnRelease, 501 /* IDispatch fields */ 502 IVideoWindow_fnGetTypeInfoCount, 503 IVideoWindow_fnGetTypeInfo, 504 IVideoWindow_fnGetIDsOfNames, 505 IVideoWindow_fnInvoke, 506 /* IVideoWindow fields */ 507 IVideoWindow_fnput_Caption, 508 IVideoWindow_fnget_Caption, 509 IVideoWindow_fnput_WindowStyle, 510 IVideoWindow_fnget_WindowStyle, 511 IVideoWindow_fnput_WindowStyleEx, 512 IVideoWindow_fnget_WindowStyleEx, 513 IVideoWindow_fnput_AutoShow, 514 IVideoWindow_fnget_AutoShow, 515 IVideoWindow_fnput_WindowState, 516 IVideoWindow_fnget_WindowState, 517 IVideoWindow_fnput_BackgroundPalette, 518 IVideoWindow_fnget_BackgroundPalette, 519 IVideoWindow_fnput_Visible, 520 IVideoWindow_fnget_Visible, 521 IVideoWindow_fnput_Left, 522 IVideoWindow_fnget_Left, 523 IVideoWindow_fnput_Width, 524 IVideoWindow_fnget_Width, 525 IVideoWindow_fnput_Top, 526 IVideoWindow_fnget_Top, 527 IVideoWindow_fnput_Height, 528 IVideoWindow_fnget_Height, 529 IVideoWindow_fnput_Owner, 530 IVideoWindow_fnget_Owner, 531 IVideoWindow_fnput_MessageDrain, 532 IVideoWindow_fnget_MessageDrain, 533 IVideoWindow_fnget_BorderColor, 534 IVideoWindow_fnput_BorderColor, 535 IVideoWindow_fnget_FullScreenMode, 536 IVideoWindow_fnput_FullScreenMode, 537 IVideoWindow_fnSetWindowForeground, 538 IVideoWindow_fnNotifyOwnerMessage, 539 IVideoWindow_fnSetWindowPosition, 540 IVideoWindow_fnGetWindowPosition, 541 IVideoWindow_fnGetMinIdealImageSize, 542 IVideoWindow_fnGetMaxIdealImageSize, 543 IVideoWindow_fnGetRestorePosition, 544 IVideoWindow_fnHideCursor, 545 IVideoWindow_fnIsCursorHidden, 547 546 548 547 }; 549 548 550 549 551 void CFilterGraph_InitIVideoWindow( CFilterGraph* pfg ) 552 { 553 TRACE("(%p)\n",pfg); 554 ICOM_VTBL(&pfg->vidwin) = &ivideowindow; 555 } 550 HRESULT CFilterGraph_InitIVideoWindow( CFilterGraph* pfg ) 551 { 552 TRACE("(%p)\n",pfg); 553 ICOM_VTBL(&pfg->vidwin) = &ivideowindow; 554 555 return NOERROR; 556 } 557 558 void CFilterGraph_UninitIVideoWindow( CFilterGraph* pfg ) 559 { 560 TRACE("(%p)\n",pfg); 561 } 562  - 
      
trunk/src/quartz/main.c
r6649 r6710 1 /* $Id: main.c,v 1.3 2001-09-05 13:36:37 bird Exp $ */2 3 1 #include "config.h" 4 2 … … 20 18 #include "sysclock.h" 21 19 #include "memalloc.h" 20 #include "devenum.h" 21 #include "fmap.h" 22 #include "fmap2.h" 23 #include "seekpass.h" 22 24 23 25 24 26 typedef struct QUARTZ_CLASSENTRY 25 27 { 26 const CLSID*pclsid;27 QUARTZ_pCreateIUnknownpCreateIUnk;28 const CLSID* pclsid; 29 QUARTZ_pCreateIUnknown pCreateIUnk; 28 30 } QUARTZ_CLASSENTRY; 29 31 … … 38 40 static ICOM_VTABLE(IClassFactory) iclassfact = 39 41 { 40 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE41 IClassFactory_fnQueryInterface,42 IClassFactory_fnAddRef,43 IClassFactory_fnRelease,44 IClassFactory_fnCreateInstance,45 IClassFactory_fnLockServer42 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 43 IClassFactory_fnQueryInterface, 44 IClassFactory_fnAddRef, 45 IClassFactory_fnRelease, 46 IClassFactory_fnCreateInstance, 47 IClassFactory_fnLockServer 46 48 }; 47 49 48 50 typedef struct 49 51 { 50 /* IUnknown fields */51 ICOM_VFIELD(IClassFactory);52 DWORDref;53 /* IClassFactory fields */54 const QUARTZ_CLASSENTRY* pEntry;52 /* IUnknown fields */ 53 ICOM_VFIELD(IClassFactory); 54 LONG ref; 55 /* IClassFactory fields */ 56 const QUARTZ_CLASSENTRY* pEntry; 55 57 } IClassFactoryImpl; 56 58 57 59 static const QUARTZ_CLASSENTRY QUARTZ_ClassList[] = 58 60 { 59 { &CLSID_FilterGraph, &QUARTZ_CreateFilterGraph }, 60 { &CLSID_SystemClock, &QUARTZ_CreateSystemClock }, 61 { &CLSID_MemoryAllocator, &QUARTZ_CreateMemoryAllocator }, 62 { NULL, NULL }, 61 { &CLSID_FilterGraph, &QUARTZ_CreateFilterGraph }, 62 { &CLSID_SystemClock, &QUARTZ_CreateSystemClock }, 63 { &CLSID_MemoryAllocator, &QUARTZ_CreateMemoryAllocator }, 64 { &CLSID_SystemDeviceEnum, &QUARTZ_CreateSystemDeviceEnum }, 65 { &CLSID_FilterMapper, &QUARTZ_CreateFilterMapper }, 66 { &CLSID_FilterMapper2, &QUARTZ_CreateFilterMapper2 }, 67 { &CLSID_SeekingPassThru, &QUARTZ_CreateSeekingPassThru }, 68 { NULL, NULL }, 63 69 }; 64 70 … … 70 76 void* QUARTZ_AllocObj( DWORD dwSize ) 71 77 { 72 void*pv;73 74 EnterCriticalSection( &csHeap );75 dwClassObjRef ++;76 pv = HeapAlloc( hDLLHeap, 0, dwSize );77 if ( pv == NULL )78 dwClassObjRef --;79 LeaveCriticalSection( &csHeap );80 81 return pv;78 void* pv; 79 80 EnterCriticalSection( &csHeap ); 81 dwClassObjRef ++; 82 pv = HeapAlloc( hDLLHeap, 0, dwSize ); 83 if ( pv == NULL ) 84 dwClassObjRef --; 85 LeaveCriticalSection( &csHeap ); 86 87 return pv; 82 88 } 83 89 84 90 void QUARTZ_FreeObj( void* pobj ) 85 91 { 86 EnterCriticalSection( &csHeap );87 HeapFree( hDLLHeap, 0, pobj );88 dwClassObjRef --;89 LeaveCriticalSection( &csHeap );92 EnterCriticalSection( &csHeap ); 93 HeapFree( hDLLHeap, 0, pobj ); 94 dwClassObjRef --; 95 LeaveCriticalSection( &csHeap ); 90 96 } 91 97 92 98 void* QUARTZ_AllocMem( DWORD dwSize ) 93 99 { 94 return HeapAlloc( hDLLHeap, 0, dwSize );100 return HeapAlloc( hDLLHeap, 0, dwSize ); 95 101 } 96 102 97 103 void QUARTZ_FreeMem( void* pMem ) 98 104 { 99 HeapFree( hDLLHeap, 0, pMem );105 HeapFree( hDLLHeap, 0, pMem ); 100 106 } 101 107 … … 105 111 IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) 106 112 { 107 ICOM_THIS(IClassFactoryImpl,iface);108 109 TRACE("(%p)->(%p,%p)\n",This,riid,ppobj);110 if ( ( IsEqualGUID( &IID_IUnknown, riid ) ) ||111 ( IsEqualGUID( &IID_IClassFactory, riid ) ) )112 {113 *ppobj = iface;114 IClassFactory_AddRef(iface);115 return S_OK;116 }117 118 return E_NOINTERFACE;113 ICOM_THIS(IClassFactoryImpl,iface); 114 115 TRACE("(%p)->(%p,%p)\n",This,riid,ppobj); 116 if ( ( IsEqualGUID( &IID_IUnknown, riid ) ) || 117 ( IsEqualGUID( &IID_IClassFactory, riid ) ) ) 118 { 119 *ppobj = iface; 120 IClassFactory_AddRef(iface); 121 return S_OK; 122 } 123 124 return E_NOINTERFACE; 119 125 } 120 126 121 127 static ULONG WINAPI IClassFactory_fnAddRef(LPCLASSFACTORY iface) 122 128 { 123 ICOM_THIS(IClassFactoryImpl,iface);124 125 TRACE("(%p)->()\n",This);126 127 return ++(This->ref);129 ICOM_THIS(IClassFactoryImpl,iface); 130 131 TRACE("(%p)->()\n",This); 132 133 return InterlockedExchangeAdd(&(This->ref),1) + 1; 128 134 } 129 135 130 136 static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface) 131 137 { 132 ICOM_THIS(IClassFactoryImpl,iface); 133 134 TRACE("(%p)->()\n",This); 135 if ( (--(This->ref)) > 0 ) 136 return This->ref; 137 138 QUARTZ_FreeObj(This); 139 return 0; 138 ICOM_THIS(IClassFactoryImpl,iface); 139 LONG ref; 140 141 TRACE("(%p)->()\n",This); 142 ref = InterlockedExchangeAdd(&(This->ref),-1) - 1; 143 if ( ref > 0 ) 144 return (ULONG)ref; 145 146 QUARTZ_FreeObj(This); 147 return 0; 140 148 } 141 149 142 150 static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj) 143 151 { 144 ICOM_THIS(IClassFactoryImpl,iface);145 HRESULThr;146 IUnknown*punk;147 148 TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);149 150 if ( ppobj == NULL )151 return E_POINTER;152 if ( pOuter != NULL && !IsEqualGUID( riid, &IID_IUnknown ) )153 return CLASS_E_NOAGGREGATION;154 155 *ppobj = NULL;156 157 hr = (*This->pEntry->pCreateIUnk)(pOuter,(void**)&punk);158 if ( hr != S_OK )159 return hr;160 161 hr = IUnknown_QueryInterface(punk,riid,ppobj);162 IUnknown_Release(punk);163 164 return hr;152 ICOM_THIS(IClassFactoryImpl,iface); 153 HRESULT hr; 154 IUnknown* punk; 155 156 TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); 157 158 if ( ppobj == NULL ) 159 return E_POINTER; 160 if ( pOuter != NULL && !IsEqualGUID( riid, &IID_IUnknown ) ) 161 return CLASS_E_NOAGGREGATION; 162 163 *ppobj = NULL; 164 165 hr = (*This->pEntry->pCreateIUnk)(pOuter,(void**)&punk); 166 if ( hr != S_OK ) 167 return hr; 168 169 hr = IUnknown_QueryInterface(punk,riid,ppobj); 170 IUnknown_Release(punk); 171 172 return hr; 165 173 } 166 174 167 175 static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock) 168 176 { 169 ICOM_THIS(IClassFactoryImpl,iface);170 HRESULThr;171 172 FIXME("(%p)->(%d),stub!\n",This,dolock);173 if (dolock)174 hr = IClassFactory_AddRef(iface);175 else176 hr = IClassFactory_Release(iface);177 178 return hr;177 ICOM_THIS(IClassFactoryImpl,iface); 178 HRESULT hr; 179 180 TRACE("(%p)->(%d)\n",This,dolock); 181 if (dolock) 182 hr = IClassFactory_AddRef(iface); 183 else 184 hr = IClassFactory_Release(iface); 185 186 return hr; 179 187 } 180 188 … … 183 191 static HRESULT IClassFactory_Alloc( const CLSID* pclsid, void** ppobj ) 184 192 { 185 const QUARTZ_CLASSENTRY* pEntry; 186 IClassFactoryImpl* pImpl; 187 188 TRACE( "(%s,%p)\n", debugstr_guid(pclsid), ppobj ); 189 190 pEntry = QUARTZ_ClassList; 191 while ( pEntry->pclsid != NULL ) 192 { 193 if ( IsEqualGUID( pclsid, pEntry->pclsid ) ) 194 goto found; 195 } 196 197 return CLASS_E_CLASSNOTAVAILABLE; 193 const QUARTZ_CLASSENTRY* pEntry; 194 IClassFactoryImpl* pImpl; 195 196 TRACE( "(%s,%p)\n", debugstr_guid(pclsid), ppobj ); 197 198 pEntry = QUARTZ_ClassList; 199 while ( pEntry->pclsid != NULL ) 200 { 201 if ( IsEqualGUID( pclsid, pEntry->pclsid ) ) 202 goto found; 203 pEntry ++; 204 } 205 206 return CLASS_E_CLASSNOTAVAILABLE; 198 207 found: 199 pImpl = (IClassFactoryImpl*)QUARTZ_AllocObj( sizeof(IClassFactoryImpl) ); 200 if ( pImpl == NULL ) 201 return E_OUTOFMEMORY; 202 203 ICOM_VTBL(pImpl) = &iclassfact; 204 pImpl->ref = 1; 205 pImpl->pEntry = pEntry; 206 207 *ppobj = (void*)pImpl; 208 return S_OK; 209 } 210 211 212 /*********************************************************************** 213 * QUARTZ_InitProcess (internal) 208 pImpl = (IClassFactoryImpl*)QUARTZ_AllocObj( sizeof(IClassFactoryImpl) ); 209 if ( pImpl == NULL ) 210 return E_OUTOFMEMORY; 211 212 TRACE( "allocated successfully.\n" ); 213 214 ICOM_VTBL(pImpl) = &iclassfact; 215 pImpl->ref = 1; 216 pImpl->pEntry = pEntry; 217 218 *ppobj = (void*)pImpl; 219 return S_OK; 220 } 221 222 223 /*********************************************************************** 224 * QUARTZ_InitProcess (internal) 214 225 */ 215 226 static BOOL QUARTZ_InitProcess( void ) 216 227 { 217 TRACE("()\n");218 219 dwClassObjRef = 0;220 hDLLHeap = (HANDLE)NULL;221 InitializeCriticalSection( &csHeap );222 223 hDLLHeap = HeapCreate( 0, 0x10000, 0 );224 if ( hDLLHeap == (HANDLE)NULL )225 return FALSE;226 227 return TRUE;228 } 229 230 /*********************************************************************** 231 * QUARTZ_UninitProcess (internal)228 TRACE("()\n"); 229 230 dwClassObjRef = 0; 231 hDLLHeap = (HANDLE)NULL; 232 InitializeCriticalSection( &csHeap ); 233 234 hDLLHeap = HeapCreate( 0, 0x10000, 0 ); 235 if ( hDLLHeap == (HANDLE)NULL ) 236 return FALSE; 237 238 return TRUE; 239 } 240 241 /*********************************************************************** 242 * QUARTZ_UninitProcess (internal) 232 243 */ 233 244 static void QUARTZ_UninitProcess( void ) 234 245 { 235 TRACE("()\n");236 237 if ( dwClassObjRef != 0 )238 ERR( "you must release some objects allocated from quartz.\n" );239 if ( hDLLHeap != (HANDLE)NULL )240 {241 HeapDestroy( hDLLHeap );242 hDLLHeap = (HANDLE)NULL;243 }244 DeleteCriticalSection( &csHeap );245 } 246 247 /*********************************************************************** 248 * QUARTZ_DllMain246 TRACE("()\n"); 247 248 if ( dwClassObjRef != 0 ) 249 ERR( "you must release some objects allocated from quartz.\n" ); 250 if ( hDLLHeap != (HANDLE)NULL ) 251 { 252 HeapDestroy( hDLLHeap ); 253 hDLLHeap = (HANDLE)NULL; 254 } 255 DeleteCriticalSection( &csHeap ); 256 } 257 258 /*********************************************************************** 259 * QUARTZ_DllMain 249 260 */ 250 261 BOOL WINAPI QUARTZ_DllMain( 251 HINSTANCE hInstDLL,252 DWORD fdwReason,253 LPVOID lpvReserved )254 { 255 switch ( fdwReason )256 {257 case DLL_PROCESS_ATTACH:258 if ( !QUARTZ_InitProcess() )259 return FALSE;260 break;261 case DLL_PROCESS_DETACH:262 QUARTZ_UninitProcess();263 break;264 case DLL_THREAD_ATTACH:265 break;266 case DLL_THREAD_DETACH:267 break;268 }269 270 return TRUE;271 } 272 273 274 /*********************************************************************** 275 * DllCanUnloadNow (QUARTZ.@)262 HINSTANCE hInstDLL, 263 DWORD fdwReason, 264 LPVOID lpvReserved ) 265 { 266 switch ( fdwReason ) 267 { 268 case DLL_PROCESS_ATTACH: 269 if ( !QUARTZ_InitProcess() ) 270 return FALSE; 271 break; 272 case DLL_PROCESS_DETACH: 273 QUARTZ_UninitProcess(); 274 break; 275 case DLL_THREAD_ATTACH: 276 break; 277 case DLL_THREAD_DETACH: 278 break; 279 } 280 281 return TRUE; 282 } 283 284 285 /*********************************************************************** 286 * DllCanUnloadNow (QUARTZ.@) 276 287 * 277 288 * RETURNS … … 281 292 HRESULT WINAPI QUARTZ_DllCanUnloadNow(void) 282 293 { 283 HRESULThr;284 285 EnterCriticalSection( &csHeap );286 hr = ( dwClassObjRef == 0 ) ? S_OK : S_FALSE;287 LeaveCriticalSection( &csHeap );288 289 return hr;290 } 291 292 /*********************************************************************** 293 * DllGetClassObject (QUARTZ.@)294 HRESULT hr; 295 296 EnterCriticalSection( &csHeap ); 297 hr = ( dwClassObjRef == 0 ) ? S_OK : S_FALSE; 298 LeaveCriticalSection( &csHeap ); 299 300 return hr; 301 } 302 303 /*********************************************************************** 304 * DllGetClassObject (QUARTZ.@) 294 305 */ 295 306 HRESULT WINAPI QUARTZ_DllGetClassObject( 296 const CLSID* pclsid,const IID* piid,void** ppv)297 { 298 *ppv = NULL;299 if ( IsEqualCLSID( &IID_IUnknown, piid ) ||300 IsEqualCLSID( &IID_IClassFactory, piid ) )301 {302 return IClassFactory_Alloc( pclsid, ppv );303 }304 305 return CLASS_E_CLASSNOTAVAILABLE;306 } 307 308 /*********************************************************************** 309 * DllRegisterServer (QUARTZ.@)307 const CLSID* pclsid,const IID* piid,void** ppv) 308 { 309 *ppv = NULL; 310 if ( IsEqualCLSID( &IID_IUnknown, piid ) || 311 IsEqualCLSID( &IID_IClassFactory, piid ) ) 312 { 313 return IClassFactory_Alloc( pclsid, ppv ); 314 } 315 316 return CLASS_E_CLASSNOTAVAILABLE; 317 } 318 319 /*********************************************************************** 320 * DllRegisterServer (QUARTZ.@) 310 321 */ 311 322 312 323 HRESULT WINAPI QUARTZ_DllRegisterServer( void ) 313 324 { 314 FIXME( "(): stub\n" );315 return E_FAIL;316 } 317 318 /*********************************************************************** 319 * DllUnregisterServer (QUARTZ.@)325 FIXME( "(): stub\n" ); 326 return E_FAIL; 327 } 328 329 /*********************************************************************** 330 * DllUnregisterServer (QUARTZ.@) 320 331 */ 321 332 322 333 HRESULT WINAPI QUARTZ_DllUnregisterServer( void ) 323 334 { 324 FIXME( "(): stub\n" ); 325 return E_FAIL; 326 } 327 335 FIXME( "(): stub\n" ); 336 return E_FAIL; 337 } 338 339 340  - 
      
trunk/src/quartz/makefile
r6578 r6710 1 # $Id: makefile,v 1. 2 2001-08-23 18:34:22 sandervl Exp $1 # $Id: makefile,v 1.3 2001-09-15 09:28:22 sandervl Exp $ 2 2 3 3 # … … 29 29 OBJS = \ 30 30 $(OBJDIR)\amerror.obj \ 31 $(OBJDIR)\amundoc.obj \ 31 32 $(OBJDIR)\complist.obj \ 33 $(OBJDIR)\fgclsid.obj \ 34 $(OBJDIR)\fgidisp.obj \ 32 35 $(OBJDIR)\fgraph.obj \ 33 $(OBJDIR)\ ifgraph.obj \34 $(OBJDIR)\ imem.obj \36 $(OBJDIR)\fmap.obj \ 37 $(OBJDIR)\fmap2.obj \ 35 38 $(OBJDIR)\ibasaud.obj \ 36 39 $(OBJDIR)\ibasvid.obj \ 40 $(OBJDIR)\ifgraph.obj \ 41 $(OBJDIR)\ifmap.obj \ 42 $(OBJDIR)\ifmap3.obj \ 43 $(OBJDIR)\igrver.obj \ 37 44 $(OBJDIR)\imcntl.obj \ 45 $(OBJDIR)\imem.obj \ 46 $(OBJDIR)\imesink.obj \ 38 47 $(OBJDIR)\imevent.obj \ 48 $(OBJDIR)\imfilter.obj \ 39 49 $(OBJDIR)\impos.obj \ 40 50 $(OBJDIR)\imseek.obj \ 51 $(OBJDIR)\irclock.obj \ 52 $(OBJDIR)\iunk.obj \ 41 53 $(OBJDIR)\ividwin.obj \ 54 $(OBJDIR)\main.obj \ 55 $(OBJDIR)\memalloc.obj \ 56 $(OBJDIR)\monprop.obj \ 57 $(OBJDIR)\regsvr.obj \ 58 $(OBJDIR)\seekpass.obj \ 59 $(OBJDIR)\sysclock.obj \ 60 $(OBJDIR)\devenum.obj \ 61 $(OBJDIR)\devmon.obj \ 62 $(OBJDIR)\enumunk.obj \ 63 $(OBJDIR)\idevenum.obj \ 42 64 $(OBJDIR)\initterm.obj \ 43 65 $(OBJDIR)\initquartz.obj \ 44 $(OBJDIR)\irclock.obj \45 $(OBJDIR)\main.obj \46 66 $(OBJDIR)\guid.obj \ 47 $(OBJDIR)\iunk.obj \48 $(OBJDIR)\memalloc.obj \49 $(OBJDIR)\sysclock.obj \50 67 $(OBJDIR)\quartzrsrc.obj 51 68 … … 57 74 $(ODIN32_LIB)/kernel32.lib \ 58 75 $(ODIN32_LIB)/user32.lib \ 76 $(ODIN32_LIB)/ole32.lib \ 77 $(ODIN32_LIB)/oleaut32.lib \ 59 78 $(ODIN32_LIB)/$(ODINCRT).lib \ 60 79 OS2386.LIB \  - 
      
trunk/src/quartz/memalloc.c
r6649 r6710 1 /* $Id: memalloc.c,v 1.3 2001-09-05 13:36:37 bird Exp $ */2 1 /* 3 2 * Implementation of CLSID_MemoryAllocator. … … 31 30 }; 32 31 32 static void QUARTZ_DestroyMemoryAllocator(IUnknown* punk) 33 { 34 CMemoryAllocator_THIS(punk,unk); 35 36 CMemoryAllocator_UninitIMemAllocator( This ); 37 } 38 33 39 HRESULT QUARTZ_CreateMemoryAllocator(IUnknown* punkOuter,void** ppobj) 34 40 { 35 CMemoryAllocator* pma; 41 CMemoryAllocator* pma; 42 HRESULT hr; 36 43 37 TRACE("(%p,%p)\n",punkOuter,ppobj);44 TRACE("(%p,%p)\n",punkOuter,ppobj); 38 45 39 pma = (CMemoryAllocator*)QUARTZ_AllocObj( sizeof(CMemoryAllocator) );40 if ( pma == NULL )41 return E_OUTOFMEMORY;46 pma = (CMemoryAllocator*)QUARTZ_AllocObj( sizeof(CMemoryAllocator) ); 47 if ( pma == NULL ) 48 return E_OUTOFMEMORY; 42 49 43 QUARTZ_IUnkInit( &pma->unk, punkOuter ); 44 CMemoryAllocator_InitIMemAllocator( pma ); 50 QUARTZ_IUnkInit( &pma->unk, punkOuter ); 51 hr = CMemoryAllocator_InitIMemAllocator( pma ); 52 if ( FAILED(hr) ) 53 { 54 QUARTZ_FreeObj( pma ); 55 return hr; 56 } 45 57 46 pma->unk.pEntries = IFEntries; 47 pma->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 58 pma->unk.pEntries = IFEntries; 59 pma->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 60 pma->unk.pOnFinalRelease = QUARTZ_DestroyMemoryAllocator; 48 61 49 *ppobj = (void*)(&pma->unk);62 *ppobj = (void*)(&pma->unk); 50 63 51 return S_OK;64 return S_OK; 52 65 }  - 
      
trunk/src/quartz/memalloc.h
r6563 r6710 25 25 26 26 /* IMemAllocator fields. */ 27 CRITICAL_SECTION csMem; 28 ALLOCATOR_PROPERTIES prop; 27 29 } CMemoryAllocator; 28 30 … … 31 33 HRESULT QUARTZ_CreateMemoryAllocator(IUnknown* punkOuter,void** ppobj); 32 34 33 void CMemoryAllocator_InitIMemAllocator( CMemoryAllocator* pma ); 35 HRESULT CMemoryAllocator_InitIMemAllocator( CMemoryAllocator* pma ); 36 void CMemoryAllocator_UninitIMemAllocator( CMemoryAllocator* pma ); 34 37 35 38  - 
      
trunk/src/quartz/sysclock.c
r6649 r6710 1 /* $Id: sysclock.c,v 1.3 2001-09-05 13:36:38 bird Exp $ */2 1 /* 3 2 * Implementation of CLSID_SystemClock. … … 31 30 }; 32 31 32 33 static void QUARTZ_DestroySystemClock(IUnknown* punk) 34 { 35 CSystemClock_THIS(punk,unk); 36 37 CSystemClock_UninitIReferenceClock( This ); 38 } 39 33 40 HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj) 34 41 { 35 CSystemClock* psc; 42 CSystemClock* psc; 43 HRESULT hr; 36 44 37 TRACE("(%p,%p)\n",punkOuter,ppobj);45 TRACE("(%p,%p)\n",punkOuter,ppobj); 38 46 39 psc = (CSystemClock*)QUARTZ_AllocObj( sizeof(CSystemClock) );40 if ( psc == NULL )41 return E_OUTOFMEMORY;47 psc = (CSystemClock*)QUARTZ_AllocObj( sizeof(CSystemClock) ); 48 if ( psc == NULL ) 49 return E_OUTOFMEMORY; 42 50 43 QUARTZ_IUnkInit( &psc->unk, punkOuter ); 44 CSystemClock_InitIReferenceClock( psc ); 51 QUARTZ_IUnkInit( &psc->unk, punkOuter ); 52 hr = CSystemClock_InitIReferenceClock( psc ); 53 if ( FAILED(hr) ) 54 { 55 QUARTZ_FreeObj( psc ); 56 return hr; 57 } 45 58 46 psc->unk.pEntries = IFEntries; 47 psc->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 59 psc->unk.pEntries = IFEntries; 60 psc->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 61 psc->unk.pOnFinalRelease = QUARTZ_DestroySystemClock; 48 62 49 *ppobj = (void*)(&psc->unk);63 *ppobj = (void*)(&psc->unk); 50 64 51 return S_OK;65 return S_OK; 52 66 }  - 
      
trunk/src/quartz/sysclock.h
r6563 r6710 20 20 21 21 22 /* implementation limit */ 23 #define WINE_QUARTZ_SYSCLOCK_TIMER_MAX 64 24 25 typedef struct QUARTZ_TimerEntry 26 { 27 DWORD dwAdvCookie; 28 BOOL fPeriodic; 29 HANDLE hEvent; 30 REFERENCE_TIME rtStart; 31 REFERENCE_TIME rtInterval; 32 } QUARTZ_TimerEntry; 33 22 34 typedef struct CSystemClock 23 35 { … … 26 38 27 39 /* IReferenceClock fields. */ 40 CRITICAL_SECTION m_csClock; 41 DWORD m_dwTimeLast; 42 REFERENCE_TIME m_rtLast; 43 HANDLE m_hThreadTimer; 44 HANDLE m_hEventInit; 45 DWORD m_idThreadTimer; 46 47 DWORD m_dwAdvCookieNext; 48 QUARTZ_TimerEntry m_timerEntries[WINE_QUARTZ_SYSCLOCK_TIMER_MAX]; 28 49 } CSystemClock; 29 50 … … 32 53 HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj); 33 54 34 void CSystemClock_InitIReferenceClock( CSystemClock* psc ); 55 HRESULT CSystemClock_InitIReferenceClock( CSystemClock* psc ); 56 void CSystemClock_UninitIReferenceClock( CSystemClock* psc ); 35 57 36 58  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  