[svn] / branches / dev-api-3 / dshow / src / CXvidDecoder.cpp Repository:
ViewVC logotype

Annotation of /branches/dev-api-3/dshow/src/CXvidDecoder.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 613 - (view) (download)

1 : Isibaar 6 /*
2 :     this requires the directx sdk
3 :     place these paths at the top of the Tools|Options|Directories list
4 :    
5 :     headers:
6 :     C:\DXVCSDK\include
7 :     C:\DXVCSDK\samples\Multimedia\DirectShow\BaseClasses
8 :    
9 :     libraries (optional):
10 :     C:\DXVCSDK\samples\Multimedia\DirectShow\BaseClasses\Release
11 :     */
12 :    
13 :     #include <windows.h>
14 :    
15 :     #include <streams.h>
16 :     #include <initguid.h>
17 :     #include <olectl.h>
18 :     #if (1100 > _MSC_VER)
19 :     #include <olectlid.h>
20 :     #endif
21 :     #include <dvdmedia.h> // VIDEOINFOHEADER2
22 :    
23 : Isibaar 380 #include <xvid.h> // XviD API
24 :    
25 : Isibaar 6 #include "IXvidDecoder.h"
26 :     #include "CXvidDecoder.h"
27 :     #include "CAbout.h"
28 :    
29 :    
30 :    
31 :     const AMOVIESETUP_MEDIATYPE sudInputPinTypes[] =
32 :     {
33 :     { &MEDIATYPE_Video, &CLSID_XVID },
34 :     { &MEDIATYPE_Video, &CLSID_XVID_UC },
35 :     { &MEDIATYPE_Video, &CLSID_DIVX },
36 :     { &MEDIATYPE_Video, &CLSID_DIVX_UC }
37 :     };
38 :    
39 :     const AMOVIESETUP_MEDIATYPE sudOutputPinTypes[] =
40 :     {
41 :     { &MEDIATYPE_Video, &MEDIASUBTYPE_NULL }
42 :     };
43 :    
44 :    
45 :     const AMOVIESETUP_PIN psudPins[] =
46 :     {
47 :     {
48 :     L"Input", // String pin name
49 :     FALSE, // Is it rendered
50 :     FALSE, // Is it an output
51 :     FALSE, // Allowed none
52 :     FALSE, // Allowed many
53 :     &CLSID_NULL, // Connects to filter
54 :     L"Output", // Connects to pin
55 :     sizeof(sudInputPinTypes) / sizeof(AMOVIESETUP_MEDIATYPE), // Number of types
56 :     &sudInputPinTypes[0] // The pin details
57 :     },
58 :     {
59 :     L"Output", // String pin name
60 :     FALSE, // Is it rendered
61 :     TRUE, // Is it an output
62 :     FALSE, // Allowed none
63 :     FALSE, // Allowed many
64 :     &CLSID_NULL, // Connects to filter
65 :     L"Input", // Connects to pin
66 :     sizeof(sudOutputPinTypes) / sizeof(AMOVIESETUP_MEDIATYPE), // Number of types
67 :     sudOutputPinTypes // The pin details
68 :     }
69 :     };
70 :    
71 :    
72 :     const AMOVIESETUP_FILTER sudXvidDecoder =
73 :     {
74 :     &CLSID_XVID, // Filter CLSID
75 :     XVID_NAME_L, // Filter name
76 :     MERIT_PREFERRED, // Its merit
77 :     sizeof(psudPins) / sizeof(AMOVIESETUP_PIN), // Number of pins
78 :     psudPins // Pin details
79 :     };
80 :    
81 :    
82 :     // List of class IDs and creator functions for the class factory. This
83 :     // provides the link between the OLE entry point in the DLL and an object
84 :     // being created. The class factory will call the static CreateInstance
85 :    
86 :     CFactoryTemplate g_Templates[] =
87 :     {
88 :     {
89 :     XVID_NAME_L,
90 :     &CLSID_XVID,
91 :     CXvidDecoder::CreateInstance,
92 :     NULL,
93 :     &sudXvidDecoder
94 :     },
95 :     {
96 :     XVID_NAME_L L"About",
97 :     &CLSID_CABOUT,
98 :     CAbout::CreateInstance
99 :     }
100 :    
101 :     };
102 :    
103 :     int g_cTemplates = sizeof(g_Templates) / sizeof(CFactoryTemplate);
104 :    
105 :    
106 :    
107 :    
108 :     STDAPI DllRegisterServer()
109 :     {
110 :     return AMovieDllRegisterServer2( TRUE );
111 :     }
112 :    
113 :    
114 :     STDAPI DllUnregisterServer()
115 :     {
116 :     return AMovieDllRegisterServer2( FALSE );
117 :     }
118 :    
119 :    
120 :     /* create instance */
121 :    
122 :     CUnknown * WINAPI CXvidDecoder::CreateInstance(LPUNKNOWN punk, HRESULT *phr)
123 :     {
124 :     CXvidDecoder * pNewObject = new CXvidDecoder(punk, phr);
125 :     if (pNewObject == NULL)
126 :     {
127 :     *phr = E_OUTOFMEMORY;
128 :     }
129 :     return pNewObject;
130 :     }
131 :    
132 :    
133 :     /* query interfaces */
134 :    
135 :     STDMETHODIMP CXvidDecoder::NonDelegatingQueryInterface(REFIID riid, void **ppv)
136 :     {
137 :     CheckPointer(ppv, E_POINTER);
138 :    
139 :     if (riid == IID_IXvidDecoder)
140 :     {
141 :     return GetInterface((IXvidDecoder *) this, ppv);
142 :     }
143 :    
144 :     if (riid == IID_ISpecifyPropertyPages)
145 :     {
146 :     return GetInterface((ISpecifyPropertyPages *) this, ppv);
147 :     }
148 :    
149 :     return CVideoTransformFilter::NonDelegatingQueryInterface(riid, ppv);
150 :     }
151 :    
152 :    
153 :    
154 :     /* dummy decore() */
155 :    
156 :     static int dummy_xvid_decore(void * handle, int opt, void * param1, void * param2)
157 :     {
158 :     return XVID_ERR_FAIL;
159 :     }
160 :    
161 :    
162 :    
163 :     /* constructor */
164 :    
165 :     #define XVID_DLL_NAME "xvid.dll"
166 :     #define XVID_INIT_NAME "xvid_init"
167 :     #define XVID_DECORE_NAME "xvid_decore"
168 :    
169 :     CXvidDecoder::CXvidDecoder(LPUNKNOWN punk, HRESULT *phr) :
170 :     CVideoTransformFilter(NAME("CXvidDecoder"), punk, CLSID_XVID)
171 :     {
172 :     DEBUG("Constructor");
173 :    
174 :     ASSERT(phr);
175 :    
176 :     m_xvid_decore = dummy_xvid_decore;
177 :    
178 :     m_hdll = LoadLibrary(XVID_DLL_NAME);
179 :     if (m_hdll == NULL) {
180 :     DEBUG("dll load failed");
181 :     MessageBox(0, XVID_DLL_NAME " not found","Error", 0);
182 :     return;
183 :     }
184 :    
185 :     m_xvid_init = (int (__cdecl *)(void *, int, void *, void *))GetProcAddress(m_hdll, XVID_INIT_NAME);
186 :     if (m_xvid_init == NULL) {
187 :     MessageBox(0, XVID_INIT_NAME "() not found", "Error", 0);
188 :     return;
189 :     }
190 :    
191 :     m_xvid_decore = (int (__cdecl *)(void *, int, void *, void *))GetProcAddress(m_hdll, XVID_DECORE_NAME);
192 :     if (m_xvid_decore == NULL) {
193 :     MessageBox(0, XVID_DECORE_NAME "() not found", "Error", 0);
194 :     return;
195 :     }
196 :    
197 :     XVID_INIT_PARAM init;
198 :    
199 :     init.cpu_flags = 0;
200 :     if (m_xvid_init(0, 0, &init, 0) != XVID_ERR_OK)
201 :     {
202 :     MessageBox(0, XVID_INIT_NAME "() failed", "Error", 0);
203 :     return;
204 :     }
205 :    
206 :     if (init.api_version < API_VERSION)
207 :     {
208 :     MessageBox(0, XVID_DLL_NAME " implements an older api version; update your " XVID_DLL_NAME, "Warning", 0);
209 :     }
210 :     else if (init.api_version > API_VERSION)
211 :     {
212 :     MessageBox(0, XVID_DLL_NAME " implements a newer api version; update your directshow filter", "Error", 0);
213 :     return;
214 :     }
215 :    
216 :     m_param.handle = NULL;
217 :     }
218 :    
219 :    
220 :    
221 :     /* destructor */
222 :    
223 :     CXvidDecoder::~CXvidDecoder()
224 :     {
225 :     DEBUG("Destructor");
226 :    
227 :     if (m_param.handle != NULL)
228 :     {
229 :     m_xvid_decore(m_param.handle, XVID_DEC_DESTROY, 0, 0);
230 :     m_param.handle = NULL;
231 :     }
232 :    
233 :     if (m_hdll != NULL)
234 :     {
235 :     FreeLibrary(m_hdll);
236 :     m_hdll = NULL;
237 :     }
238 :     }
239 :    
240 :    
241 :    
242 :     /* check input type */
243 :    
244 :     HRESULT CXvidDecoder::CheckInputType(const CMediaType * mtIn)
245 :     {
246 :     DEBUG("CheckInputType");
247 :     BITMAPINFOHEADER * hdr;
248 :    
249 :     if (*mtIn->Type() != MEDIATYPE_Video)
250 :     {
251 :     return VFW_E_TYPE_NOT_ACCEPTED;
252 :     }
253 :    
254 :     if (*mtIn->FormatType() == FORMAT_VideoInfo)
255 :     {
256 :     VIDEOINFOHEADER * vih = (VIDEOINFOHEADER *) mtIn->Format();
257 :     hdr = &vih->bmiHeader;
258 :     }
259 :     else if (*mtIn->FormatType() == FORMAT_VideoInfo2)
260 :     {
261 :     VIDEOINFOHEADER2 * vih2 = (VIDEOINFOHEADER2 *) mtIn->Format();
262 :     hdr = &vih2->bmiHeader;
263 :     }
264 :     else
265 :     {
266 :     return VFW_E_TYPE_NOT_ACCEPTED;
267 :     }
268 :    
269 :     if (hdr->biHeight < 0)
270 :     {
271 :     DEBUG("colorspace: inverted input format not supported");
272 :     }
273 :    
274 :     m_param.width = hdr->biWidth;
275 :     m_param.height = hdr->biHeight;
276 :    
277 :     switch(hdr->biCompression)
278 :     {
279 :     case FOURCC_XVID :
280 :     // case FOURCC_DIVX :
281 :     break;
282 :    
283 :     default :
284 :     return VFW_E_TYPE_NOT_ACCEPTED;
285 :     }
286 :    
287 :     return S_OK;
288 :     }
289 :    
290 :    
291 :     /* get list of supported output colorspaces */
292 :    
293 : suxen_drol 613 #define ENABLE_IYUV
294 :     #define ENABLE_YV12
295 :     #define ENABLE_YUY2
296 :     #define ENABLE_UYVY
297 :     #define ENABLE_YVYU
298 :     #define ENABLE_RGB32
299 :     #define ENABLE_RGB24
300 :     #define ENABLE_RGB565
301 :     #define ENABLE_RGB555
302 :    
303 : Isibaar 6 HRESULT CXvidDecoder::GetMediaType(int iPosition, CMediaType *mtOut)
304 :     {
305 :     DEBUG("GetMediaType");
306 :    
307 :     if (m_pInput->IsConnected() == FALSE)
308 :     {
309 :     return E_UNEXPECTED;
310 :     }
311 :    
312 :     VIDEOINFOHEADER * vih = (VIDEOINFOHEADER *) mtOut->ReallocFormatBuffer(sizeof(VIDEOINFOHEADER));
313 :     if (vih == NULL)
314 :     {
315 :     return E_OUTOFMEMORY;
316 :     }
317 :    
318 :     ZeroMemory(vih, sizeof (VIDEOINFOHEADER));
319 :     vih->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
320 :     vih->bmiHeader.biWidth = m_param.width;
321 :     vih->bmiHeader.biHeight = m_param.height;
322 :     vih->bmiHeader.biPlanes = 1;
323 :    
324 :     if (iPosition < 0)
325 :     {
326 :     return E_INVALIDARG;
327 :     }
328 :    
329 :     switch(iPosition)
330 :     {
331 : suxen_drol 613 case 0 :
332 :     #ifdef ENABLE_IYUV
333 :     vih->bmiHeader.biCompression = MEDIASUBTYPE_IYUV.Data1;
334 :     vih->bmiHeader.biBitCount = 12;
335 :     mtOut->SetSubtype(&MEDIASUBTYPE_IYUV);
336 :     break;
337 :     #endif
338 :    
339 :     case 1:
340 :     #ifdef ENABLE_YV12
341 : Isibaar 6 vih->bmiHeader.biCompression = MEDIASUBTYPE_YV12.Data1;
342 :     vih->bmiHeader.biBitCount = 12;
343 :     mtOut->SetSubtype(&MEDIASUBTYPE_YV12);
344 :     break;
345 : suxen_drol 613 #endif
346 : Isibaar 6
347 : suxen_drol 613 case 2:
348 :     #ifdef ENABLE_YUY2
349 : Isibaar 6 vih->bmiHeader.biCompression = MEDIASUBTYPE_YUY2.Data1;
350 :     vih->bmiHeader.biBitCount = 16;
351 :     mtOut->SetSubtype(&MEDIASUBTYPE_YUY2);
352 :     break;
353 : suxen_drol 613 #endif
354 : Isibaar 6
355 : suxen_drol 613 case 3:
356 :     #ifdef ENABLE_YVYU
357 : Isibaar 6 vih->bmiHeader.biCompression = MEDIASUBTYPE_YVYU.Data1;
358 :     vih->bmiHeader.biBitCount = 16;
359 :     mtOut->SetSubtype(&MEDIASUBTYPE_YVYU);
360 :     break;
361 : suxen_drol 613 #endif
362 : Isibaar 6
363 : suxen_drol 613 case 4:
364 :     #ifdef ENABLE_UYVY
365 : Isibaar 6 vih->bmiHeader.biCompression = MEDIASUBTYPE_UYVY.Data1;
366 :     vih->bmiHeader.biBitCount = 16;
367 :     mtOut->SetSubtype(&MEDIASUBTYPE_UYVY);
368 :     break;
369 : suxen_drol 613 #endif
370 : Isibaar 6
371 : suxen_drol 613 case 5:
372 :     #ifdef ENABLE_RGB32
373 : Isibaar 6 vih->bmiHeader.biCompression = BI_RGB;
374 :     vih->bmiHeader.biBitCount = 32;
375 :     mtOut->SetSubtype(&MEDIASUBTYPE_RGB32);
376 :     break;
377 : suxen_drol 613 #endif
378 : Isibaar 6
379 : suxen_drol 613 case 6:
380 :     #ifdef ENABLE_RGB24
381 : Isibaar 6 vih->bmiHeader.biCompression = BI_RGB;
382 :     vih->bmiHeader.biBitCount = 24;
383 :     mtOut->SetSubtype(&MEDIASUBTYPE_RGB24);
384 :     break;
385 : suxen_drol 613 #endif
386 : Isibaar 6
387 : suxen_drol 613 case 7:
388 :     #ifdef ENABLE_RGB555
389 : Isibaar 6 vih->bmiHeader.biCompression = BI_RGB;
390 :     vih->bmiHeader.biBitCount = 16;
391 :     mtOut->SetSubtype(&MEDIASUBTYPE_RGB555);
392 :     break;
393 : suxen_drol 613 #endif
394 : Isibaar 6
395 : suxen_drol 613 case 8:
396 :     #ifdef ENABLE_RGB565
397 : Isibaar 6 vih->bmiHeader.biCompression = BI_RGB;
398 :     vih->bmiHeader.biBitCount = 16;
399 :     mtOut->SetSubtype(&MEDIASUBTYPE_RGB565);
400 :     break;
401 : suxen_drol 613 #endif
402 :    
403 : Isibaar 6 default :
404 :     return VFW_S_NO_MORE_ITEMS;
405 :     }
406 :    
407 :     vih->bmiHeader.biSizeImage = GetBitmapSize(&vih->bmiHeader);
408 :    
409 :     mtOut->SetType(&MEDIATYPE_Video);
410 :     mtOut->SetFormatType(&FORMAT_VideoInfo);
411 :     mtOut->SetTemporalCompression(FALSE);
412 :     mtOut->SetSampleSize(vih->bmiHeader.biSizeImage);
413 :    
414 :     return S_OK;
415 :     }
416 :    
417 :    
418 :     /* (internal function) change colorspace */
419 :    
420 :     HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format)
421 :     {
422 : suxen_drol 613 if (subtype == MEDIASUBTYPE_IYUV)
423 : Isibaar 6 {
424 : suxen_drol 613 DEBUG("IYUV");
425 :     m_frame.colorspace = XVID_CSP_I420;
426 :     }
427 :     else if (subtype == MEDIASUBTYPE_YV12)
428 :     {
429 : Isibaar 6 DEBUG("YV12");
430 :     m_frame.colorspace = XVID_CSP_YV12;
431 :     }
432 :     else if (subtype == MEDIASUBTYPE_YUY2)
433 :     {
434 :     DEBUG("YUY2");
435 :     m_frame.colorspace = XVID_CSP_YUY2;
436 :     }
437 :     else if (subtype == MEDIASUBTYPE_YVYU)
438 :     {
439 :     DEBUG("YVYU");
440 :     m_frame.colorspace = XVID_CSP_YVYU;
441 :     }
442 :     else if (subtype == MEDIASUBTYPE_UYVY)
443 :     {
444 :     DEBUG("UYVY");
445 :     m_frame.colorspace = XVID_CSP_UYVY;
446 :     }
447 :     else if (subtype == MEDIASUBTYPE_RGB32)
448 :     {
449 :     DEBUG("RGB32");
450 :     m_frame.colorspace = XVID_CSP_VFLIP | XVID_CSP_RGB32;
451 :     }
452 :     else if (subtype == MEDIASUBTYPE_RGB24)
453 :     {
454 :     DEBUG("RGB24");
455 :     m_frame.colorspace = XVID_CSP_VFLIP | XVID_CSP_RGB24;
456 :     }
457 :     else if (subtype == MEDIASUBTYPE_RGB555)
458 :     {
459 :     DEBUG("RGB555");
460 :     m_frame.colorspace = XVID_CSP_VFLIP | XVID_CSP_RGB555;
461 :     }
462 :     else if (subtype == MEDIASUBTYPE_RGB565)
463 :     {
464 :     DEBUG("RGB565");
465 :     m_frame.colorspace = XVID_CSP_VFLIP | XVID_CSP_RGB565;
466 :     }
467 :     else if (subtype == GUID_NULL)
468 :     {
469 :     m_frame.colorspace = XVID_CSP_NULL;
470 :     }
471 :     else
472 :     {
473 :     return S_FALSE;
474 :     }
475 :    
476 :    
477 :     if (formattype == FORMAT_VideoInfo)
478 :     {
479 :     VIDEOINFOHEADER * vih = (VIDEOINFOHEADER * )format;
480 :     m_frame.stride = vih->bmiHeader.biWidth;
481 : suxen_drol 613 // dev-api-3: m_frame.stride = (((vih->bmiHeader.biWidth * vih->bmiHeader.biBitCount) + 31) & ~31) >> 3;
482 : Isibaar 6 }
483 :     else if (formattype == FORMAT_VideoInfo2)
484 :     {
485 :     VIDEOINFOHEADER2 * vih2 = (VIDEOINFOHEADER2 * )format;
486 :     m_frame.stride = vih2->bmiHeader.biWidth;
487 : suxen_drol 613 // dev-api-3: m_frame.stride = (((vih2->bmiHeader.biWidth * vih2->bmiHeader.biBitCount) + 31) & ~31) >> 3;
488 : Isibaar 6 }
489 :     else
490 :     {
491 :     return S_FALSE;
492 :     }
493 :    
494 :     return S_OK;
495 :    
496 :     }
497 :    
498 :    
499 :     /* set output colorspace */
500 :    
501 :     HRESULT CXvidDecoder::SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt)
502 :     {
503 :     DEBUG("SetMediaType");
504 :    
505 :     if (direction == PINDIR_OUTPUT)
506 :     {
507 :     return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format());
508 :     }
509 :    
510 :     return S_OK;
511 :     }
512 :    
513 :    
514 :     /* check input<->output compatiblity */
515 :    
516 :     HRESULT CXvidDecoder::CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut)
517 :     {
518 :     DEBUG("CheckTransform");
519 :     return S_OK;
520 :     }
521 :    
522 :    
523 :     /* alloc output buffer */
524 :    
525 :     HRESULT CXvidDecoder::DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
526 :     {
527 :     DEBUG("DecideBufferSize");
528 :     HRESULT result;
529 :     ALLOCATOR_PROPERTIES ppropActual;
530 :    
531 :     if (m_pInput->IsConnected() == FALSE)
532 :     {
533 :     return E_UNEXPECTED;
534 :     }
535 :    
536 :     ppropInputRequest->cBuffers = 1;
537 :     ppropInputRequest->cbBuffer = m_param.width * m_param.height * 4;
538 :     // cbAlign causes problems with the resize filter */
539 :     // ppropInputRequest->cbAlign = 16;
540 :     ppropInputRequest->cbPrefix = 0;
541 :    
542 :     result = pAlloc->SetProperties(ppropInputRequest, &ppropActual);
543 :     if (result != S_OK)
544 :     {
545 :     return result;
546 :     }
547 :    
548 :     if (ppropActual.cbBuffer < ppropInputRequest->cbBuffer)
549 :     {
550 :     return E_FAIL;
551 :     }
552 :    
553 :     return S_OK;
554 :     }
555 :    
556 :    
557 :    
558 :     /* decode frame */
559 :    
560 :     HRESULT CXvidDecoder::Transform(IMediaSample *pIn, IMediaSample *pOut)
561 :     {
562 :     DEBUG("Transform");
563 :    
564 :     if (m_param.handle == NULL)
565 :     {
566 :     if (m_xvid_decore(0, XVID_DEC_CREATE, &m_param, 0) != XVID_ERR_OK)
567 :     {
568 :     return S_FALSE;
569 :     }
570 :     }
571 :    
572 :     AM_MEDIA_TYPE * mtOut;
573 :     pOut->GetMediaType(&mtOut);
574 :     if (mtOut != NULL)
575 :     {
576 :     HRESULT result;
577 :    
578 :     result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat);
579 :     DeleteMediaType(mtOut);
580 :    
581 :     if (result != S_OK)
582 :     {
583 :     return result;
584 :     }
585 :     }
586 :    
587 :     if (pIn->GetPointer((BYTE**)&m_frame.bitstream) != S_OK)
588 :     {
589 :     return S_FALSE;
590 :     }
591 :    
592 :     if (pOut->GetPointer((BYTE**)&m_frame.image) != S_OK)
593 :     {
594 :     return S_FALSE;
595 :     }
596 :    
597 :     m_frame.length = pIn->GetSize();
598 :    
599 :     if (pIn->IsPreroll() != S_OK)
600 :     {
601 :     if (m_xvid_decore(m_param.handle, XVID_DEC_DECODE, &m_frame, 0) != XVID_ERR_OK)
602 :     {
603 :     return S_FALSE;
604 :     }
605 :     }
606 :     else
607 :     {
608 :     int tmp = m_frame.colorspace;
609 :     m_frame.colorspace = XVID_CSP_NULL;
610 :    
611 :     if (m_xvid_decore(m_param.handle, XVID_DEC_DECODE, &m_frame, 0) != XVID_ERR_OK)
612 :     {
613 :     return S_FALSE;
614 :     }
615 :    
616 :     m_frame.colorspace = tmp;
617 :    
618 :     }
619 :    
620 :     return S_OK;
621 :     }
622 :    
623 :    
624 :     /* get property page list */
625 :    
626 :     STDMETHODIMP CXvidDecoder::GetPages(CAUUID * pPages)
627 :     {
628 :     DEBUG("GetPages");
629 :    
630 :     pPages->cElems = 1;
631 :     pPages->pElems = (GUID *)CoTaskMemAlloc(pPages->cElems * sizeof(GUID));
632 :     if (pPages->pElems == NULL)
633 :     {
634 :     return E_OUTOFMEMORY;
635 :     }
636 :     pPages->pElems[0] = CLSID_CABOUT;
637 :    
638 :     return S_OK;
639 :     }
640 :    
641 :    
642 :     /* cleanup pages */
643 :    
644 :     STDMETHODIMP CXvidDecoder::FreePages(CAUUID * pPages)
645 :     {
646 :     DEBUG("FreePages");
647 :     CoTaskMemFree(pPages->pElems);
648 :     return S_OK;
649 :     }

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4