code: protected void setDescriptor(Text line) throws ParseException {
          line.trim();
          try {
              //split using equal sign
              Iterator<Text> it = line.split('=').iterator();
  
              //skip first token (m)
              Text t = it.next();
  
              //select second token (media_type port profile formats)
              t = it.next();
  
              //split using white spaces
              it = t.split(' ').iterator();
  
              //media type
              mediaType = it.next();
              mediaType.trim();
  
              //port
              t = it.next();
              t.trim();
              port = t.toInteger();
  
              //profile
              profile = it.next();
              profile.trim();
  
              //formats
              while (it.hasNext()) {
                  t = it.next();
                  t.trim();
  
                  RTPFormat fmt = AVProfile.getFormat(t.toInteger(),mediaType);
                  if (fmt != null && !formats.contains(fmt.getFormat())) {
                      formats.add(fmt.clone());
                  }
              }
          } catch (Exception e) {
              throw new ParseException("Could not parse media descriptor", 0);
          }
      }
docs: Reads values from specified text line
  
  @param line the text description of the media.
  @throws ParseException