Implemented CLSID_AudioRender.
[wine/multimedia.git] / dlls / quartz / ifgraph.c
blobae807475cebf2148fb57fe6ab569ee9273affccb
1 /*
2 * Implementation of IFilterGraph.
4 * FIXME - create a thread to process some methods correctly.
6 * FIXME - ReconnectEx
7 * FIXME - process Pause/Stop asynchronously and notify when completed.
10 * hidenori@a2.ctktv.ne.jp
13 #include "config.h"
15 #include "windef.h"
16 #include "winbase.h"
17 #include "wingdi.h"
18 #include "winuser.h"
19 #include "winerror.h"
20 #include "wine/obj_base.h"
21 #include "wine/obj_oleaut.h"
22 #include "strmif.h"
23 #include "control.h"
24 #include "uuids.h"
25 #include "vfwmsgs.h"
26 #include "wine/unicode.h"
27 #include "evcode.h"
29 #include "debugtools.h"
30 DEFAULT_DEBUG_CHANNEL(quartz);
32 #include "quartz_private.h"
33 #include "fgraph.h"
34 #include "enumunk.h"
35 #include "sysclock.h"
38 static HRESULT CFilterGraph_DisconnectAllPins( IBaseFilter* pFilter )
40 IEnumPins* pEnum = NULL;
41 IPin* pPin;
42 IPin* pConnTo;
43 ULONG cFetched;
44 HRESULT hr;
46 hr = IBaseFilter_EnumPins( pFilter, &pEnum );
47 if ( FAILED(hr) )
48 return hr;
49 if ( pEnum == NULL )
50 return E_FAIL;
52 while ( 1 )
54 pPin = NULL;
55 cFetched = 0;
56 hr = IEnumPins_Next( pEnum, 1, &pPin, &cFetched );
57 if ( FAILED(hr) )
58 break;
59 if ( hr != NOERROR || pPin == NULL || cFetched != 1 )
61 hr = NOERROR;
62 break;
65 pConnTo = NULL;
66 hr = IPin_ConnectedTo(pPin,&pConnTo);
67 if ( hr == NOERROR && pConnTo != NULL )
69 IPin_Disconnect(pPin);
70 IPin_Disconnect(pConnTo);
71 IPin_Release(pConnTo);
74 IPin_Release( pPin );
77 IEnumPins_Release( pEnum );
79 return hr;
83 static HRESULT CFilterGraph_GraphChanged( CFilterGraph* This )
85 /* IDistributorNotify_NotifyGraphChange() */
87 IMediaEventSink_Notify(CFilterGraph_IMediaEventSink(This),
88 EC_GRAPH_CHANGED, 0, 0);
89 EnterCriticalSection( &This->m_csGraphVersion );
90 This->m_lGraphVersion ++;
91 LeaveCriticalSection( &This->m_csGraphVersion );
93 return NOERROR;
97 /****************************************************************************/
99 static HRESULT WINAPI
100 IFilterGraph2_fnQueryInterface(IFilterGraph2* iface,REFIID riid,void** ppobj)
102 CFilterGraph_THIS(iface,fgraph);
104 TRACE("(%p)->()\n",This);
106 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
109 static ULONG WINAPI
110 IFilterGraph2_fnAddRef(IFilterGraph2* iface)
112 CFilterGraph_THIS(iface,fgraph);
114 TRACE("(%p)->()\n",This);
116 return IUnknown_AddRef(This->unk.punkControl);
119 static ULONG WINAPI
120 IFilterGraph2_fnRelease(IFilterGraph2* iface)
122 CFilterGraph_THIS(iface,fgraph);
124 TRACE("(%p)->()\n",This);
126 return IUnknown_Release(This->unk.punkControl);
129 static HRESULT WINAPI
130 IFilterGraph2_fnAddFilter(IFilterGraph2* iface,IBaseFilter* pFilter, LPCWSTR pName)
132 CFilterGraph_THIS(iface,fgraph);
133 FILTER_STATE fs;
134 FILTER_INFO info;
135 HRESULT hr;
136 HRESULT hrSucceeded = S_OK;
137 QUARTZ_CompListItem* pItem;
138 int i,iLen;
140 TRACE( "(%p)->(%p,%s)\n",This,pFilter,debugstr_w(pName) );
142 QUARTZ_CompList_Lock( This->m_pFilterList );
144 hr = IMediaFilter_GetState(CFilterGraph_IMediaFilter(This),0,&fs);
145 if ( hr == VFW_S_STATE_INTERMEDIATE )
146 hr = VFW_E_STATE_CHANGED;
147 if ( fs != State_Stopped )
148 hr = VFW_E_NOT_STOPPED;
149 if ( FAILED(hr) )
150 goto end;
152 TRACE( "(%p) search the specified name.\n",This );
154 if ( pName != NULL )
156 pItem = QUARTZ_CompList_SearchData(
157 This->m_pFilterList,
158 pName, sizeof(WCHAR)*(strlenW(pName)+1) );
159 if ( pItem == NULL )
160 goto name_ok;
162 hrSucceeded = VFW_S_DUPLICATE_NAME;
164 iLen = strlenW(pName);
165 if ( iLen > 32 )
166 iLen = 32;
167 memcpy( info.achName, pName, sizeof(WCHAR)*iLen );
168 info.achName[iLen] = 0;
170 else
172 ZeroMemory( &info, sizeof(info) );
173 hr = IBaseFilter_QueryFilterInfo( pFilter, &info );
174 if ( FAILED(hr) )
175 goto end;
177 iLen = strlenW(info.achName);
178 pItem = QUARTZ_CompList_SearchData(
179 This->m_pFilterList,
180 info.achName, sizeof(WCHAR)*(iLen+1) );
181 if ( pItem == NULL )
183 pName = info.achName;
184 goto name_ok;
188 /* generate modified names for this filter.. */
189 iLen = strlenW(info.achName);
190 if ( iLen > 32 )
191 iLen = 32;
192 info.achName[iLen++] = ' ';
194 for ( i = 0; i <= 99; i++ )
196 info.achName[iLen+0] = (i%10) + '0';
197 info.achName[iLen+1] = ((i/10)%10) + '0';
198 info.achName[iLen+2] = 0;
199 pItem = QUARTZ_CompList_SearchData(
200 This->m_pFilterList,
201 info.achName, sizeof(WCHAR)*(iLen+3) );
202 if ( pItem == NULL )
204 pName = info.achName;
205 goto name_ok;
209 hr = ( pName == NULL ) ? E_FAIL : VFW_E_DUPLICATE_NAME;
210 goto end;
212 name_ok:
213 TRACE( "(%p) add this filter.\n",This );
215 /* register this filter. */
216 hr = QUARTZ_CompList_AddComp(
217 This->m_pFilterList, (IUnknown*)pFilter,
218 pName, sizeof(WCHAR)*(strlenW(pName)+1) );
219 if ( FAILED(hr) )
220 goto end;
222 hr = IBaseFilter_JoinFilterGraph(pFilter,(IFilterGraph*)iface,pName);
223 if ( SUCCEEDED(hr) )
225 EnterCriticalSection( &This->m_csClock );
226 hr = IBaseFilter_SetSyncSource( pFilter, This->m_pClock );
227 LeaveCriticalSection( &This->m_csClock );
229 if ( FAILED(hr) )
231 IBaseFilter_JoinFilterGraph(pFilter,NULL,pName);
232 QUARTZ_CompList_RemoveComp(
233 This->m_pFilterList,(IUnknown*)pFilter);
234 goto end;
237 hr = CFilterGraph_GraphChanged(This);
238 if ( FAILED(hr) )
239 goto end;
241 hr = hrSucceeded;
242 end:
243 QUARTZ_CompList_Unlock( This->m_pFilterList );
245 TRACE( "(%p) return %08lx\n", This, hr );
247 return hr;
250 static HRESULT WINAPI
251 IFilterGraph2_fnRemoveFilter(IFilterGraph2* iface,IBaseFilter* pFilter)
253 CFilterGraph_THIS(iface,fgraph);
254 QUARTZ_CompListItem* pItem;
255 FILTER_STATE fs;
256 HRESULT hr = NOERROR;
258 TRACE( "(%p)->(%p)\n",This,pFilter );
260 QUARTZ_CompList_Lock( This->m_pFilterList );
262 hr = IMediaFilter_GetState(CFilterGraph_IMediaFilter(This),0,&fs);
263 if ( hr == VFW_S_STATE_INTERMEDIATE )
264 hr = VFW_E_STATE_CHANGED;
265 if ( fs != State_Stopped )
266 hr = VFW_E_NOT_STOPPED;
267 if ( FAILED(hr) )
268 goto end;
270 hr = S_FALSE; /* FIXME? */
271 pItem = QUARTZ_CompList_SearchComp(
272 This->m_pFilterList, (IUnknown*)pFilter );
273 if ( pItem != NULL )
275 CFilterGraph_DisconnectAllPins(pFilter);
276 IBaseFilter_SetSyncSource( pFilter, NULL );
277 hr = IBaseFilter_JoinFilterGraph(
278 pFilter, NULL, QUARTZ_CompList_GetDataPtr(pItem) );
279 QUARTZ_CompList_RemoveComp(
280 This->m_pFilterList, (IUnknown*)pFilter );
283 hr = CFilterGraph_GraphChanged(This);
284 if ( FAILED(hr) )
285 goto end;
287 end:;
288 QUARTZ_CompList_Unlock( This->m_pFilterList );
290 return hr;
293 static HRESULT WINAPI
294 IFilterGraph2_fnEnumFilters(IFilterGraph2* iface,IEnumFilters** ppEnum)
296 CFilterGraph_THIS(iface,fgraph);
297 HRESULT hr;
299 TRACE( "(%p)->(%p)\n",This,ppEnum );
301 QUARTZ_CompList_Lock( This->m_pFilterList );
303 hr = QUARTZ_CreateEnumUnknown(
304 &IID_IEnumFilters, (void**)ppEnum, This->m_pFilterList );
306 QUARTZ_CompList_Unlock( This->m_pFilterList );
308 return hr;
311 static HRESULT WINAPI
312 IFilterGraph2_fnFindFilterByName(IFilterGraph2* iface,LPCWSTR pName,IBaseFilter** ppFilter)
314 CFilterGraph_THIS(iface,fgraph);
315 QUARTZ_CompListItem* pItem;
316 HRESULT hr = E_FAIL;
318 TRACE( "(%p)->(%s,%p)\n",This,debugstr_w(pName),ppFilter );
320 if ( ppFilter == NULL )
321 return E_POINTER;
322 *ppFilter = NULL;
324 QUARTZ_CompList_Lock( This->m_pFilterList );
326 pItem = QUARTZ_CompList_SearchData(
327 This->m_pFilterList,
328 pName, sizeof(WCHAR)*(strlenW(pName)+1) );
329 if ( pItem != NULL )
331 *ppFilter = (IBaseFilter*)QUARTZ_CompList_GetItemPtr(pItem);
332 hr = NOERROR;
335 QUARTZ_CompList_Unlock( This->m_pFilterList );
337 return hr;
340 static HRESULT WINAPI
341 IFilterGraph2_fnConnectDirect(IFilterGraph2* iface,IPin* pOut,IPin* pIn,const AM_MEDIA_TYPE* pmt)
343 CFilterGraph_THIS(iface,fgraph);
344 IPin* pConnTo;
345 PIN_INFO infoIn;
346 PIN_INFO infoOut;
347 FILTER_INFO finfoIn;
348 FILTER_INFO finfoOut;
349 HRESULT hr;
351 TRACE( "(%p)->(%p,%p,%p)\n",This,pOut,pIn,pmt );
353 infoIn.pFilter = NULL;
354 infoOut.pFilter = NULL;
355 finfoIn.pGraph = NULL;
356 finfoOut.pGraph = NULL;
358 QUARTZ_CompList_Lock( This->m_pFilterList );
360 hr = IPin_QueryPinInfo(pIn,&infoIn);
361 if ( FAILED(hr) )
362 goto end;
363 hr = IPin_QueryPinInfo(pOut,&infoOut);
364 if ( FAILED(hr) )
365 goto end;
366 if ( infoIn.pFilter == NULL || infoOut.pFilter == NULL ||
367 infoIn.dir != PINDIR_INPUT || infoOut.dir != PINDIR_OUTPUT )
369 hr = E_FAIL;
370 goto end;
373 hr = IBaseFilter_QueryFilterInfo(infoIn.pFilter,&finfoIn);
374 if ( FAILED(hr) )
375 goto end;
376 hr = IBaseFilter_QueryFilterInfo(infoOut.pFilter,&finfoOut);
377 if ( FAILED(hr) )
378 goto end;
379 if ( finfoIn.pGraph != ((IFilterGraph*)iface) ||
380 finfoOut.pGraph != ((IFilterGraph*)iface) )
382 hr = E_FAIL;
383 goto end;
386 pConnTo = NULL;
387 hr = IPin_ConnectedTo(pIn,&pConnTo);
388 if ( hr == NOERROR && pConnTo != NULL )
390 IPin_Release(pConnTo);
391 hr = VFW_E_ALREADY_CONNECTED;
392 goto end;
395 pConnTo = NULL;
396 hr = IPin_ConnectedTo(pOut,&pConnTo);
397 if ( hr == NOERROR && pConnTo != NULL )
399 IPin_Release(pConnTo);
400 hr = VFW_E_ALREADY_CONNECTED;
401 goto end;
404 TRACE("(%p) try to connect %p<->%p\n",This,pIn,pOut);
405 hr = IPin_Connect(pOut,pIn,pmt);
406 if ( FAILED(hr) )
408 TRACE("(%p)->Connect(%p,%p) hr = %08lx\n",pOut,pIn,pmt,hr);
409 IPin_Disconnect(pOut);
410 IPin_Disconnect(pIn);
411 goto end;
414 hr = CFilterGraph_GraphChanged(This);
415 if ( FAILED(hr) )
416 goto end;
418 end:
419 QUARTZ_CompList_Unlock( This->m_pFilterList );
421 if ( infoIn.pFilter != NULL )
422 IBaseFilter_Release(infoIn.pFilter);
423 if ( infoOut.pFilter != NULL )
424 IBaseFilter_Release(infoOut.pFilter);
425 if ( finfoIn.pGraph != NULL )
426 IFilterGraph_Release(finfoIn.pGraph);
427 if ( finfoOut.pGraph != NULL )
428 IFilterGraph_Release(finfoOut.pGraph);
430 return hr;
433 static HRESULT WINAPI
434 IFilterGraph2_fnReconnect(IFilterGraph2* iface,IPin* pPin)
436 CFilterGraph_THIS(iface,fgraph);
438 TRACE( "(%p)->(%p)\n",This,pPin );
440 return IFilterGraph2_ReconnectEx(iface,pPin,NULL);
443 static HRESULT WINAPI
444 IFilterGraph2_fnDisconnect(IFilterGraph2* iface,IPin* pPin)
446 CFilterGraph_THIS(iface,fgraph);
447 IPin* pConnTo;
448 HRESULT hr;
450 TRACE( "(%p)->(%p)\n",This,pPin );
452 QUARTZ_CompList_Lock( This->m_pFilterList );
454 pConnTo = NULL;
455 hr = IPin_ConnectedTo(pPin,&pConnTo);
456 if ( hr == NOERROR && pConnTo != NULL )
458 IPin_Disconnect(pConnTo);
459 IPin_Release(pConnTo);
461 hr = IPin_Disconnect(pPin);
462 if ( FAILED(hr) )
463 goto end;
465 hr = CFilterGraph_GraphChanged(This);
466 if ( FAILED(hr) )
467 goto end;
469 end:
470 QUARTZ_CompList_Unlock( This->m_pFilterList );
472 return hr;
475 static HRESULT WINAPI
476 IFilterGraph2_fnSetDefaultSyncSource(IFilterGraph2* iface)
478 CFilterGraph_THIS(iface,fgraph);
479 IUnknown* punk;
480 IReferenceClock* pClock;
481 HRESULT hr;
483 FIXME( "(%p)->() stub!\n", This );
485 /* FIXME - search all filters. */
487 hr = QUARTZ_CreateSystemClock( NULL, (void**)&punk );
488 if ( FAILED(hr) )
489 return hr;
490 hr = IUnknown_QueryInterface( punk, &IID_IReferenceClock, (void**)&pClock ); IUnknown_Release( punk );
491 if ( FAILED(hr) )
492 return hr;
494 hr = IMediaFilter_SetSyncSource(
495 CFilterGraph_IMediaFilter(This), pClock );
496 IReferenceClock_Release( pClock );
498 return hr;
501 static HRESULT WINAPI
502 IFilterGraph2_fnConnect(IFilterGraph2* iface,IPin* pOut,IPin* pIn)
504 CFilterGraph_THIS(iface,fgraph);
505 HRESULT hr;
507 TRACE( "(%p)->(%p,%p)\n",This,pOut,pIn );
509 /* At first, try to connect directly. */
510 hr = IFilterGraph_ConnectDirect(iface,pOut,pIn,NULL);
511 if ( hr == NOERROR )
512 return NOERROR;
514 /* FIXME - try to connect indirectly. */
515 FIXME( "(%p)->(%p,%p) stub!\n",This,pOut,pIn );
518 return E_NOTIMPL;
521 static HRESULT WINAPI
522 IFilterGraph2_fnRender(IFilterGraph2* iface,IPin* pOut)
524 CFilterGraph_THIS(iface,fgraph);
526 FIXME( "(%p)->(%p) stub!\n",This,pOut );
527 return E_NOTIMPL;
530 static HRESULT WINAPI
531 IFilterGraph2_fnRenderFile(IFilterGraph2* iface,LPCWSTR lpFileName,LPCWSTR lpPlayList)
533 CFilterGraph_THIS(iface,fgraph);
534 HRESULT hr;
535 IBaseFilter* pFilter = NULL;
536 IEnumPins* pEnum = NULL;
537 IPin* pPin;
538 ULONG cFetched;
539 PIN_DIRECTION dir;
540 ULONG cTryToRender;
541 ULONG cActRender;
543 TRACE( "(%p)->(%s,%s)\n",This,
544 debugstr_w(lpFileName),debugstr_w(lpPlayList) );
546 if ( lpPlayList != NULL )
547 return E_INVALIDARG;
549 pFilter = NULL;
550 hr = IFilterGraph2_AddSourceFilter(iface,lpFileName,NULL,&pFilter);
551 if ( FAILED(hr) )
552 goto end;
553 if ( pFilter == NULL )
555 hr = E_FAIL;
556 goto end;
558 pEnum = NULL;
559 hr = IBaseFilter_EnumPins( pFilter, &pEnum );
560 if ( FAILED(hr) )
561 goto end;
562 if ( pEnum == NULL )
564 hr = E_FAIL;
565 goto end;
568 cTryToRender = 0;
569 cActRender = 0;
571 while ( 1 )
573 pPin = NULL;
574 cFetched = 0;
575 hr = IEnumPins_Next( pEnum, 1, &pPin, &cFetched );
576 if ( FAILED(hr) )
577 goto end;
578 if ( hr != NOERROR || pPin == NULL || cFetched != 1 )
580 hr = NOERROR;
581 break;
583 hr = IPin_QueryDirection( pPin, &dir );
584 if ( hr == NOERROR && dir == PINDIR_OUTPUT )
586 cTryToRender ++;
587 hr = IFilterGraph2_Render( iface, pPin );
588 if ( hr == NOERROR )
589 cActRender ++;
591 IPin_Release( pPin );
594 if ( hr == NOERROR )
596 if ( cTryToRender > cActRender )
597 hr = VFW_S_PARTIAL_RENDER;
598 if ( cActRender == 0 )
599 hr = E_FAIL;
602 end:
603 if ( pEnum != NULL )
604 IEnumPins_Release( pEnum );
605 if ( pFilter != NULL )
606 IBaseFilter_Release( pFilter );
608 return hr;
611 static HRESULT WINAPI
612 IFilterGraph2_fnAddSourceFilter(IFilterGraph2* iface,LPCWSTR lpFileName,LPCWSTR lpFilterName,IBaseFilter** ppBaseFilter)
614 CFilterGraph_THIS(iface,fgraph);
616 FIXME( "(%p)->(%s,%s,%p) stub!\n",This,
617 debugstr_w(lpFileName),debugstr_w(lpFilterName),ppBaseFilter );
618 return E_NOTIMPL;
621 static HRESULT WINAPI
622 IFilterGraph2_fnSetLogFile(IFilterGraph2* iface,DWORD_PTR hFile)
624 CFilterGraph_THIS(iface,fgraph);
626 FIXME( "(%p)->() stub!\n", This );
627 return E_NOTIMPL;
630 static HRESULT WINAPI
631 IFilterGraph2_fnAbort(IFilterGraph2* iface)
633 CFilterGraph_THIS(iface,fgraph);
635 /* undoc. */
637 FIXME( "(%p)->() stub!\n", This );
638 return E_NOTIMPL;
641 static HRESULT WINAPI
642 IFilterGraph2_fnShouldOperationContinue(IFilterGraph2* iface)
644 CFilterGraph_THIS(iface,fgraph);
646 /* undoc. */
648 FIXME( "(%p)->() stub!\n", This );
649 return E_NOTIMPL;
652 static HRESULT WINAPI
653 IFilterGraph2_fnAddSourceFilterForMoniker(IFilterGraph2* iface,IMoniker* pMon,IBindCtx* pCtx,LPCWSTR pFilterName,IBaseFilter** ppFilter)
655 CFilterGraph_THIS(iface,fgraph);
657 FIXME( "(%p)->() stub!\n", This );
658 return E_NOTIMPL;
661 static HRESULT WINAPI
662 IFilterGraph2_fnReconnectEx(IFilterGraph2* iface,IPin* pPin,const AM_MEDIA_TYPE* pmt)
664 CFilterGraph_THIS(iface,fgraph);
665 HRESULT hr;
667 FIXME( "(%p)->(%p,%p) stub!\n",This,pPin,pmt );
669 /* reconnect asynchronously. */
671 hr = CFilterGraph_GraphChanged(This);
673 return E_NOTIMPL;
676 static HRESULT WINAPI
677 IFilterGraph2_fnRenderEx(IFilterGraph2* iface,IPin* pPin,DWORD dwParam1,DWORD* pdwParam2)
679 CFilterGraph_THIS(iface,fgraph);
681 /* undoc. */
682 FIXME( "(%p)->(%p,%08lx,%p) stub!\n",This,pPin,dwParam1,pdwParam2);
683 return E_NOTIMPL;
689 static ICOM_VTABLE(IFilterGraph2) ifgraph =
691 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
692 /* IUnknown fields */
693 IFilterGraph2_fnQueryInterface,
694 IFilterGraph2_fnAddRef,
695 IFilterGraph2_fnRelease,
696 /* IFilterGraph fields */
697 IFilterGraph2_fnAddFilter,
698 IFilterGraph2_fnRemoveFilter,
699 IFilterGraph2_fnEnumFilters,
700 IFilterGraph2_fnFindFilterByName,
701 IFilterGraph2_fnConnectDirect,
702 IFilterGraph2_fnReconnect,
703 IFilterGraph2_fnDisconnect,
704 IFilterGraph2_fnSetDefaultSyncSource,
705 /* IGraphBuilder fields */
706 IFilterGraph2_fnConnect,
707 IFilterGraph2_fnRender,
708 IFilterGraph2_fnRenderFile,
709 IFilterGraph2_fnAddSourceFilter,
710 IFilterGraph2_fnSetLogFile,
711 IFilterGraph2_fnAbort,
712 IFilterGraph2_fnShouldOperationContinue,
713 /* IFilterGraph2 fields */
714 IFilterGraph2_fnAddSourceFilterForMoniker,
715 IFilterGraph2_fnReconnectEx,
716 IFilterGraph2_fnRenderEx,
719 HRESULT CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg )
721 TRACE("(%p)\n",pfg);
722 ICOM_VTBL(&pfg->fgraph) = &ifgraph;
724 pfg->m_pFilterList = QUARTZ_CompList_Alloc();
725 if ( pfg->m_pFilterList == NULL )
726 return E_OUTOFMEMORY;
728 return NOERROR;
731 void CFilterGraph_UninitIFilterGraph2( CFilterGraph* pfg )
733 QUARTZ_CompListItem* pItem;
735 TRACE("(%p)\n",pfg);
737 /* remove all filters... */
738 while ( 1 )
740 pItem = QUARTZ_CompList_GetFirst( pfg->m_pFilterList );
741 if ( pItem == NULL )
742 break;
743 IFilterGraph2_RemoveFilter(
744 (IFilterGraph2*)(&pfg->fgraph),
745 (IBaseFilter*)QUARTZ_CompList_GetItemPtr(pItem) );
748 QUARTZ_CompList_Free( pfg->m_pFilterList );