Search in sources :

Example 6 with ManifestCollection

use of com.att.aro.core.videoanalysis.pojo.ManifestCollection in project VideoOptimzer by attdevsupport.

the class ManifestBuilder method dumpManifestCollection.

public String dumpManifestCollection() {
    StringBuilder strbldr = new StringBuilder("ManifestCollection:");
    strbldr.append("Map<String, ManifestCollection> manifestCollectionMap\n  size:" + manifestCollectionMap.size());
    Iterator<Entry<String, Map<Double, ManifestCollection>>> itr = manifestCollectionMap.entrySet().iterator();
    while (itr.hasNext()) {
        Entry<String, Map<Double, ManifestCollection>> val = itr.next();
        Map<Double, ManifestCollection> innerMap = val.getValue();
        Iterator<Entry<Double, ManifestCollection>> innerItr = innerMap.entrySet().iterator();
        strbldr.append("\n\tVideoStream:" + val.getKey() + manifestCollection);
        while (innerItr.hasNext()) {
            Entry<Double, ManifestCollection> innerVal = innerItr.next();
            ManifestCollection manifestCollection = innerVal.getValue();
            strbldr.append("\n\tVideoStream:" + innerVal.getKey() + manifestCollection);
        }
    }
    return strbldr.toString();
}
Also used : Entry(java.util.Map.Entry) ManifestCollection(com.att.aro.core.videoanalysis.pojo.ManifestCollection) HashMap(java.util.HashMap) Map(java.util.Map)

Example 7 with ManifestCollection

use of com.att.aro.core.videoanalysis.pojo.ManifestCollection in project VideoOptimzer by attdevsupport.

the class ManifestBuilder method getSegmentInfo.

/**
 * Locate and return a segment number.
 *
 * @param request
 * @return segment number or -1 if not found
 */
public SegmentInfo getSegmentInfo(HttpRequestResponseInfo request) {
    ManifestCollection manifestCollection;
    SegmentInfo segmentInfo = null;
    String key = buildKey(request);
    manifestCollection = findManifest(request);
    if (manifestCollection != null) {
        segmentInfo = manifestCollection.getSegmentTrie().get(key);
        if (segmentInfo == null) {
            segmentInfo = manifestCollection.getSegmentTrie().get(request.getObjUri().toString());
        }
    }
    return segmentInfo;
}
Also used : ManifestCollection(com.att.aro.core.videoanalysis.pojo.ManifestCollection)

Aggregations

ManifestCollection (com.att.aro.core.videoanalysis.pojo.ManifestCollection)7 ChildManifest (com.att.aro.core.videoanalysis.pojo.ChildManifest)3 HashMap (java.util.HashMap)3 Map (java.util.Map)3 HttpRequestResponseInfo (com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo)2 IStringParse (com.att.aro.core.util.IStringParse)2 StringParse (com.att.aro.core.util.StringParse)2 Util (com.att.aro.core.util.Util)2 Manifest (com.att.aro.core.videoanalysis.pojo.Manifest)2 ManifestType (com.att.aro.core.videoanalysis.pojo.Manifest.ManifestType)2 UrlMatchDef (com.att.aro.core.videoanalysis.pojo.UrlMatchDef)2 VideoFormat (com.att.aro.core.videoanalysis.pojo.VideoFormat)2 Pattern (java.util.regex.Pattern)2 CRC32 (java.util.zip.CRC32)2 NonNull (lombok.NonNull)2 StringUtils (org.apache.commons.lang.StringUtils)2 LogManager (org.apache.log4j.LogManager)2 Logger (org.apache.log4j.Logger)2 AROConfig (com.att.aro.core.AROConfig)1 IExternalProcessRunner (com.att.aro.core.commandline.IExternalProcessRunner)1