當前位置: 首頁>>代碼示例>>Java>>正文


Java IsoTypeReader.readUInt32方法代碼示例

本文整理匯總了Java中org.mp4parser.tools.IsoTypeReader.readUInt32方法的典型用法代碼示例。如果您正苦於以下問題:Java IsoTypeReader.readUInt32方法的具體用法?Java IsoTypeReader.readUInt32怎麽用?Java IsoTypeReader.readUInt32使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.mp4parser.tools.IsoTypeReader的用法示例。


在下文中一共展示了IsoTypeReader.readUInt32方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    int fragmentCount = IsoTypeReader.readUInt8(content);

    for (int i = 0; i < fragmentCount; i++) {
        Entry entry = new Entry();
        if (getVersion() == 0x01) {
            entry.fragmentAbsoluteTime = IsoTypeReader.readUInt64(content);
            entry.fragmentAbsoluteDuration = IsoTypeReader.readUInt64(content);
        } else {
            entry.fragmentAbsoluteTime = IsoTypeReader.readUInt32(content);
            entry.fragmentAbsoluteDuration = IsoTypeReader.readUInt32(content);
        }
        entries.add(entry);
    }
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:18,代碼來源:TfrfBox.java

示例2: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);

    long entryCount = IsoTypeReader.readUInt32(content);

    for (int i = 0; i < entryCount; i++) {
        SubSampleEntry SubSampleEntry = new SubSampleEntry();
        SubSampleEntry.setSampleDelta(IsoTypeReader.readUInt32(content));
        int subsampleCount = IsoTypeReader.readUInt16(content);
        for (int j = 0; j < subsampleCount; j++) {
            SubSampleEntry.SubsampleEntry subsampleEntry = new SubSampleEntry.SubsampleEntry();
            subsampleEntry.setSubsampleSize(getVersion() == 1 ? IsoTypeReader.readUInt32(content) : IsoTypeReader.readUInt16(content));
            subsampleEntry.setSubsamplePriority(IsoTypeReader.readUInt8(content));
            subsampleEntry.setDiscardable(IsoTypeReader.readUInt8(content));
            subsampleEntry.setReserved(IsoTypeReader.readUInt32(content));
            SubSampleEntry.getSubsampleEntries().add(subsampleEntry);
        }
        entries.add(SubSampleEntry);
    }

}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:23,代碼來源:SubSampleInformationBox.java

示例3: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    trackId = IsoTypeReader.readUInt32(content);
    if ((getFlags() & 0x1) == 1) { //baseDataOffsetPresent
        baseDataOffset = IsoTypeReader.readUInt64(content);
    }
    if ((getFlags() & 0x2) == 0x2) { //sampleDescriptionIndexPresent
        sampleDescriptionIndex = IsoTypeReader.readUInt32(content);
    }
    if ((getFlags() & 0x8) == 0x8) { //defaultSampleDurationPresent
        defaultSampleDuration = IsoTypeReader.readUInt32(content);
    }
    if ((getFlags() & 0x10) == 0x10) { //defaultSampleSizePresent
        defaultSampleSize = IsoTypeReader.readUInt32(content);
    }
    if ((getFlags() & 0x20) == 0x20) { //defaultSampleFlagsPresent
        defaultSampleFlags = new SampleFlags(content);
    }
    if ((getFlags() & 0x10000) == 0x10000) { //durationIsEmpty
        durationIsEmpty = true;
    }
    if ((getFlags() & 0x20000) == 0x20000) { //defaultBaseIsMoof
        defaultBaseIsMoof = true;
    }
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:27,代碼來源:TrackFragmentHeaderBox.java

示例4: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
protected void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    groupingType = IsoTypeReader.read4cc(content);
    if (this.getVersion() == 1) {
        defaultLength = CastUtils.l2i(IsoTypeReader.readUInt32(content));
    }
    long entryCount = IsoTypeReader.readUInt32(content);
    while (entryCount-- > 0) {
        int length = defaultLength;
        if (this.getVersion() == 1) {
            if (defaultLength == 0) {
                length = CastUtils.l2i(IsoTypeReader.readUInt32(content));
            }
        } else {
            length = content.limit() - content.position(); 
        }
        ByteBuffer parseMe = content.slice();
        parseMe.limit(length);
        groupEntries.add(parseGroupEntry(parseMe, groupingType));
        int parsedBytes = this.getVersion() == 1 ? length : parseMe.position(); 
        content.position(content.position() + parsedBytes);
    }

}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:26,代碼來源:SampleGroupDescriptionBox.java

示例5: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    DTSSamplingFrequency = IsoTypeReader.readUInt32(content);
    maxBitRate = IsoTypeReader.readUInt32(content);
    avgBitRate = IsoTypeReader.readUInt32(content);
    pcmSampleDepth = IsoTypeReader.readUInt8(content);
    BitReaderBuffer brb = new BitReaderBuffer(content);
    frameDuration = brb.readBits(2);
    streamConstruction = brb.readBits(5);
    coreLFEPresent = brb.readBits(1);
    coreLayout = brb.readBits(6);
    coreSize = brb.readBits(14);
    stereoDownmix = brb.readBits(1);
    representationType = brb.readBits(3);
    channelLayout = brb.readBits(16);
    multiAssetFlag = brb.readBits(1);
    LBRDurationMod = brb.readBits(1);
    reservedBoxPresent = brb.readBits(1);
    reserved = brb.readBits(5);

}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:22,代碼來源:DTSSpecificBox.java

示例6: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    contentSize = content.limit();

    parseVersionAndFlags(content);
    long entry_count = IsoTypeReader.readUInt32(content);
    for (long i = 0; i < entry_count; i++) {
        Item item = new Item();
        if (getVersion() < 1) {
            item.item_ID = IsoTypeReader.readUInt16(content);
        } else {
            item.item_ID = IsoTypeReader.readUInt32(content);
        }
        int association_count = IsoTypeReader.readUInt8(content);
        for (int j = 0; j < association_count; j++) {
            Assoc assoc = new Assoc();
            int value, indexLength;
            if ((getFlags() & 1) == 1) {
                value = IsoTypeReader.readUInt16(content);
                indexLength = 15;
            } else {
                value = IsoTypeReader.readUInt8(content);
                indexLength = 7;
            }
            assoc.essential = value >> indexLength;
            assoc.property_index = value & ((1 << indexLength) - 1);
            item.associations.add(assoc);
        }
        items.add(item);
    }
}
 
開發者ID:yohhoy,項目名稱:heifreader,代碼行數:32,代碼來源:ItemPropertyAssociation.java

示例7: parseDetail

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void parseDetail(ByteBuffer bb) throws IOException {
    objectTypeIndication = IsoTypeReader.readUInt8(bb);

    int data = IsoTypeReader.readUInt8(bb);
    streamType = data >>> 2;
    upStream = (data >> 1) & 0x1;

    bufferSizeDB = IsoTypeReader.readUInt24(bb);
    maxBitRate = IsoTypeReader.readUInt32(bb);
    avgBitRate = IsoTypeReader.readUInt32(bb);


    BaseDescriptor descriptor;
    while (bb.remaining() > 2) { //1byte tag + at least 1byte size
        final int begin = bb.position();
        descriptor = ObjectDescriptorFactory.createFrom(objectTypeIndication, bb);
        final int read = bb.position() - begin;
        LOG.trace("{} - DecoderConfigDescr1 read: {}, size: {}", descriptor, read, descriptor != null ? descriptor.getSize() : null);
        if (descriptor != null) {
            final int size = descriptor.getSize();
            if (read < size) {
                //skip
                configDescriptorDeadBytes = new byte[size - read];
                bb.get(configDescriptorDeadBytes);
            }
        }
        if (descriptor instanceof DecoderSpecificInfo) {
            decoderSpecificInfo = (DecoderSpecificInfo) descriptor;
        } else if (descriptor instanceof AudioSpecificConfig) {
            audioSpecificInfo = (AudioSpecificConfig) descriptor;
        } else if (descriptor instanceof ProfileLevelIndicationDescriptor) {
            profileLevelIndicationDescriptors.add((ProfileLevelIndicationDescriptor) descriptor);
        }

    }

}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:39,代碼來源:DecoderConfigDescriptor.java

示例8: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    long sampleCount = IsoTypeReader.readUInt32(content);

    if ((getFlags() & 0x1) == 1) { //dataOffsetPresent
        dataOffset = CastUtils.l2i(IsoTypeReader.readUInt32(content));
    } else {
        dataOffset = -1;
    }
    if ((getFlags() & 0x4) == 0x4) { //firstSampleFlagsPresent
        firstSampleFlags = new SampleFlags(content);
    }

    for (int i = 0; i < sampleCount; i++) {
        Entry entry = new Entry();
        if ((getFlags() & 0x100) == 0x100) { //sampleDurationPresent
            entry.sampleDuration = IsoTypeReader.readUInt32(content);
        }
        if ((getFlags() & 0x200) == 0x200) { //sampleSizePresent
            entry.sampleSize = IsoTypeReader.readUInt32(content);
        }
        if ((getFlags() & 0x400) == 0x400) { //sampleFlagsPresent
            entry.sampleFlags = new SampleFlags(content);
        }
        if ((getFlags() & 0x800) == 0x800) { //sampleCompositionTimeOffsetPresent
            entry.sampleCompositionTimeOffset = content.getInt();
        }
        entries.add(entry);
    }

}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:33,代碼來源:TrackRunBox.java

示例9: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
protected void _parseDetails(ByteBuffer content) {
    dvVersionMajor = IsoTypeReader.readUInt8(content);
    dvVersionMinor = IsoTypeReader.readUInt8(content);
    int x = IsoTypeReader.readUInt16(content);
    dvProfile = (x >> 9) & 127;
    dvLevel = (x >> 3) & 63;
    rpuPresentFlag = (x & 0x4) > 0;
    elPresentFlag = (x & 0x2) > 0;
    blPresentFlag = (x & 0x1) > 0;
    reserved1 = IsoTypeReader.readUInt32(content);
    reserved2 = IsoTypeReader.readUInt32(content);
    reserved3 = IsoTypeReader.readUInt32(content);
    reserved4 = IsoTypeReader.readUInt32(content);
    reserved5 = IsoTypeReader.readUInt32(content);
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:16,代碼來源:DoViConfigurationBox.java

示例10: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    entries = new LinkedList<Entry>();
    while (content.remaining() >= 8) {
        Entry entry = new Entry(IsoTypeReader.readUInt32(content), IsoTypeReader.readUInt32(content));
        entries.add(entry);
    }
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:10,代碼來源:ProgressiveDownloadInformationBox.java

示例11: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    maxSamplePerFrame = IsoTypeReader.readUInt32(content);
    unknown1 = IsoTypeReader.readUInt8(content);
    sampleSize = IsoTypeReader.readUInt8(content);
    historyMult = IsoTypeReader.readUInt8(content);
    initialHistory = IsoTypeReader.readUInt8(content);
    kModifier = IsoTypeReader.readUInt8(content);
    channels = IsoTypeReader.readUInt8(content);
    unknown2 = IsoTypeReader.readUInt16(content);
    maxCodedFrameSize = IsoTypeReader.readUInt32(content);
    bitRate = IsoTypeReader.readUInt32(content);
    sampleRate = IsoTypeReader.readUInt32(content);
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:16,代碼來源:AppleLosslessSpecificBox.java

示例12: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    if (getVersion() == 1) {
        creationTime = DateHelper.convert(IsoTypeReader.readUInt64(content));
        modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content));
        trackId = IsoTypeReader.readUInt32(content);
        IsoTypeReader.readUInt32(content);
        duration = content.getLong();
    } else {
        creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content));
        modificationTime = DateHelper.convert(IsoTypeReader.readUInt32(content));
        trackId = IsoTypeReader.readUInt32(content);
        IsoTypeReader.readUInt32(content);
        duration = content.getInt();
    } // 196

    if (duration < -1) {
        LOG.warn("tkhd duration is not in expected range");
    }

    IsoTypeReader.readUInt32(content);
    IsoTypeReader.readUInt32(content);
    layer = IsoTypeReader.readUInt16(content);    // 204
    alternateGroup = IsoTypeReader.readUInt16(content);
    volume = IsoTypeReader.readFixedPoint88(content);
    IsoTypeReader.readUInt16(content);     // 212
    matrix = Matrix.fromByteBuffer(content);
    width = IsoTypeReader.readFixedPoint1616(content);    // 248
    height = IsoTypeReader.readFixedPoint1616(content);
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:32,代碼來源:TrackHeaderBox.java

示例13: SampleFlags

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
public SampleFlags(ByteBuffer bb) {
    long a = IsoTypeReader.readUInt32(bb);
    reserved = (byte) ((a & 0xF0000000) >> 28);
    isLeading = (byte) ((a & 0x0C000000) >> 26);
    sampleDependsOn = (byte) ((a & 0x03000000) >> 24);
    sampleIsDependedOn = (byte) ((a & 0x00C00000) >> 22);
    sampleHasRedundancy = (byte) ((a & 0x00300000) >> 20);
    samplePaddingValue = (byte) ((a & 0x000e0000) >> 17);
    sampleIsDifferenceSample = ((a & 0x00010000) >> 16) > 0;
    sampleDegradationPriority = (int) (a & 0x0000ffff);

}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:13,代碼來源:SampleFlags.java

示例14: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    parseVersionAndFlags(content);
    int entryCount = CastUtils.l2i(IsoTypeReader.readUInt32(content));

    sampleNumber = new long[entryCount];
    for (int i = 0; i < entryCount; i++) {
        sampleNumber[i] = IsoTypeReader.readUInt32(content);
    }
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:11,代碼來源:SyncSampleBox.java

示例15: _parseDetails

import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
    majorBrand = IsoTypeReader.read4cc(content);
    minorVersion = IsoTypeReader.readUInt32(content);
    int compatibleBrandsCount = content.remaining() / 4;
    compatibleBrands = new LinkedList<String>();
    for (int i = 0; i < compatibleBrandsCount; i++) {
        compatibleBrands.add(IsoTypeReader.read4cc(content));
    }
}
 
開發者ID:sannies,項目名稱:mp4parser,代碼行數:11,代碼來源:FileTypeBox.java


注:本文中的org.mp4parser.tools.IsoTypeReader.readUInt32方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。