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

fluent-ffmpeg / node-fluent-ffmpeg / 6889204749

16 Nov 2023 10:07AM UTC coverage: 84.691% (-6.1%) from 90.801%
6889204749

Pull #1235

github

web-flow
Merge a982927b9 into 4e02d1257
Pull Request #1235: V3 experiments

257 of 296 branches covered (0.0%)

1040 of 1228 new or added lines in 15 files covered. (84.69%)

1040 of 1228 relevant lines covered (84.69%)

8.44 hits per line

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

74.65
/src/capabilities.ts
1
import { FfmpegProcess } from './process'
1!
2
import {
1✔
3
  FfmpegCodecs,
1✔
4
  FfmpegEncoders,
1✔
5
  FfmpegFilters,
1✔
6
  FfmpegFormats
1✔
7
} from './utils/data-types'
1✔
8
import {
1✔
9
  extractCodecs,
1✔
10
  extractEncoders,
1✔
11
  extractFilters,
1✔
12
  extractFormats
1✔
13
} from './utils/parsing'
1✔
14
import { nlRegexp } from './utils/regexp'
1✔
15

1✔
16
export class FfmpegCapabilities {
2✔
17
  #codecs: FfmpegCodecs | null = null
2✔
18
  #formats: FfmpegFormats | null = null
2✔
19
  #filters: FfmpegFilters | null = null
2✔
20
  #encoders: FfmpegEncoders | null = null
2✔
21
  #decoders: FfmpegEncoders | null = null
2✔
22

2✔
23
  private async getLines(arg: string): Promise<string[]> {
2✔
24
    let { stdout } = await new FfmpegProcess({
2✔
25
      args: [arg],
2✔
26
      captureStdout: true
2✔
27
    }).run()
2✔
28

2✔
29
    return stdout.split(nlRegexp) || []
2!
30
  }
2✔
31

2✔
32
  async codecs() {
2✔
33
    if (!this.#codecs) {
2✔
34
      this.#codecs = extractCodecs(await this.getLines('-codecs'))
1✔
35
    }
1✔
36

2✔
37
    return this.#codecs
2✔
38
  }
2✔
39

2✔
40
  async formats() {
2✔
41
    if (!this.#formats) {
2✔
42
      this.#formats = extractFormats(await this.getLines('-formats'))
1✔
43
    }
1✔
44

2✔
45
    return this.#formats
2✔
46
  }
2✔
47

2✔
48
  async filters() {
2✔
NEW
49
    if (!this.#filters) {
×
NEW
50
      this.#filters = extractFilters(await this.getLines('-filters'))
×
NEW
51
    }
×
NEW
52

×
NEW
53
    return this.#filters
×
NEW
54
  }
×
55

2✔
56
  async encoders() {
2✔
NEW
57
    if (!this.#encoders) {
×
NEW
58
      this.#encoders = extractEncoders(await this.getLines('-encoders'))
×
NEW
59
    }
×
NEW
60

×
NEW
61
    return this.#encoders
×
NEW
62
  }
×
63

2✔
64
  async decoders() {
2✔
NEW
65
    if (!this.#decoders) {
×
NEW
66
      this.#decoders = extractEncoders(await this.getLines('-decoders'))
×
NEW
67
    }
×
NEW
68

×
NEW
69
    return this.#decoders
×
NEW
70
  }
×
71
}
2✔
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