[Live-devel] are there any reference about some members' initialization

xcsmith at rockwellcollins.com xcsmith at rockwellcollins.com
Fri Sep 22 08:20:11 PDT 2006



hi,all, i want to implement a class called
MPEG4ProgramSteamFileServerMediaSubsession
to support mpeg4 stream, but when i read the code of MPEG1or2Demux.cpp i
find there are many variables and functions are not open source and dont
give the  function prototype, and i dont how to use them.
is any one give me and advice for how to use the functions or variables?

for example:
MPEG1or2Demux
::MPEG1or2Demux(UsageEnvironment& env,
  FramedSource* inputSource, Boolean reclaimWhenLastESDies)
  : Medium(env),
    fInputSource(inputSource), fMPEGversion(0),
    fNextAudioStreamNumber(0), fNextVideoStreamNumber(0),
    fReclaimWhenLastESDies(reclaimWhenLastESDies), fNumOutstandingESs(0),
    fNumPendingReads(0), fHaveUndeliveredData(False) {
  fParser = new MPEGProgramStreamParser(this, inputSource);
  for (unsigned i = 0; i < 256; ++i) {
    fOutput[i].savedDataHead = fOutput[i].savedDataTail = NULL;
    fOutput[i].isPotentiallyReadable = False;
    fOutput[i].isCurrentlyActive = False;
    fOutput[i].isCurrentlyAwaitingData = False;
  }
}

//how can i know how to use fInputSource,fMPEGversion......


Hi, free.  In the Library, you will find that the member data begins with a
lowercase "f."  So these things "fInputSource", "fMPEGversion" are member
data for that class.  If you can't find them in the class you are looking
at, try checking if they were inherited from a parent class.  The parent
class of MPEG1or2Demux should be OnDemandServerMediaSession, who's parent
in turn is ServerMediaSubsession.  The piece of code you pointed out that
looks like it's calling functions is a constructor initialization list.

~Medra



More information about the live-devel mailing list