public static ChannelBox createChannelBox() { return new ChannelBox(new Header(fourcc())); }
public static void setLabels(Label[] labels, ChannelBox channel) { channel.setChannelLayout(kCAFChannelLayoutTag_UseChannelDescriptions.getCode()); ChannelDescription[] list = new ChannelDescription[labels.length]; for (int i = 0; i < labels.length; i++) list[i] = new ChannelBox.ChannelDescription(labels[i].getVal(), 0, new float[] { 0, 0, 0 }); channel.setDescriptions(list); }
public static Label[] getLabels(ChannelBox box) { long tag = box.getChannelLayout(); if ((tag >> 16) == 147) { int n = (int) tag & 0xffff; Label[] res = new Label[n]; for (int i = 0; i < n; i++) res[i] = Label.getByVal((1 << 16) | i); return res; } for (ChannelLayout layout : EnumSet.allOf(ChannelLayout.class)) { if (layout.getCode() == tag) { switch (layout) { case kCAFChannelLayoutTag_UseChannelDescriptions: return extractLabels(box.getDescriptions()); case kCAFChannelLayoutTag_UseChannelBitmap: return getLabelsByBitmap(box.getChannelBitmap()); default: return layout.getLabels(); } } } return EMPTY; }
public MyFactory() { mappings.put(WaveExtension.fourcc(), WaveExtension.class); mappings.put(ChannelBox.fourcc(), ChannelBox.class); mappings.put("esds", LeafBox.class); }
private static void setLabels(TrakBox trakBox, Label[] labels) { ChannelBox channel = Box.findFirst(trakBox, ChannelBox.class, "mdia", "minf", "stbl", "stsd", null, "chan"); if (channel == null) { channel = new ChannelBox(); Box.findFirst(trakBox, SampleEntry.class, "mdia", "minf", "stbl", "stsd", null).add(channel); } setLabels(labels, channel); }
public static void _setLabels(TrakBox trakBox, Label[] labels) { ChannelBox channel = NodeBox.findFirstPath(trakBox, ChannelBox.class, new String[] { "mdia", "minf", "stbl", "stsd", null, "chan" }); if (channel == null) { channel = ChannelBox.createChannelBox(); NodeBox.findFirstPath(trakBox, SampleEntry.class, new String[] { "mdia", "minf", "stbl", "stsd", null }).add(channel); } setLabels(labels, channel); }
public static Label[] getLabels(ChannelBox box) { long tag = box.getChannelLayout(); if ((tag >> 16) == 147) { int n = (int) tag & 0xffff; Label[] res = new Label[n]; for (int i = 0; i < n; i++) res[i] = Label.getByVal((1 << 16) | i); return res; } for (ChannelLayout layout : EnumSet.allOf(ChannelLayout.class)) { if (layout.getCode() == tag) { switch (layout) { case kCAFChannelLayoutTag_UseChannelDescriptions: return extractLabels(box.getDescriptions()); case kCAFChannelLayoutTag_UseChannelBitmap: return getLabelsByBitmap(box.getChannelBitmap()); default: return layout.getLabels(); } } } return EMPTY; }
public AudioBoxes() { super(); mappings.put(WaveExtension.fourcc(), WaveExtension.class); mappings.put(ChannelBox.fourcc(), ChannelBox.class); mappings.put("esds", Box.LeafBox.class); } }
private static void setLabels(TrakBox trakBox, Label[] labels) { ChannelBox channel = Box.findFirst(trakBox, ChannelBox.class, "mdia", "minf", "stbl", "stsd", null, "chan"); if (channel == null) { channel = new ChannelBox(); Box.findFirst(trakBox, SampleEntry.class, "mdia", "minf", "stbl", "stsd", null).add(channel); } setLabels(labels, channel); }
public static Label[] getLabelsFromChan(ChannelBox box) { long tag = box.getChannelLayout(); if ((tag >> 16) == 147) { int n = (int) tag & 0xffff; Label[] res = new Label[n]; for (int i = 0; i < n; i++) res[i] = Label.getByVal((1 << 16) | i); return res; } ChannelLayout[] values = ChannelLayout.values(); for (int i = 0; i < values.length; i++) { ChannelLayout layout = values[i]; if (layout.getCode() == tag) { if (layout == kCAFChannelLayoutTag_UseChannelDescriptions) { return extractLabels(box.getDescriptions()); } else if (layout == kCAFChannelLayoutTag_UseChannelBitmap) { return getLabelsByBitmap(box.getChannelBitmap()); } else { return layout.getLabels(); } } } return AudioSampleEntry.EMPTY; }
public static void setLabels(Label[] labels, ChannelBox channel) { channel.setChannelLayout(ChannelLayout.kCAFChannelLayoutTag_UseChannelDescriptions.getCode()); ChannelDescription[] list = new ChannelDescription[labels.length]; for (int i = 0; i < labels.length; i++) list[i] = new ChannelBox.ChannelDescription(labels[i].getVal(), 0, new float[] { 0, 0, 0 }); channel.setDescriptions(list); }
public MyFactory() { mappings.put(WaveExtension.fourcc(), WaveExtension.class); mappings.put(ChannelBox.fourcc(), ChannelBox.class); mappings.put("esds", LeafBox.class); }
public static void setLabels(Label[] labels, ChannelBox channel) { channel.setChannelLayout(ChannelLayout.kCAFChannelLayoutTag_UseChannelDescriptions.getCode()); ChannelDescription[] list = new ChannelDescription[labels.length]; for (int i = 0; i < labels.length; i++) list[i] = new ChannelBox.ChannelDescription(labels[i].getVal(), 0, new float[] { 0, 0, 0 }); channel.setDescriptions(list); }
public ChannelBox() { super(new Header(fourcc())); }
public ChannelBox() { super(new Header(fourcc())); }