(format: AVSampleFormat)
| 431 | } |
| 432 | |
| 433 | private getBytesPerSample(format: AVSampleFormat): number { |
| 434 | switch (format) { |
| 435 | case AV_SAMPLE_FMT_U8: |
| 436 | case AV_SAMPLE_FMT_U8P: |
| 437 | return 1; |
| 438 | case AV_SAMPLE_FMT_S16: |
| 439 | case AV_SAMPLE_FMT_S16P: |
| 440 | return 2; |
| 441 | case AV_SAMPLE_FMT_S32: |
| 442 | case AV_SAMPLE_FMT_S32P: |
| 443 | case AV_SAMPLE_FMT_FLT: |
| 444 | case AV_SAMPLE_FMT_FLTP: |
| 445 | return 4; |
| 446 | default: |
| 447 | return 4; // Default to 4 bytes |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | private formatIsPlanar(format: AVSampleFormat): boolean { |
| 452 | switch (format) { |
no outgoing calls
no test coverage detected