[Live-devel] Subclassing FramedFilter

Francesco Matassoni tubo.catodico at gmail.com
Mon Jun 16 02:40:25 PDT 2008


Hello, i am trying to subclass the FramedFilter to do my own  
ProtectionFilter. I take like example the MPEG2TransportStreamFramer  
because it seems to me the easiest of all the filter class. The first  
thing i need to do is simply pass the data from my ProtectionFilter to a  
FileSink without any manipulation, only to know if my class working. But  
it seems that the sink can't retrieve the data from my filter (all it's  
working whit the MPEG2TransportStreamFramer so the testing platform it's  
fine).
I think that the problem it's in the subclassing of the three function  
doGetNextFrame, afterGettingFrame and afterGettingFrame1 that i listed  
below, can anyone tell me where is the error?

void ProtectionFilter::doGetNextFrame()
{
	fFrameSize=0;
	fInputSource->getNextFrame(fTo, fMaxSize, afterGettingFrame, this,  
FramedSource::handleClosure, this);
}

void ProtectionFilter::afterGettingFrame(void* clientData, unsigned  
frameSize,	unsigned /*numTruncatedBytes*/,	struct timeval  
presentationTime, unsigned /*durationInMicroseconds*/)
{
	ProtectionFilter* filter = (ProtectionFilter*)clientData;
	filter->afterGettingFrame1(frameSize, presentationTime);
	
}

void ProtectionFilter::afterGettingFrame1(unsigned frameSize, struct  
timeval presentationTime)
{
	afterGetting(this);
}


More information about the live-devel mailing list