org.esau.ptarmigan.impl
Class MPEGFrameHeader
java.lang.Object
|
+--org.esau.ptarmigan.impl.MPEGFrameHeader
- public final class MPEGFrameHeader
- extends java.lang.Object
MPEG Frame Header
Parse and validate a 4-byte MPEG Header
- Version:
- $Revision: 1.2 $ $Date: 2002/10/02 05:27:03 $
- Author:
- Reed Esau
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MPEGFrameHeader
public MPEGFrameHeader()
- ctor
MPEGFrameHeader
public MPEGFrameHeader(MPEGFrameHeader other)
- copy ctor
initHeader
public boolean initHeader(byte[] buf,
int offset)
- Try to identify a frame header in the specified buffer at the
specified offset.
Note that it's not definitive. You have to look for repeating MPEG
frames and check CRCs to make sure.
AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM
- Returns:
- false if not a valid frame header; true if it may be (but not definitive)
getAudioVersion
public java.lang.String getAudioVersion()
getLayer
public int getLayer()
getProtection
public boolean getProtection()
getPadding
public boolean getPadding()
getPrivateBit
public boolean getPrivateBit()
getChannelMode
public int getChannelMode()
getModeExt
public int getModeExt()
getChannels
public int getChannels()
getChannelDesc
public java.lang.String getChannelDesc()
getCopyright
public boolean getCopyright()
getOriginal
public boolean getOriginal()
getEmphasis
public int getEmphasis()
getBitRate
public int getBitRate()
getSampleRate
public int getSampleRate()
getFrameLength
public int getFrameLength()
resetData
public void resetData()
Copyright © 2002 Reed Esau, All Rights Reserved.