Ejemplo n.º 1
0
  private TranscodeProfile[] getTranscodeProfiles(String classification) {
    List<TranscodeProfile> profiles = new ArrayList<TranscodeProfile>();

    DeviceManagerImpl dm = getManager();

    TranscodeProvider[] providers = dm.getProviders();

    for (TranscodeProvider provider : providers) {

      TranscodeProfile[] ps = provider.getProfiles();

      for (TranscodeProfile p : ps) {

        String c = p.getDeviceClassification();

        if (c == null) {

          log("Device classification missing for " + p.getName());

        } else {
          if (c.toLowerCase().startsWith(classification.toLowerCase())) {

            profiles.add(p);
          }
        }
      }
    }

    return (profiles.toArray(new TranscodeProfile[profiles.size()]));
  }
Ejemplo n.º 2
0
  private TranscodeProfile[] getTranscodeProfiles(String classification) {
    List<TranscodeProfile> profiles = new ArrayList<TranscodeProfile>();

    DeviceManagerImpl dm = getManager();

    TranscodeProvider[] providers = dm.getProviders();

    for (TranscodeProvider provider : providers) {

      TranscodeProfile[] ps = provider.getProfiles(classification);

      if (providers.length == 1) {

        return (ps);
      }

      profiles.addAll(Arrays.asList(ps));
    }

    return (profiles.toArray(new TranscodeProfile[profiles.size()]));
  }