public void parse(ByteBuffer input) { super.parse(input); channelLayout = input.getInt(); channelBitmap = input.getInt(); int numDescriptions = input.getInt(); descriptions = new ChannelDescription[numDescriptions]; for (int i = 0; i < numDescriptions; i++) { descriptions[i] = new ChannelDescription(input.getInt(), input.getInt(), new float[] { Float.intBitsToFloat(input.getInt()), Float.intBitsToFloat(input.getInt()), Float.intBitsToFloat(input.getInt()) }); } }
protected void doWrite(ByteBuffer out) { super.doWrite(out); out.putInt(channelLayout); out.putInt(channelBitmap); out.putInt(descriptions.length); for (ChannelDescription channelDescription : descriptions) { out.putInt(channelDescription.getChannelLabel()); out.putInt(channelDescription.getChannelFlags()); out.putFloat(channelDescription.getCoordinates()[0]); out.putFloat(channelDescription.getCoordinates()[1]); out.putFloat(channelDescription.getCoordinates()[2]); } }
protected void doWrite(ByteBuffer out) { super.doWrite(out); out.putInt(channelLayout); out.putInt(channelBitmap); out.putInt(descriptions.length); for (int i = 0; i < descriptions.length; i++) { ChannelDescription channelDescription = descriptions[i]; out.putInt(channelDescription.getChannelLabel()); out.putInt(channelDescription.getChannelFlags()); out.putFloat(channelDescription.getCoordinates()[0]); out.putFloat(channelDescription.getCoordinates()[1]); out.putFloat(channelDescription.getCoordinates()[2]); } }
private static Label[] extractLabels(ChannelDescription[] descriptions) { Label[] result = new Label[descriptions.length]; for (int i = 0; i < descriptions.length; i++) result[i] = descriptions[i].getLabel(); return result; }
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 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 static Label[] extractLabels(ChannelDescription[] descriptions) { Label[] result = new Label[descriptions.length]; for (int i = 0; i < descriptions.length; i++) result[i] = descriptions[i].getLabel(); return result; }
protected void doWrite(ByteBuffer out) { super.doWrite(out); out.putInt(channelLayout); out.putInt(channelBitmap); out.putInt(descriptions.length); for (ChannelDescription channelDescription : descriptions) { out.putInt(channelDescription.getChannelLabel()); out.putInt(channelDescription.getChannelFlags()); out.putFloat(channelDescription.getCoordinates()[0]); out.putFloat(channelDescription.getCoordinates()[1]); out.putFloat(channelDescription.getCoordinates()[2]); } }
private static Label[] extractLabels(ChannelDescription[] descriptions) { Label[] result = new Label[descriptions.length]; for (int i = 0; i < descriptions.length; i++) result[i] = descriptions[i].getLabel(); return result; }
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 void parse(ByteBuffer input) { super.parse(input); channelLayout = input.getInt(); channelBitmap = input.getInt(); int numDescriptions = input.getInt(); descriptions = new ChannelDescription[numDescriptions]; for (int i = 0; i < numDescriptions; i++) { descriptions[i] = new ChannelDescription(input.getInt(), input.getInt(), new float[] { Float.intBitsToFloat(input.getInt()), Float.intBitsToFloat(input.getInt()), Float.intBitsToFloat(input.getInt()) }); } }
public void parse(ByteBuffer input) { super.parse(input); channelLayout = input.getInt(); channelBitmap = input.getInt(); int numDescriptions = input.getInt(); descriptions = new ChannelDescription[numDescriptions]; for (int i = 0; i < numDescriptions; i++) { descriptions[i] = new ChannelDescription(input.getInt(), input.getInt(), new float[] { Float.intBitsToFloat(input.getInt()), Float.intBitsToFloat(input.getInt()), Float.intBitsToFloat(input.getInt()) }); } }