Hi,mikelin:
I am glad if I can give you some useful advice.
Firstly, my work is based on the sample Async of DirectShow SDK.
If you want to write a player,please rewrite the "memfile" project in the Async sample.
In function "main()"
//
if (lstrcmpi(lpType, TEXT("avi"

) == 0) {
mt.subtype = MEDIASUBTYPE_Avi;
}
//
If you want to write a source filter,please rewrite the "filter" project in the Async sample.
In function "Load(LPCOLESTR lpwszFileName, const AM_MEDIA_TYPE *pmt)" of CAsyncFilter
//
//According to the extension of filename
...........................
if (lstrcmpi(m_szUserData, TEXT("mpg"

) == 0) {
cmt.subtype = MEDIASUBTYPE_MPEG1System;
} else
if (lstrcmpi(m_szUserData, TEXT("avi"

) == 0) {
cmt.subtype = MEDIASUBTYPE_Avi;
}..........................
//
I think this will help you to support "avi" files.