Discussion:
My filter is being picked up for wrong format!
(too old to reply)
v***@gmail.com
2006-10-17 09:14:02 UTC
Permalink
Hi

I have written a demux filter for a custom file format, along with
corresponding transform filters. I am using File Async filter as source
filter. All the filters work fine when I choose the file of correct
format.

However, when I select a file of different format, even then my demux
filter is being selected.
MyDemuxInputPin::CheckMediaType returns error 2 times but I don't
understand how, the third time it returns S_OK.

Please let me know if you have any hint as to what's happening. I have
appended main function snippets below...

STDMETHODIMP MyDemuxInputPin::ReceiveConnection(
IPin *pConnector,
const AM_MEDIA_TYPE *pmt
)
{
return CBaseInputPin::ReceiveConnection(pConnector, pmt);
}

HRESULT MyDemuxInputPin::CheckMediaType(const CMediaType* pmt)
{
CAutoLock lock(m_pLock);

// I get media type and sub type from pmt
const GUID* pType = pmt->Type();
const GUID* pSubType = pmt->Subtype();

if(*pType == MEDIATYPE_Stream && *pSubType == MEDIASUBTYPE_MYTYPE)
return S_OK;
else
return E_FAIL;
}


HRESULT MyDemuxInputPin::GetMediaType(int iPosition, CMediaType*
pMediaType)
{
//check for iPosition here...

if(iPosition == 0)
{
pMediaType->SetType(&MEDIATYPE_Stream);
pMediaType->SetSubtype(&MEDIASUBTYPE_MYTYPE);
}
return S_OK;

Thanks,
Vikram
The March Hare [MVP]
2006-10-17 15:02:07 UTC
Permalink
Hi
...

You seem to have figured out the correct group for your post.

It would be polite to indicate the fact in reply to your mistaken post in
this inactive newsgroup.
--
Microsoft MVPs: http://www.microsoft.com/mvp and
MVPs.org site http://www.mvps.org
My dshow site: http://tmhare.mvps.org
v***@gmail.com
2006-10-18 04:50:28 UTC
Permalink
Post by The March Hare [MVP]
It would be polite to indicate the fact in reply to your mistaken post in
this inactive newsgroup.
I agree.

But, the name of the group:
*microsoft.public.multimedia.directx.dshow.programming* somehow makes
me feel this group has something to do with multimedia, involving
programming under DShow programming.
Post by The March Hare [MVP]
Hi
...
You seem to have figured out the correct group for your post.
It would be polite to indicate the fact in reply to your mistaken post in
this inactive newsgroup.
--
Microsoft MVPs: http://www.microsoft.com/mvp and
MVPs.org site http://www.mvps.org
My dshow site: http://tmhare.mvps.org
v***@gmail.com
2006-10-18 04:53:05 UTC
Permalink
okey, I have found the new link:
microsoft.public.win32.programmer.directx.video. Sorry, I missed the
message by March Hare saying this group is inactive.
Post by v***@gmail.com
Post by The March Hare [MVP]
It would be polite to indicate the fact in reply to your mistaken post in
this inactive newsgroup.
I agree.
*microsoft.public.multimedia.directx.dshow.programming* somehow makes
me feel this group has something to do with multimedia, involving
programming under DShow programming.
Post by The March Hare [MVP]
Hi
...
You seem to have figured out the correct group for your post.
It would be polite to indicate the fact in reply to your mistaken post in
this inactive newsgroup.
--
Microsoft MVPs: http://www.microsoft.com/mvp and
MVPs.org site http://www.mvps.org
My dshow site: http://tmhare.mvps.org
The March Hare [MVP]
2006-10-18 04:59:53 UTC
Permalink
Post by v***@gmail.com
Post by The March Hare [MVP]
It would be polite to indicate the fact in reply to your mistaken post in
this inactive newsgroup.
I agree.
Then why didn't you? LOL
Post by v***@gmail.com
*microsoft.public.multimedia.directx.dshow.programming* somehow makes
me feel this group has something to do with multimedia, involving
programming under DShow programming.
However, when virtually every other thread in the newsgroup says in its
title that the group is inactive and points you where the active dshow
newsgroups are (which have active content and answers) you might conclude
that the current group is inactive :)
--
Microsoft MVPs: http://www.microsoft.com/mvp and
MVPs.org site http://www.mvps.org
My dshow site: http://tmhare.mvps.org
Loading...