Skip to content

Instantly share code, notes, and snippets.

@zhuker
Created January 22, 2018 21:47
Show Gist options
  • Save zhuker/3c9c1c99d1a96c60defb0f19b6bbf812 to your computer and use it in GitHub Desktop.
Save zhuker/3c9c1c99d1a96c60defb0f19b6bbf812 to your computer and use it in GitHub Desktop.

precomputed.js

public class FnMediaNeighbors {
    /** neighbor count per frame */
    public int[] neighbors;
    /** best matching frame/media pairs */ 
    public List<List<BestFrames>> bestFrames;
}

public class BestFrames {
    public final String mediaId;
    public final int[] frames;
}

project.js

public class Project {
    public String id;
    public String name;
    /** Media id of source material */
    public String masterId;
    /** Media ids to compare source to */
    public List<String> scanIds;
    public ProjectStatus status;
    /** List of matching frame ranges */
    public List<MomentsPair> matches;
    public boolean notSeenByOperator = true;
    public Date processingStarted;
    public String owner;
}

public class Moment {
    /** Media id normally looks similar to video file name, but should not */
    public final String movieId;
    /** Zero based start frame */
    public final int start;
    /** Zero based end frame (inclusive) */
    public final int end;
}

public class MomentsPair {
    public Moment searchTerm;
    public Moment match;
}

ranges_MEDIAID_21.js

public class DiffRanges {
    List<DiffRange> ranges;
}

public class DiffRange {
    /** source frame range */
    public final Range r1;
    /** target frame range */
    public final Range r2;
    public final Range movedTo;
    public final MatchType matchType;
}

public enum MatchType {
    ADDED, REMOVED, MATCH, CHANGED, MOVED, MOVED_FROM, MOVED_TO
}

public class Range {
    /** Zero based start frame */
    public final int frame;
    public final int length;
}

public enum MatchType {
    ADDED, REMOVED, MATCH, CHANGED, MOVED, MOVED_FROM, MOVED_TO
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment