package net.katsuster.strview.media.ts;

import net.katsuster.strview.util.*;
import net.katsuster.strview.media.*;

/**
 * @author katsuhiro
 */
public class TSPacketList extends AbstractLargeList<TSPacket> {
    private LargeBitList buf;

    public TSPacketList() {
        super(LENGTH_UNKNOWN);
    }

    public TSPacketList(LargeBitList l) {
        super(LENGTH_UNKNOWN);

        buf = l;
    }

    @Override
    public void count() {
        length(buf.length() / 188 / 8);
    }

    @Override
    protected TSPacket getInner(long index) {
        TSPacket p = new TSPacket();
        FromBitListConverter c = new FromBitListConverter(buf);

        c.position(index * 188 * 8);
        p.setNumber(index);
        p.setLevel(0);
        p.read(c);

        return p;
    }

    @Override
    protected void setInner(long index, TSPacket data) {

    }
}

@@ -114,16 +114,73 @@
 *;%0A%0A/**%0A
+ * %3Cp%3E%0A * MPEG2-TS(Transport Stream) %E3%83%91%E3%82%B1%E3%83%83%E3%83%88%E3%83%AA%E3%82%B9%E3%83%88%E3%80%82%0A * %3C/p%3E%0A *%0A
  * @auth

Add comments.