public static AvcCBox parseAVCC(VideoSampleEntry vse) { Box lb = Box.findFirst(vse, /*Box.bclass,*/ "avcC"); if (lb is AvcCBox) { return((AvcCBox)lb); } else { AvcCBox avcC = new AvcCBox(); avcC.parse(((LeafBox)lb).getData().duplicate()); return(avcC); } }
//public static <T extends Box> T as(Class<T> class1, LeafBox box) { // try { // T res = class1.getConstructor(Header.class).newInstance(box.getHeader()); // res.parse(box.getData()); // return res; // } catch (Exception e) { // throw e; // } //} internal static Box findFirst(VideoSampleEntry vse, string p) { throw new NotImplementedException(); }