[Live-devel] what is the function "Boolean isSpecialStreamId(unsigned char stream_id)" doing ?

Karlov Andrey kan at pisem.net
Wed Sep 19 08:40:45 PDT 2007


Please explain me, for what using the function:
  "Boolean isSpecialStreamId(unsigned char stream_id)"?

Why this function always return "TRUE" whan we use program
"testMPEG1or2ProgramToTransportStream"?

This function defined in "MPEG1or2Demux.cpp" and it's code:


Boolean MPEGProgramStreamParser
::isSpecialStreamId(unsigned char stream_id) const {
   if (stream_id == RAW_PES) return True; // hack

   if (fUsingSource->fMPEGversion == 1) {
     return stream_id == private_stream_2;
   } else { // assume MPEG-2
     if (stream_id <= private_stream_2) {
       return stream_id != private_stream_1;
     } else if ((stream_id&0xF0) == 0xF0) {
       unsigned char lower4Bits = stream_id&0x0F;
       return lower4Bits <= 2 || lower4Bits == 0x8 || lower4Bits == 0xF;
     } else {
       return False;
     }
   }
}


More information about the live-devel mailing list