Methods Summary |
---|
public final int | getAudioSize()
return audioSize;
|
public java.lang.String | getEncoder()
return "Fraunhofer";
|
public final int | getFrameCount()
return frameCount;
|
public final boolean | isVbr()Is this VBRIFrame detailing a varaible bit rate MPEG
return true;
|
public static java.nio.ByteBuffer | isVbriFrame(java.nio.ByteBuffer bb, MPEGFrameHeader mpegFrameHeader)IS this a VBRI frame
//We store this so can return here after scanning through buffer
int startPosition = bb.position();
MP3File.logger.finest("Checking VBRI Frame at" + startPosition);
bb.position(startPosition + VBRI_OFFSET);
//Create header from here
ByteBuffer header = bb.slice();
// Return Buffer to start Point
bb.position(startPosition);
//Check Identifier
byte[] identifier = new byte[VBRI_IDENTIFIER_BUFFER_SIZE];
header.get(identifier);
if ((!Arrays.equals(identifier, VBRI_VBR_ID)))
{
return null;
}
MP3File.logger.finest("Found VBRI Frame");
return header;
|
public static org.jaudiotagger.audio.mp3.VbriFrame | parseVBRIFrame(java.nio.ByteBuffer header)Parse the VBRIFrame of an MP3File, cannot be called until we have validated that
this is a VBRIFrame
VbriFrame VBRIFrame = new VbriFrame(header);
return VBRIFrame;
|
private void | setAudioSize()Set size of AudioData
byte frameSizeBuffer[] = new byte[VBRI_AUDIOSIZE_BUFFER_SIZE];
header.get(frameSizeBuffer);
boolean audioSizeEnabled = true;
audioSize = (frameSizeBuffer[BYTE_1] << 24) & 0xFF000000 | (frameSizeBuffer[BYTE_2] << 16) & 0x00FF0000 | (frameSizeBuffer[BYTE_3] << 8) & 0x0000FF00 | frameSizeBuffer[BYTE_4] & 0x000000FF;
|
private void | setFrameCount()Set count of frames
byte frameCountBuffer[] = new byte[VBRI_FRAMECOUNT_BUFFER_SIZE];
header.get(frameCountBuffer);
boolean frameCountEnabled = true;
frameCount = (frameCountBuffer[BYTE_1] << 24) & 0xFF000000 | (frameCountBuffer[BYTE_2] << 16) & 0x00FF0000 | (frameCountBuffer[BYTE_3] << 8) & 0x0000FF00 | frameCountBuffer[BYTE_4] & 0x000000FF;
|
public java.lang.String | toString()
return "VBRIheader" + " vbr:" + vbr + " frameCount:" + frameCount + " audioFileSize:" + audioSize + " encoder:" + getEncoder();
|