public Source findBestSourceByBitRate(
     SourceCollection paramSourceCollection, Integer paramInteger) throws NoSourceFoundException {
   if ((paramSourceCollection.getSources() == null)
       || (paramSourceCollection.getSources().size() == 0)) {
     throw new NoSourceFoundException();
   }
   Source localSource = (Source) paramSourceCollection.getSources().iterator().next();
   int i = Integer.MAX_VALUE;
   Iterator localIterator = paramSourceCollection.getSources().iterator();
   paramSourceCollection = localSource;
   while (localIterator.hasNext()) {
     localSource = (Source) localIterator.next();
     if ((localSource.getBitRate() != null) && (localSource.getBitRate().intValue() > 0)) {
       int j = Math.abs(localSource.getBitRate().intValue() - paramInteger.intValue());
       if (j > i) {
         break label139;
       }
       paramSourceCollection = localSource;
       i = j;
     }
   }
   label139:
   for (; ; ) {
     break;
     return paramSourceCollection;
   }
 }
Ejemplo n.º 2
0
 @Kroll.getProperty(name = "url")
 public String getURL() {
   return source.getUrl();
 }
Ejemplo n.º 3
0
 @Kroll.getProperty(name = "properties")
 public KrollDict getSourceProperties() {
   return BrightcoveModule.toKrollDict(source.getProperties());
 }