hi all
i am try to connect a source filter to the next filter and i faced a problem.
the source filter now has two output pins. and i have checked them in the graphedit ,and i found their catagory are all zero . but there has a difference in type(major type).but i have no idea how to implement it.
and i stumble across a post:
//-----------------------------------------------------------------
Use IKsPropertySet Interface and see example code in section Pin Property Set.
and more details about this method:
http://msdn.microsoft.com/en-us/library/ms787483(VS.85).aspx[
^]
Pin Property Set
The pin property set returns the pin category for a pin on a filter. The category is set by the filter when it creates the pin; the category indicates what type of data the pin is delivered or receives by this pin.
Example Code
The following code shows how to check whether a pin supports this property set, and if so, how to obtain the pin category:
HRESULT GetPinCategory(IPin *pPin, GUID *pPinCategory)
{
HRESULT hr;
IKsPropertySet *pKs;
hr = pPin->QueryInterface(IID_IKsPropertySet, (void **)&pKs);
if (FAILED(hr))
{
return hr;
}
DWORD cbReturned;
hr = pKs->Get(AMPROPSETID_Pin, AMPROPERTY_PIN_CATEGORY, NULL, 0,
pPinCategory, sizeof(GUID), &cbReturned);
pKs->Release();
return hr;
}
i doubt weather it can work in my situation.
if anyone have any ideas or have experiences in this .just help me !
thanks in advance!
[EDIT] Added <pre> tags to the example code - Code-o-mat [/EDIT]