Sunday, March 25, 2007

Directshow source filter (sample Bouncing Ball)

CSourceStream derived class
CSource derived class....

//CSource is derived from cBaseFilter
//CSourceStream is derived from CBaseOutputPin and CAmThread

CSource filter has "CSourceStream m_paStreams" member...

This is used to define the output pins of the source filter...

what I have done in BOuncing Ball filter... ?


code for one output pin :

m_paStreams = (CSourceStream**)new CBallStream*[1];
m_paStreams[0] = new CBallStream(phr, this, L"A Bouncing Ball!");

I changed it as follows ...

m_paStreams = (CSourceStream**)new CBallStream*[2];
m_paStreams[0] = new CBallStream(phr, this, L"A Bouncing Ball!");
m_paStreams[1] = new CBallStream(phr, this, L"Bouncer"); //Second output pin

Labels:

0 Comments:

Post a Comment

<< Home