const AMOVIESETUP_MEDIATYPE sudPinTypes =
{
&MEDIATYPE_Video, // Major type
&MEDIASUBTYPE_NULL // Minor type
};
const AMOVIESETUP_MEDIATYPE sudPinTypes2 =
{
&MEDIATYPE_Stream, // Major type
&MEDIASUBTYPE_None // Minor type
};
const AMOVIESETUP_PIN sudPins[2] =
{
{
L"Input", // Name of the pin
FALSE, // Is pin rendered
FALSE, // Is an output pin
FALSE, // Ok for no pins
FALSE, // Allowed many
&CLSID_NULL, // Connects to filter
L"Output", // Connects to pin
1, // Number of pin types
&sudPinTypes // Details for pins
},
{
L"Input", // Name of the pin
FALSE, // Is pin rendered
FALSE, // Is an output pin
FALSE, // Ok for no pins
FALSE, // Allowed many
&CLSID_NULL, // Connects to filter
L"Output", // Connects to pin
1, // Number of pin types
&sudPinTypes2 // Details for pins
}
};
const AMOVIESETUP_FILTER sudSampVid =
{
&CLSID_SampleRenderer, // Filter CLSID
L"Sample Video Renderer Meir", // Filter name
MERIT_DO_NOT_USE, // Filter merit
2, // Number pins
sudPins // Pin details
};
I am having a problem connecting to the second pin. and also problem if I
connect to the first video pin when I release the renderer Ithe video window
stays open and the program crashes on exit.
The second pin has its own input pin class. and I overwrite the Recive
function to handel the incomming data .
My main problem is understanding two things. The Renderer has a Compleate
conntect function. it is called when connecting to the first pin and also the
second pin.
is this becaus the renderer was designed for one pin only?
2. What memory alocator should I use for the second pin and how do I create
it in my code?
Hope for some respose
Meir
You should use different names for the two pins.
And if this is a renderer, why aren't the pins marked as being rendered?
>My main problem is understanding two things. The Renderer has a Compleate
>conntect function. it is called when connecting to the first pin and also the
>second pin.
>is this becaus the renderer was designed for one pin only?
Well, no, it happens because each pin calls m_pRenderer->CompleteConnect in
the pins CompleteConnect handler. If you don't want the second pin to call
it, then change the second pin so it doesn't call it.
>2. What memory alocator should I use for the second pin and how do I create
>it in my code?
Do you need one? Why not use the upstream allocator?
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
> >My main problem is understanding two things. The Renderer has a Compleate
> >conntect function. it is called when connecting to the first pin and also the
> >second pin.
> >is this becaus the renderer was designed for one pin only?
>
> Well, no, it happens because each pin calls m_pRenderer->CompleteConnect in
> the pins CompleteConnect handler. If you don't want the second pin to call
> it, then change the second pin so it doesn't call it.
How do I do this?
And Second Should I build my rendere based on CBaseRenderer or
CBaseVideoRenderer Or should I use the CBaseFilter?
Going On CBaseFilter seems to far up and I would need to implement so
much of the basic functionality.
Thanks in advance
meir.
I derived my pin from CRendererInputPin
thansk meir