Exemplo n.º 1
0
  @Override
  public void parse(InputStream input) throws IOException {
    StringReader.sureSkip(input, 5);
    int nSPS = input.read() & 0x1f; // 3 bits reserved + 5 bits number of
    // sps
    for (int i = 0; i < nSPS; i++) {
      int spsSize = (int) ReaderBE.readInt16(input);
      byte[] sps = new byte[spsSize];
      input.read(sps);
      spsList.add(SeqParameterSet.read(new ByteArrayInputStream(sps, 1, spsSize - 1)));
    }

    int nPPS = input.read() & 0xff;
    for (int i = 0; i < nPPS; i++) {
      int ppsSize = (int) ReaderBE.readInt16(input);
      byte[] pps = new byte[ppsSize];
      input.read(pps);
      ppsList.add(PictureParameterSet.read(new ByteArrayInputStream(pps, 1, ppsSize - 1)));
    }
  }
Exemplo n.º 2
0
 public void parse(InputStream input) throws IOException {
   preloadStartTime = (int) ReaderBE.readInt32(input);
   preloadDuration = (int) ReaderBE.readInt32(input);
   preloadFlags = (int) ReaderBE.readInt32(input);
   defaultHints = (int) ReaderBE.readInt32(input);
 }