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

benrr101 / node-taglib-sharp / 48387633

28 Oct 2023 05:34AM UTC coverage: 92.442% (+0.5%) from 91.899%
48387633

push

appveyor

web-flow
Merge 6a78b5713 into f0c9477b7

3250 of 4147 branches covered (0.0%)

Branch coverage included in aggregate %.

1763 of 1763 new or added lines in 39 files covered. (100.0%)

26753 of 28309 relevant lines covered (94.5%)

422.49 hits per line

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

23.53
/src/mpeg4/boxes/isoVisualSampleEntry.ts
1
import IsoSampleEntry from "./isoSampleEntry";
1✔
2
import Mpeg4BoxHeader from "../mpeg4BoxHeader";
3
import {ByteVector, StringType} from "../../byteVector";
1✔
4
import {File} from "../../file";
5
import {IVideoCodec, MediaTypes} from "../../properties";
1✔
6

7
/**
8
 * This class extends @see IsoSampleEntry and implements @see IVideoCodec to provide an implementation of a
9
 * ISO/IEC 14496-12 VisualSampleEntry and support for reading MPEG-4 video properties.
10
 */
11
export default class IsoVisualSampleEntry extends IsoSampleEntry implements IVideoCodec {
1✔
12
    private _videoHeight: number;
13
    private _videoWidth: number;
14

15
    /**
16
     * Private constructor to force construction via static functions.
17
     */
18
    private constructor() {
19
        super();
×
20
    }
21

22
    public static fromHeaderFileAndHandler(
23
        header: Mpeg4BoxHeader,
24
        file: File,
25
        handlerType: ByteVector
26
    ): IsoVisualSampleEntry {
27
        const instance = new IsoVisualSampleEntry();
×
28
        instance.initializeFromHeaderFileAndHandler(header, file, handlerType);
×
29

30
        const dataPositionBeforeIncrease = instance.increaseDataPosition(62);
×
31
        file.seek(dataPositionBeforeIncrease + 16);
×
32
        instance._videoWidth = file.readBlock(2).toUshort();
×
33
        instance._videoHeight = file.readBlock(2).toUshort();
×
34

35
        return instance;
×
36
    }
37

38
    /** @inheritDoc */
39
    public get durationMilliseconds(): number { return 0; }
×
40

41
    /** @inheritDoc */
42
    public get mediaTypes(): MediaTypes { return MediaTypes.Video; }
×
43

44
    /** @inheritDoc */
45
    // @TODO: I'm sure we can get a better description than this
46
    public get description(): string { return `MPEG-4 Video (${this.boxType.toString(StringType.Latin1)})`; }
×
47

48
    /** @inheritDoc */
49
    public get videoHeight(): number { return this._videoHeight };
×
50

51
    /** @inheritDoc */
52
    public get videoWidth(): number { return this._videoWidth; }
×
53
}
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

© 2025 Coveralls, Inc