Esempio n. 1
0
  public int get(IBitstream _F_bs) throws IOException {
    int _F_ret = 0;
    MapResult _F_mr;
    int _F_parse = 0;
    Util.trace(_F_bs.getpos(), 0, (int) 0, "begin PATProgram");
    _F_parse = 16;
    program_number = _F_bs.getbits(_F_parse);
    Util.trace(
        _F_bs.getpos() - _F_parse,
        _F_parse,
        (int) program_number,
        "program_number" + " (" + program_number + ")");
    _F_bs.skipbits(3);
    if (program_number == 0) {
      _F_parse = 13;
      network_PID = _F_bs.getbits(_F_parse);
      Util.trace(
          _F_bs.getpos() - _F_parse,
          _F_parse,
          (int) network_PID,
          "network_PID" + " (" + network_PID + ")");
    } else {
      _F_parse = 13;
      program_map_PID = _F_bs.getbits(_F_parse);
      Util.trace(
          _F_bs.getpos() - _F_parse,
          _F_parse,
          (int) program_map_PID,
          "program_map_PID" + " (" + program_map_PID + ")");
    }

    Util.trace(_F_bs.getpos(), 0, (int) 0, "end PATProgram");
    return _F_ret;
  }
Esempio n. 2
0
  public int putxml(IBitstream _F_bs, boolean bAttr) throws IOException {
    int _F_ret = 0;
    MapResult _F_mr;
    int _F_parse = 0;
    _F_parse = 16;
    program_number = _F_bs.getbits(_F_parse);
    if (bAttr) {
      XML.WriteXmlElement(
          "<program_number type=\"flUInt\" bitLen=\""
              + _F_parse
              + "\">"
              + program_number
              + "</program_number>");
    } else {
      XML.WriteXmlElement(
          "<program_number bitLen=\"" + _F_parse + "\">" + program_number + "</program_number>");
    }
    _F_bs.skipbits(3);
    if (program_number == 0) {
      _F_parse = 13;
      network_PID = _F_bs.getbits(_F_parse);
      if (bAttr) {
        XML.WriteXmlElement(
            "<network_PID type=\"flUInt\" bitLen=\""
                + _F_parse
                + "\">"
                + network_PID
                + "</network_PID>");
      } else {
        XML.WriteXmlElement(
            "<network_PID bitLen=\"" + _F_parse + "\">" + network_PID + "</network_PID>");
      }
    } else {
      _F_parse = 13;
      program_map_PID = _F_bs.getbits(_F_parse);
      if (bAttr) {
        XML.WriteXmlElement(
            "<program_map_PID type=\"flUInt\" bitLen=\""
                + _F_parse
                + "\">"
                + program_map_PID
                + "</program_map_PID>");
      } else {
        XML.WriteXmlElement(
            "<program_map_PID bitLen=\""
                + _F_parse
                + "\">"
                + program_map_PID
                + "</program_map_PID>");
      }
    }

    return _F_ret;
  }
Esempio n. 3
0
  public int put(IBitstream _F_bs) throws IOException {
    int _F_ret = 0;
    MapResult _F_mr;
    _F_bs.putbits(program_number, 16);
    _F_bs.skipbits(3);
    if (program_number == 0) {
      _F_bs.putbits(network_PID, 13);
    } else {
      _F_bs.putbits(program_map_PID, 13);
    }

    return _F_ret;
  }