[Live-devel] Re: Questions on streaming live H263 videos
Cristiano Belloni
belloni at imavis.com
Tue Dec 18 06:54:18 PST 2007
>I suggest defining a subclass of
>"H263plusVideoFileServerMediaSubsession", and redefining the
>"createNewStreamSource()" virtual function to start your encoder(sic)
>thread, and then call the parent class
>("H263plusVideoFileServerMediaSubsession")'s
>"createNewStreamSource()"
Uhm, I'm having an hard time subclassing "H263plusVideoFileServerMediaSubsession".
I just added this code:
class EncH263plusVideoFileServerMediaSubsession: public H263plusVideoFileServerMediaSubsession
{
private:
FramedSource* createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate);
};
FramedSource* EncH263plusVideoFileServerMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate)
{
std::cout << "Started a new Stream Source" << std::endl;
/* Code to start the encoder thread */
return H263plusVideoFileServerMediaSubsession::createNewStreamSource(clientSessionId, estBitrate);
}
And i get these errors:
~/develop/lib/live-debug/liveMedia/include/H263plusVideoFileServerMediaSubsession.hh: In member function ‘virtual FramedSource* EncH263plusVideoFileServerMediaSubsession::createNewStreamSource(unsigned int, unsigned int&)’:
~/develop/lib/live-debug/liveMedia/include/H263plusVideoFileServerMediaSubsession.hh:42: error: ‘virtual FramedSource* H263plusVideoFileServerMediaSubsession::createNewStreamSource(unsigned int, unsigned int&)’ is private
rtspServer.cpp:56: error: within this context
~/develop/lib/live-debug/liveMedia/include/H263plusVideoFileServerMediaSubsession.hh: In destructor ‘virtual EncH263plusVideoFileServerMediaSubsession::~EncH263plusVideoFileServerMediaSubsession()’:
~/develop/lib/live-debug/liveMedia/include/H263plusVideoFileServerMediaSubsession.hh:38: error: ‘H263plusVideoFileServerMediaSubsession::~H263plusVideoFileServerMediaSubsession()’ is private
rtspServer.cpp:44: error: within this context
rtspServer.cpp: At global scope:
rtspServer.cpp:114: note: synthesized method ‘virtual EncH263plusVideoFileServerMediaSubsession::~EncH263plusVideoFileServerMediaSubsession()’ first required here
Complaining that the destructor of H263plusVideoFileServerMediaSubsession is private (and indeed it is).
If I try to override the destructor in my class, I get similar errors.
Where am I doing wrong? Can you point me to some sample code where it is done right?
Thanks,
Regards,
Cristiano Belloni.
More information about the live-devel
mailing list