• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

benrr101 / node-taglib-sharp / 48390938

29 Oct 2023 03:32AM UTC coverage: 92.535% (+0.09%) from 92.443%
48390938

push

appveyor

benrr101
Cleanup docs for MPEG4

3244 of 4129 branches covered (0.0%)

Branch coverage included in aggregate %.

8 of 8 new or added lines in 3 files covered. (100.0%)

26727 of 28260 relevant lines covered (94.58%)

423.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

30.0
/src/mpeg4/boxes/isoSampleEntry.ts
1
import Mpeg4Box from "./mpeg4Box";
1✔
2
import Mpeg4BoxHeader from "../mpeg4BoxHeader";
3
import {File} from "../../file";
4
import {Guards} from "../../utils";
1✔
5
import {ByteVector} from "../../byteVector";
6

7
/**
8
 * This class extends {@link Mpeg4Box} to provide an implementation of a ISO/IEC 14496-12 SampleEntry.
9
 */
10
export default abstract class IsoSampleEntry extends Mpeg4Box {
1✔
11
    private _dataReferenceIndex: number;
12

13
    /**
14
     * Protected constructor to force construction via static functions.
15
     */
16
    protected constructor() {
17
        super();
×
18
    }
19

20
    /**
21
     * Constructs and initializes a new instance of {@link IsoSampleEntry} with a provided header and
22
     * handler by reading the contents from a specified file.
23
     * @param header A {@link Mpeg4BoxHeader} object containing the header to use for the new instance.
24
     * @param file A {@link File} object to read the contents of the box from.
25
     * @param handlerType Type of the handler box object containing the handler that applies to the
26
     *     new instance, or undefined if no handler applies.
27
     */
28
    public initializeFromHeaderFileAndHandler(header: Mpeg4BoxHeader, file: File, handlerType: ByteVector): void {
29
        Guards.truthy(file, "file");
×
30

31
        this.initializeFromHeader(header, handlerType);
×
32
        const dataPositionBeforeIncrease = this.increaseDataPosition(8);
×
33
        file.seek(dataPositionBeforeIncrease + 6);
×
34
        this._dataReferenceIndex = file.readBlock(2).toUshort();
×
35
    }
36

37
    /**
38
     * Gets the data reference index of the current instance.
39
     */
40
    public get dataReferenceIndex(): number { return this._dataReferenceIndex; }
×
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc