ReactOS  0.4.13-dev-986-g029b8f2
filter.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winerror.h"
#include "mmsystem.h"
#include "mmreg.h"
#include "msacm.h"
#include "msacmdrv.h"
#include "wineacm.h"
#include "wine/debug.h"
Include dependency graph for filter.c:

Go to the source code of this file.

Classes

struct  MSACM_FilterEnumWtoA_Instance
 
struct  MSACM_FilterTagEnumWtoA_Instance
 

Macros

#define NOBITMAP
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msacm)
 
MMRESULT WINAPI acmFilterChooseA (PACMFILTERCHOOSEA pafltrc)
 
MMRESULT WINAPI acmFilterChooseW (PACMFILTERCHOOSEW pafltrc)
 
MMRESULT WINAPI acmFilterDetailsA (HACMDRIVER had, PACMFILTERDETAILSA pafd, DWORD fdwDetails)
 
MMRESULT WINAPI acmFilterDetailsW (HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
 
static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA (HACMDRIVERID hadid, PACMFILTERDETAILSW pafdw, DWORD_PTR dwInstance, DWORD fdwSupport)
 
MMRESULT WINAPI acmFilterEnumA (HACMDRIVER had, PACMFILTERDETAILSA pafda, ACMFILTERENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
static BOOL MSACM_FilterEnumHelper (PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFilterEnumW (HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFilterTagDetailsA (HACMDRIVER had, PACMFILTERTAGDETAILSA paftda, DWORD fdwDetails)
 
MMRESULT WINAPI acmFilterTagDetailsW (HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
 
static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA (HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftdw, DWORD_PTR dwInstance, DWORD fdwSupport)
 
MMRESULT WINAPI acmFilterTagEnumA (HACMDRIVER had, PACMFILTERTAGDETAILSA paftda, ACMFILTERTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 
MMRESULT WINAPI acmFilterTagEnumW (HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, ACMFILTERTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
 

Macro Definition Documentation

◆ NOBITMAP

#define NOBITMAP

Definition at line 30 of file filter.c.

Function Documentation

◆ acmFilterChooseA()

MMRESULT WINAPI acmFilterChooseA ( PACMFILTERCHOOSEA  pafltrc)

Definition at line 42 of file filter.c.

43 {
44  FIXME("(%p): stub\n", pafltrc);
46  return MMSYSERR_ERROR;
47 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ acmFilterChooseW()

MMRESULT WINAPI acmFilterChooseW ( PACMFILTERCHOOSEW  pafltrc)

Definition at line 52 of file filter.c.

53 {
54  FIXME("(%p): stub\n", pafltrc);
56  return MMSYSERR_ERROR;
57 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ acmFilterDetailsA()

MMRESULT WINAPI acmFilterDetailsA ( HACMDRIVER  had,
PACMFILTERDETAILSA  pafd,
DWORD  fdwDetails 
)

Definition at line 62 of file filter.c.

64 {
65  ACMFILTERDETAILSW afdw;
66  MMRESULT mmr;
67 
68  memset(&afdw, 0, sizeof(afdw));
69  afdw.cbStruct = sizeof(afdw);
70  afdw.dwFilterIndex = pafd->dwFilterIndex;
71  afdw.dwFilterTag = pafd->dwFilterTag;
72  afdw.pwfltr = pafd->pwfltr;
73  afdw.cbwfltr = pafd->cbwfltr;
74 
75  mmr = acmFilterDetailsW(had, &afdw, fdwDetails);
76  if (mmr == MMSYSERR_NOERROR) {
77  pafd->dwFilterTag = afdw.dwFilterTag;
78  pafd->fdwSupport = afdw.fdwSupport;
79  WideCharToMultiByte( CP_ACP, 0, afdw.szFilter, -1, pafd->szFilter,
80  sizeof(pafd->szFilter), NULL, NULL );
81  }
82  return mmr;
83 }
#define WideCharToMultiByte
Definition: compat.h:101
PWAVEFILTER pwfltr
Definition: msacm.h:399
DWORD dwFilterIndex
Definition: msacm.h:385
#define CP_ACP
Definition: compat.h:99
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:390
UINT MMRESULT
Definition: mmsystem.h:962
DWORD dwFilterTag
Definition: msacm.h:386
PWAVEFILTER pwfltr
Definition: msacm.h:388
smooth NULL
Definition: ftsmooth.c:416
MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
Definition: filter.c:88
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
DWORD fdwSupport
Definition: msacm.h:387
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:401
DWORD dwFilterTag
Definition: msacm.h:397
DWORD dwFilterIndex
Definition: msacm.h:396
#define memset(x, y, z)
Definition: compat.h:39
DWORD cbStruct
Definition: msacm.h:395
DWORD fdwSupport
Definition: msacm.h:398

◆ acmFilterDetailsW()

MMRESULT WINAPI acmFilterDetailsW ( HACMDRIVER  had,
PACMFILTERDETAILSW  pafd,
DWORD  fdwDetails 
)

Definition at line 88 of file filter.c.

90 {
91  MMRESULT mmr;
93 
94  TRACE("(%p, %p, %d)\n", had, pafd, fdwDetails);
95 
96  memset(&aftd, 0, sizeof(aftd));
97  aftd.cbStruct = sizeof(aftd);
98 
99  if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
100 
101  switch (fdwDetails) {
103  if (pafd->dwFilterTag != pafd->pwfltr->dwFilterTag) {
104  mmr = MMSYSERR_INVALPARAM;
105  break;
106  }
107  if (had == NULL) {
108  PWINE_ACMDRIVERID padid;
109 
110  mmr = ACMERR_NOTPOSSIBLE;
111  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
112  /* should check for codec only */
114  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
116  (LPARAM)pafd, (LPARAM)fdwDetails);
117  acmDriverClose(had, 0);
118  if (mmr == MMSYSERR_NOERROR) break;
119  }
120  }
121  } else {
122  mmr = MSACM_Message(had, ACMDM_FILTER_DETAILS, (LPARAM)pafd, fdwDetails);
123  }
124  break;
126  /* should check pafd->dwFilterIndex < aftd->cStandardFilters */
127  mmr = MSACM_Message(had, ACMDM_FILTER_DETAILS, (LPARAM)pafd, fdwDetails);
128  break;
129  default:
130  WARN("Unknown fdwDetails %08x\n", fdwDetails);
131  mmr = MMSYSERR_INVALFLAG;
132  break;
133  }
134 
135  TRACE("=> %d\n", mmr);
136  return mmr;
137 }
DWORD fdwSupport
Definition: wineacm.h:97
#define ACM_FILTERDETAILSF_INDEX
Definition: msacm.h:95
PWAVEFILTER pwfltr
Definition: msacm.h:399
#define WARN(fmt,...)
Definition: debug.h:111
DWORD dwFilterTag
Definition: mmreg.h:50
UINT MMRESULT
Definition: mmsystem.h:962
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
#define ACM_FILTERDETAILSF_FILTER
Definition: msacm.h:96
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
DWORD dwFilterTag
Definition: msacm.h:397
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define memset(x, y, z)
Definition: compat.h:39
DWORD cbStruct
Definition: msacm.h:395
#define ACMDM_FILTER_DETAILS
Definition: msacmdrv.h:56

Referenced by acmFilterDetailsA(), and MSACM_FilterEnumHelper().

◆ acmFilterEnumA()

MMRESULT WINAPI acmFilterEnumA ( HACMDRIVER  had,
PACMFILTERDETAILSA  pafda,
ACMFILTERENUMCBA  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 167 of file filter.c.

170 {
171  ACMFILTERDETAILSW afdw;
172  struct MSACM_FilterEnumWtoA_Instance afei;
173 
174  memset(&afdw, 0, sizeof(afdw));
175  afdw.cbStruct = sizeof(afdw);
177  afdw.dwFilterTag = pafda->dwFilterTag;
178  afdw.pwfltr = pafda->pwfltr;
179  afdw.cbwfltr = pafda->cbwfltr;
180 
181  afei.pafda = pafda;
182  afei.dwInstance = dwInstance;
183  afei.fnCallback = fnCallback;
184 
185  return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA,
186  (DWORD_PTR)&afei, fdwEnum);
187 }
PWAVEFILTER pwfltr
Definition: msacm.h:399
DWORD dwFilterIndex
Definition: msacm.h:385
DWORD dwFilterTag
Definition: msacm.h:386
PWAVEFILTER pwfltr
Definition: msacm.h:388
static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA(HACMDRIVERID hadid, PACMFILTERDETAILSW pafdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: filter.c:145
MMRESULT WINAPI acmFilterEnumW(HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:224
uint32_t DWORD_PTR
Definition: typedefs.h:63
DWORD dwFilterTag
Definition: msacm.h:397
DWORD dwFilterIndex
Definition: msacm.h:396
PACMFILTERDETAILSA pafda
Definition: filter.c:140
#define memset(x, y, z)
Definition: compat.h:39
DWORD cbStruct
Definition: msacm.h:395
ACMFILTERENUMCBA fnCallback
Definition: filter.c:142

◆ acmFilterEnumW()

MMRESULT WINAPI acmFilterEnumW ( HACMDRIVER  had,
PACMFILTERDETAILSW  pafd,
ACMFILTERENUMCBW  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 224 of file filter.c.

227 {
228  PWINE_ACMDRIVERID padid;
229  BOOL ret;
230 
231  TRACE("(%p, %p, %p, %ld, %d)\n",
232  had, pafd, fnCallback, dwInstance, fdwEnum);
233 
234  if (pafd->cbStruct < sizeof(*pafd)) return MMSYSERR_INVALPARAM;
235 
236  if (fdwEnum & ~(ACM_FILTERENUMF_DWFILTERTAG))
237  FIXME("Unsupported fdwEnum values\n");
238 
239  if (had) {
240  HACMDRIVERID hadid;
241 
242  if (acmDriverID((HACMOBJ)had, &hadid, 0) != MMSYSERR_NOERROR)
243  return MMSYSERR_INVALHANDLE;
244  MSACM_FilterEnumHelper(MSACM_GetDriverID(hadid), had, pafd,
245  fnCallback, dwInstance, fdwEnum);
246  return MMSYSERR_NOERROR;
247  }
248  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
249  /* should check for codec only */
251  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != MMSYSERR_NOERROR)
252  continue;
253  ret = MSACM_FilterEnumHelper(padid, had, pafd,
254  fnCallback, dwInstance, fdwEnum);
255  acmDriverClose(had, 0);
256  if (!ret) break;
257  }
258  return MMSYSERR_NOERROR;
259 }
DWORD fdwSupport
Definition: wineacm.h:97
#define MMSYSERR_INVALHANDLE
Definition: mmsystem.h:101
static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFILTERDETAILSW pafd, ACMFILTERENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:189
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
MMRESULT WINAPI acmDriverID(HACMOBJ hao, PHACMDRIVERID phadid, DWORD fdwDriverID)
Definition: driver.c:355
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
int ret
#define ACM_FILTERENUMF_DWFILTERTAG
Definition: msacm.h:106
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Definition: internal.c:829
DWORD cbStruct
Definition: msacm.h:395
ACMFILTERENUMCBA fnCallback
Definition: filter.c:142

Referenced by acmFilterEnumA().

◆ acmFilterTagDetailsA()

MMRESULT WINAPI acmFilterTagDetailsA ( HACMDRIVER  had,
PACMFILTERTAGDETAILSA  paftda,
DWORD  fdwDetails 
)

Definition at line 264 of file filter.c.

266 {
267  ACMFILTERTAGDETAILSW aftdw;
268  MMRESULT mmr;
269 
270  memset(&aftdw, 0, sizeof(aftdw));
271  aftdw.cbStruct = sizeof(aftdw);
272  aftdw.dwFilterTagIndex = paftda->dwFilterTagIndex;
273  aftdw.dwFilterTag = paftda->dwFilterTag;
274 
275  mmr = acmFilterTagDetailsW(had, &aftdw, fdwDetails);
276  if (mmr == MMSYSERR_NOERROR) {
277  paftda->dwFilterTag = aftdw.dwFilterTag;
278  paftda->dwFilterTagIndex = aftdw.dwFilterTagIndex;
279  paftda->cbFilterSize = aftdw.cbFilterSize;
280  paftda->fdwSupport = aftdw.fdwSupport;
281  paftda->cStandardFilters = aftdw.cStandardFilters;
282  WideCharToMultiByte( CP_ACP, 0, aftdw.szFilterTag, -1, paftda->szFilterTag,
283  sizeof(paftda->szFilterTag), NULL, NULL );
284  }
285  return mmr;
286 }
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:416
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
DWORD cStandardFilters
Definition: msacm.h:426
DWORD dwFilterTagIndex
Definition: msacm.h:422
UINT MMRESULT
Definition: mmsystem.h:962
DWORD cStandardFilters
Definition: msacm.h:415
DWORD dwFilterTagIndex
Definition: msacm.h:411
smooth NULL
Definition: ftsmooth.c:416
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:427
#define memset(x, y, z)
Definition: compat.h:39
MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
Definition: filter.c:291

◆ acmFilterTagDetailsW()

MMRESULT WINAPI acmFilterTagDetailsW ( HACMDRIVER  had,
PACMFILTERTAGDETAILSW  paftd,
DWORD  fdwDetails 
)

Definition at line 291 of file filter.c.

293 {
294  PWINE_ACMDRIVERID padid;
295  MMRESULT mmr;
296 
297  TRACE("(%p, %p, %d)\n", had, paftd, fdwDetails);
298 
301  return MMSYSERR_INVALFLAG;
302 
303  switch (fdwDetails) {
305  if (had == NULL) {
306  mmr = ACMERR_NOTPOSSIBLE;
307  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
308  /* should check for codec only */
310  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
311  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
312  acmDriverClose(had, 0);
313  if (mmr == MMSYSERR_NOERROR) break;
314  }
315  }
316  } else {
317  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
318  }
319  break;
320 
322  /* FIXME should check paftd->dwFilterTagIndex < add.cFilterTags */
323  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
324  break;
325 
327  if (had == NULL) {
329  DWORD ft = paftd->dwFilterTag;
330 
331  mmr = ACMERR_NOTPOSSIBLE;
332  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
333  /* should check for codec only */
334  if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
335  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == 0) {
336 
337  memset(&tmp, 0, sizeof(tmp));
338  tmp.cbStruct = sizeof(tmp);
339  tmp.dwFilterTag = ft;
340 
342  (LPARAM)&tmp, fdwDetails) == MMSYSERR_NOERROR) {
343  if (mmr == ACMERR_NOTPOSSIBLE ||
344  paftd->cbFilterSize < tmp.cbFilterSize) {
345  *paftd = tmp;
346  mmr = MMSYSERR_NOERROR;
347  }
348  }
349  acmDriverClose(had, 0);
350  }
351  }
352  } else {
353  mmr = MSACM_Message(had, ACMDM_FILTERTAG_DETAILS, (LPARAM)paftd, fdwDetails);
354  }
355  break;
356 
357  default:
358  WARN("Unsupported fdwDetails=%08x\n", fdwDetails);
359  mmr = MMSYSERR_ERROR;
360  }
361 
362  if (mmr == MMSYSERR_NOERROR &&
363  paftd->dwFilterTag == WAVE_FORMAT_PCM && paftd->szFilterTag[0] == 0)
364  MultiByteToWideChar(CP_ACP, 0, "PCM", -1, paftd->szFilterTag,
365  ARRAY_SIZE(paftd->szFilterTag));
366 
367  return mmr;
368 }
DWORD fdwSupport
Definition: wineacm.h:97
#define CP_ACP
Definition: compat.h:99
#define WARN(fmt,...)
Definition: debug.h:111
UINT MMRESULT
Definition: mmsystem.h:962
#define ACM_FILTERTAGDETAILSF_INDEX
Definition: msacm.h:101
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
#define WAVE_FORMAT_PCM
Definition: constants.h:425
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define ACM_FILTERTAGDETAILSF_LARGESTSIZE
Definition: msacm.h:103
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define MMSYSERR_ERROR
Definition: mmsystem.h:97
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MMSYSERR_INVALFLAG
Definition: mmsystem.h:106
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
MMRESULT MSACM_Message(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: internal.c:865
#define ACMDM_FILTERTAG_DETAILS
Definition: msacmdrv.h:55
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define ACMERR_NOTPOSSIBLE
Definition: msacm.h:36
#define ARRAY_SIZE(a)
Definition: main.h:24
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:427
#define MultiByteToWideChar
Definition: compat.h:100
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
#define ACM_FILTERTAGDETAILSF_FILTERTAG
Definition: msacm.h:102
#define memset(x, y, z)
Definition: compat.h:39

Referenced by acmFilterTagDetailsA(), acmFilterTagEnumW(), and MSACM_FilterEnumHelper().

◆ acmFilterTagEnumA()

MMRESULT WINAPI acmFilterTagEnumA ( HACMDRIVER  had,
PACMFILTERTAGDETAILSA  paftda,
ACMFILTERTAGENUMCBA  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 400 of file filter.c.

403 {
404  ACMFILTERTAGDETAILSW aftdw;
406 
407  memset(&aftdw, 0, sizeof(aftdw));
408  aftdw.cbStruct = sizeof(aftdw);
410  aftdw.dwFilterTag = paftda->dwFilterTag;
411 
412  aftei.paftda = paftda;
413  aftei.dwInstance = dwInstance;
414  aftei.fnCallback = fnCallback;
415 
417  (DWORD_PTR)&aftei, fdwEnum);
418 }
static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid, PACMFILTERTAGDETAILSW paftdw, DWORD_PTR dwInstance, DWORD fdwSupport)
Definition: filter.c:376
DWORD dwFilterTagIndex
Definition: msacm.h:422
MMRESULT WINAPI acmFilterTagEnumW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, ACMFILTERTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum)
Definition: filter.c:423
DWORD dwFilterTagIndex
Definition: msacm.h:411
PACMFILTERTAGDETAILSA paftda
Definition: filter.c:371
ACMFILTERTAGENUMCBA fnCallback
Definition: filter.c:373
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define memset(x, y, z)
Definition: compat.h:39

◆ acmFilterTagEnumW()

MMRESULT WINAPI acmFilterTagEnumW ( HACMDRIVER  had,
PACMFILTERTAGDETAILSW  paftd,
ACMFILTERTAGENUMCBW  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)

Definition at line 423 of file filter.c.

426 {
427  PWINE_ACMDRIVERID padid;
428  unsigned int i;
429 
430  TRACE("(%p, %p, %p, %ld, %d)\n",
431  had, paftd, fnCallback, dwInstance, fdwEnum);
432 
433  if (paftd->cbStruct < sizeof(*paftd)) return MMSYSERR_INVALPARAM;
434 
435  if (had) FIXME("had != NULL, not supported\n");
436 
437  for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
438  /* should check for codec only */
440  acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == MMSYSERR_NOERROR) {
441 
442  for (i = 0; i < padid->cFilterTags; i++) {
443  paftd->dwFilterTagIndex = i;
445  if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport)) {
446  padid = NULL;
447  break;
448  }
449  }
450  }
451  acmDriverClose(had, 0);
452  }
453  }
454  return MMSYSERR_NOERROR;
455 }
DWORD fdwSupport
Definition: wineacm.h:97
DWORD dwFilterTagIndex
Definition: msacm.h:422
#define ACM_FILTERTAGDETAILSF_INDEX
Definition: msacm.h:101
MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose)
Definition: driver.c:182
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
PWINE_ACMDRIVERID pNextACMDriverID
Definition: wineacm.h:92
#define TRACE(s)
Definition: solgame.cpp:4
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen)
Definition: driver.c:494
ACMFILTERTAGENUMCBA fnCallback
Definition: filter.c:373
PWINE_ACMDRIVERID MSACM_pFirstACMDriverID
Definition: internal.c:46
#define MMSYSERR_INVALPARAM
Definition: mmsystem.h:107
#define ACMDRIVERDETAILS_SUPPORTF_DISABLED
Definition: msacm.h:67
MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
Definition: filter.c:291

Referenced by acmFilterTagEnumA().

◆ MSACM_FilterEnumCallbackWtoA()

static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA ( HACMDRIVERID  hadid,
PACMFILTERDETAILSW  pafdw,
DWORD_PTR  dwInstance,
DWORD  fdwSupport 
)
static

Definition at line 145 of file filter.c.

149 {
150  struct MSACM_FilterEnumWtoA_Instance* pafei;
151 
152  pafei = (struct MSACM_FilterEnumWtoA_Instance*)dwInstance;
153 
154  pafei->pafda->dwFilterIndex = pafdw->dwFilterIndex;
155  pafei->pafda->dwFilterTag = pafdw->dwFilterTag;
156  pafei->pafda->fdwSupport = pafdw->fdwSupport;
157  WideCharToMultiByte( CP_ACP, 0, pafdw->szFilter, -1, pafei->pafda->szFilter,
158  sizeof(pafei->pafda->szFilter), NULL, NULL );
159 
160  return (pafei->fnCallback)(hadid, pafei->pafda,
161  pafei->dwInstance, fdwSupport);
162 }
#define WideCharToMultiByte
Definition: compat.h:101
DWORD dwFilterIndex
Definition: msacm.h:385
#define CP_ACP
Definition: compat.h:99
CHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:390
DWORD dwFilterTag
Definition: msacm.h:386
smooth NULL
Definition: ftsmooth.c:416
DWORD fdwSupport
Definition: msacm.h:387
WCHAR szFilter[ACMFILTERDETAILS_FILTER_CHARS]
Definition: msacm.h:401
DWORD dwFilterTag
Definition: msacm.h:397
DWORD dwFilterIndex
Definition: msacm.h:396
PACMFILTERDETAILSA pafda
Definition: filter.c:140
DWORD fdwSupport
Definition: msacm.h:398
ACMFILTERENUMCBA fnCallback
Definition: filter.c:142

Referenced by acmFilterEnumA().

◆ MSACM_FilterEnumHelper()

static BOOL MSACM_FilterEnumHelper ( PWINE_ACMDRIVERID  padid,
HACMDRIVER  had,
PACMFILTERDETAILSW  pafd,
ACMFILTERENUMCBW  fnCallback,
DWORD_PTR  dwInstance,
DWORD  fdwEnum 
)
static

Definition at line 189 of file filter.c.

193 {
195  unsigned int i, j;
196 
197  for (i = 0; i < padid->cFilterTags; i++) {
198  memset(&aftd, 0, sizeof(aftd));
199  aftd.cbStruct = sizeof(aftd);
200  aftd.dwFilterTagIndex = i;
202  continue;
203 
204  if ((fdwEnum & ACM_FILTERENUMF_DWFILTERTAG) &&
205  aftd.dwFilterTag != pafd->pwfltr->dwFilterTag)
206  continue;
207 
208  for (j = 0; j < aftd.cStandardFilters; j++) {
209  pafd->dwFilterIndex = j;
210  pafd->dwFilterTag = aftd.dwFilterTag;
212  continue;
213 
214  if (!(fnCallback)((HACMDRIVERID)padid, pafd, dwInstance, padid->fdwSupport))
215  return FALSE;
216  }
217  }
218  return TRUE;
219 }
#define TRUE
Definition: types.h:120
#define ACM_FILTERDETAILSF_INDEX
Definition: msacm.h:95
PWAVEFILTER pwfltr
Definition: msacm.h:399
DWORD cStandardFilters
Definition: msacm.h:426
DWORD dwFilterTagIndex
Definition: msacm.h:422
DWORD dwFilterTag
Definition: mmreg.h:50
DWORD cFilterTags
Definition: wineacm.h:95
#define ACM_FILTERTAGDETAILSF_INDEX
Definition: msacm.h:101
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, DWORD fdwDetails)
Definition: filter.c:88
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
#define ACM_FILTERENUMF_DWFILTERTAG
Definition: msacm.h:106
DWORD dwFilterTag
Definition: msacm.h:397
DWORD dwFilterIndex
Definition: msacm.h:396
#define memset(x, y, z)
Definition: compat.h:39
MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd, DWORD fdwDetails)
Definition: filter.c:291
ACMFILTERENUMCBA fnCallback
Definition: filter.c:142

Referenced by acmFilterEnumW().

◆ MSACM_FilterTagEnumCallbackWtoA()

static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA ( HACMDRIVERID  hadid,
PACMFILTERTAGDETAILSW  paftdw,
DWORD_PTR  dwInstance,
DWORD  fdwSupport 
)
static

Definition at line 376 of file filter.c.

380 {
381  struct MSACM_FilterTagEnumWtoA_Instance* paftei;
382 
384 
385  paftei->paftda->dwFilterTagIndex = paftdw->dwFilterTagIndex;
386  paftei->paftda->dwFilterTag = paftdw->dwFilterTag;
387  paftei->paftda->cbFilterSize = paftdw->cbFilterSize;
388  paftei->paftda->fdwSupport = paftdw->fdwSupport;
389  paftei->paftda->cStandardFilters = paftdw->cStandardFilters;
390  WideCharToMultiByte( CP_ACP, 0, paftdw->szFilterTag, -1, paftei->paftda->szFilterTag,
391  sizeof(paftei->paftda->szFilterTag), NULL, NULL );
392 
393  return (paftei->fnCallback)(hadid, paftei->paftda,
394  paftei->dwInstance, fdwSupport);
395 }
CHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:416
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
DWORD cStandardFilters
Definition: msacm.h:426
DWORD dwFilterTagIndex
Definition: msacm.h:422
DWORD cStandardFilters
Definition: msacm.h:415
DWORD dwFilterTagIndex
Definition: msacm.h:411
smooth NULL
Definition: ftsmooth.c:416
PACMFILTERTAGDETAILSA paftda
Definition: filter.c:371
ACMFILTERTAGENUMCBA fnCallback
Definition: filter.c:373
WCHAR szFilterTag[ACMFILTERTAGDETAILS_FILTERTAG_CHARS]
Definition: msacm.h:427

Referenced by acmFilterTagEnumA().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msacm  )