FileDocCategorySizeDatePackage
InitialObjectDescriptor.javaAPI Docmp4parser 1.0-RC-175237Wed Dec 19 20:10:37 GMT 2012com.googlecode.mp4parser.boxes.mp4.objectdescriptors

InitialObjectDescriptor

public class InitialObjectDescriptor extends ObjectDescriptorBase

Fields Summary
private int
objectDescriptorId
int
urlFlag
int
includeInlineProfileLevelFlag
int
urlLength
String
urlString
int
oDProfileLevelIndication
int
sceneProfileLevelIndication
int
audioProfileLevelIndication
int
visualProfileLevelIndication
int
graphicsProfileLevelIndication
List
esDescriptors
List
extensionDescriptors
List
unknownDescriptors
Constructors Summary
Methods Summary
public voidparseDetail(java.nio.ByteBuffer bb)


    
          
        int data = IsoTypeReader.readUInt16(bb);
        objectDescriptorId = (data & 0xFFC0) >> 6;

        urlFlag = (data & 0x3F) >> 5;
        includeInlineProfileLevelFlag = (data & 0x1F) >> 4;

        int sizeLeft = getSize() - 2;
        if (urlFlag == 1) {
            urlLength = IsoTypeReader.readUInt8(bb);
            urlString = IsoTypeReader.readString(bb, urlLength);
            sizeLeft = sizeLeft - (1 + urlLength);
        } else {
            oDProfileLevelIndication = IsoTypeReader.readUInt8(bb);
            sceneProfileLevelIndication = IsoTypeReader.readUInt8(bb);
            audioProfileLevelIndication = IsoTypeReader.readUInt8(bb);
            visualProfileLevelIndication = IsoTypeReader.readUInt8(bb);
            graphicsProfileLevelIndication = IsoTypeReader.readUInt8(bb);

            sizeLeft = sizeLeft - 5;

            if (sizeLeft > 2) {
                final BaseDescriptor descriptor = ObjectDescriptorFactory.createFrom(-1, bb);
                sizeLeft = sizeLeft - descriptor.getSize();
                if (descriptor instanceof ESDescriptor) {
                    esDescriptors.add((ESDescriptor) descriptor);
                } else {
                    unknownDescriptors.add(descriptor);
                }
            }
        }

        if (sizeLeft > 2) {
            final BaseDescriptor descriptor = ObjectDescriptorFactory.createFrom(-1, bb);
            if (descriptor instanceof ExtensionDescriptor) {
                extensionDescriptors.add((ExtensionDescriptor) descriptor);
            } else {
                unknownDescriptors.add(descriptor);
            }
        }
    
public java.lang.StringtoString()

        final StringBuilder sb = new StringBuilder();
        sb.append("InitialObjectDescriptor");
        sb.append("{objectDescriptorId=").append(objectDescriptorId);
        sb.append(", urlFlag=").append(urlFlag);
        sb.append(", includeInlineProfileLevelFlag=").append(includeInlineProfileLevelFlag);
        sb.append(", urlLength=").append(urlLength);
        sb.append(", urlString='").append(urlString).append('\'");
        sb.append(", oDProfileLevelIndication=").append(oDProfileLevelIndication);
        sb.append(", sceneProfileLevelIndication=").append(sceneProfileLevelIndication);
        sb.append(", audioProfileLevelIndication=").append(audioProfileLevelIndication);
        sb.append(", visualProfileLevelIndication=").append(visualProfileLevelIndication);
        sb.append(", graphicsProfileLevelIndication=").append(graphicsProfileLevelIndication);
        sb.append(", esDescriptors=").append(esDescriptors);
        sb.append(", extensionDescriptors=").append(extensionDescriptors);
        sb.append(", unknownDescriptors=").append(unknownDescriptors);
        sb.append('}");
        return sb.toString();