AddFilter Problem
- From: radha <radhamanogar@xxxxxxxxx>
- Date: Mon, 11 Aug 2008 04:27:32 -0700 (PDT)
Hi all
To play a mms stream I implemented a player using DirectShow. It
plays well when I give proper URL. But for some url/invalid url,
AddFilter doesn't return immediately.
What should I do to return immediately from AddFilter?????
any help ???
IBaseFilter *pSource = NULL;
IFileSourceFilter *pSFilter = NULL;
IEnumPins *pEnum = NULL;
IPin *pPin = NULL;
PIN_DIRECTION PinDirThis;
CoCreateInstance(CLSID_WMAsfReader, NULL, CLSCTX_INPROC_SERVER,
IID_IFileSourceFilter, (void**)(&pSFilter));
wchar_t wcstr[1024];
mbstowcs(wcstr, mrl.c_str(), 1024);
HRESULT hr = pSFilter->Load(L"URL", NULL);
if (FAILED(hr))
return false;
hr = pSFilter->QueryInterface(IID_IBaseFilter, (void**)(&pSource));
hr = m_Graph->AddFilter(pSource, L"Asf Source Filter");
if (FAILED(hr))
return false;
pSource->EnumPins(&pEnum);
while(pEnum->Next(1, &pPin, 0) == S_OK)
{
pPin->QueryDirection(&PinDirThis);
if (PINDIR_OUTPUT == PinDirThis)
{
hr = m_Graph->Render(pPin);
if (FAILED(hr))
{
return false;
}
}
pPin->Release();
}
.
- Prev by Date: Achetez acomplia femme en termes de acomplia us usa generique medicaments en France commander acomplia en ligne comprimes de acomplia en France
- Next by Date: DirectX in a UserControl
- Previous by thread: Achetez acomplia femme en termes de acomplia us usa generique medicaments en France commander acomplia en ligne comprimes de acomplia en France
- Next by thread: DirectX in a UserControl
- Index(es):