Examples of SourceBlockState


Examples of net.fec.openrq.decoder.SourceBlockState

        try {
            final int sbn = readSBN(buffer, fecParams);
            final int K = DataUtils.getK(fecParams, sbn);

            final SourceBlockState state = readState(buffer);

            final int numMiss = readNumMissingSourceSymbols(buffer, K, state);
            final Set<Integer> missing = readMissingSourceSymbols(buffer, numMiss, K);

            final int numAvail = readNumAvailableRepairSymbols(buffer, K, state);
View Full Code Here

Examples of net.fec.openrq.decoder.SourceBlockState

        try {
            final int sbn = readSBN(in, fecParams);
            final int K = DataUtils.getK(fecParams, sbn);

            final SourceBlockState state = readState(in);

            final int numMiss = readNumMissingSourceSymbols(in, K, state);
            final Set<Integer> missing = readMissingSourceSymbols(in, numMiss, K);

            final int numAvail = readNumAvailableRepairSymbols(in, K, state);
View Full Code Here

Examples of net.fec.openrq.decoder.SourceBlockState

            final ByteBuffer sbnAndStateBuf = ByteBuffer.allocate(SizeOf.BYTE + SizeOf.BYTE);
            ExtraChannels.readBytes(ch, sbnAndStateBuf, BufferOperation.FLIP_ABSOLUTELY);

            final int sbn = readSBN(sbnAndStateBuf, fecParams);
            final int K = DataUtils.getK(fecParams, sbn);
            final SourceBlockState state = readState(sbnAndStateBuf);

            final ByteBuffer numMissBuf = ByteBuffer.allocate(SizeOf.SHORT);
            ExtraChannels.readBytes(ch, numMissBuf, BufferOperation.FLIP_ABSOLUTELY);

            final int numMiss = readNumMissingSourceSymbols(numMissBuf, K, state);
View Full Code Here

Examples of net.fec.openrq.decoder.SourceBlockState

        if (buf.remaining() < SizeOf.BYTE) {
            throw new InternalParsingException("source block state is missing");
        }

        final SourceBlockState state = byteToState(buf.get());
        return checkState(state);
    }
View Full Code Here

Examples of net.fec.openrq.decoder.SourceBlockState

        return checkState(state);
    }

    private static SourceBlockState readState(DataInput in) throws IOException, InternalParsingException {

        final SourceBlockState state = byteToState(in.readByte());
        return checkState(state);
    }
View Full Code Here

Examples of net.fec.openrq.decoder.SourceBlockState

        for (SourceBlockEncoder sbEnc : enc.sourceBlockIterable()) {
            final int K = sbEnc.numberOfSourceSymbols();
            final Set<Integer> esis = TestingCommon.randomAnyESIs(RAND, K + MAX_EXTRA_SYMBOLS);
            final Iterator<Integer> esiIter = esis.iterator();
            SourceBlockState sbState = SourceBlockState.INCOMPLETE;

            // this should loop K times
            while (sbState == SourceBlockState.INCOMPLETE) {
                final EncodingPacket packet = sbEnc.encodingPacket(esiIter.next());
                final SourceBlockDecoder sbDec = dec.sourceBlock(packet.sourceBlockNumber());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.