Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

refactor: move all mp4 test to mp4_test package for black-box testing #415

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

tobbee
Copy link
Collaborator

@tobbee tobbee commented Mar 4, 2025

Almost all tests in the mp4 package were already black-box tests, but not all.
After pondering on Issue #414, I think that it would be useful to make them black-box testing.
That is what this PR does.

A similar approach should be taken to the other repos.

All forks with a different domain, need to make a global replacement of paths in the _test.go files, but that should be relatively easy to automate.

During this work, some other changes were needed, or felt natural:

Changed

  • Replaced mp4.AlouBox and mp4.TlouBox with a common mp4.LoudnessBaseBox
  • mp4.Measurement changed to clearer mp4.LoudnessMeasurement

Added

  • Exported constants for ColrBox's ColorType
  • mp4.NewFreeBox, mp4.NewSkipBox functions
  • mp4.FreeBox.Payload method
  • New mp4.SencBox methods: SetPerSampleIVSize, PerSampleIVSize, and ReadButNotParsed
  • New function mp4.CreateUnknownBox
  • New functions mp4.NewTfrfBox and mp4.NewTfxdBox

- Replaced mp4.AlouBox and mp4.TlouBox with a common mp4.LoudnessBaseBox
- mp4.Measurement changed to clearer mp4.LoudnessMeasurement
- New Exported constants for ColrBox's ColorType
- New mp4.NewFreeBox, mp4.NewSkipBox functions
- New mp4.FreeBox.Payload method
- New mp4.SencBox methods: SetPerSampleIVSize, PerSampleIVSize, and ReadButNotParsed
- New function mp4.CreateUnknownBox
- New functions mp4.NewTfrfBox and mp4.NewTfxdBox
@tobbee tobbee force-pushed the mp4-blackbox-test branch from 00aec5f to b24e7b5 Compare March 9, 2025 21:35
@tobbee tobbee merged commit 213c4f9 into master Mar 10, 2025
9 checks passed
@tobbee tobbee deleted the mp4-blackbox-test branch March 10, 2025 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant