Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Exclude AC3 and HEVC remuxing from light build #6944

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jan 4, 2025

This PR will...

  • Exclude AC3 and HEVC remuxing from light build
  • Improve demux/remux types and type mp4-generator args
  • Use plain object for MP4 samples

Why is this Pull Request needed?

AC3 and HEVC mp4 generator code should be excluded from light as demuxing is.

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

Improve demux/remux types and type mp4-generator args
@robwalch robwalch added this to the 1.6.0 milestone Jan 4, 2025
@robwalch
Copy link
Collaborator Author

robwalch commented Jan 4, 2025

cc @devoldemar

@robwalch robwalch merged commit 1dee99c into master Jan 8, 2025
16 checks passed
@robwalch robwalch deleted the task/transmuxer-types-and-ts-light-enhancements branch January 8, 2025 19:21
@devoldemar
Copy link
Contributor

HEVC remux is still present as a piece of code.
What about the following solution?

Create file, e.g. mp4-advanced.ts, in the same folder where mp4-generator.ts

import type {
  DemuxedHEVC
} from '../types/demuxer';

type Class = { new(): any };

class MP4A {
  static hvc1(MP4: Class, track: DemuxedHEVC) {
    // ... here's the scenario for building hvc1 atom
  }
}
export class MP4A;

In build-config.js:

if (!addM2TSAdvancedCodecSupport) {
  aliases = {
    ...
    './mp4-advanced': `../${emptyFile}`,
  };
}

In mp4-generator.ts:

import { MP4A } from './mp4-advanced';
...
static hvc1(track: DemuxedHEVC) {
  if (!__USE_M2TS_ADVANCED_CODECS__) {
    return new Uint8Array();
  }
  return MP4A.hvc1(MP4, track);
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants