-
Notifications
You must be signed in to change notification settings - Fork 10
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
Adapt to mp4ff v0.46.0 #26
Conversation
Thanks for your contribution, but the |
You are right. I restored the original function signature to avoid the breaking change and added a wrapper on top of it for the new functionnality. Readme now refers to the wrapper. |
Please check the CI error: |
This is what I was talking about. I have no clue, could you take a look ? |
my code: hasSenc, isParsed := traf.ContainsSencBox()
if !hasSenc {
// if not encrypted, do nothing
continue
} mp4ff code: hasSenc, isParsed := traf.ContainsSencBox()
if !hasSenc {
return fmt.Errorf("no senc box in traf")
} I initially implemented a skip instead of returning an error for this because the Spotify sample I used is unencrypted for the first few seconds and encrypted afterward. |
I knew you would have better insight than me on that audio sample :) So to fix it there is to 2 ways :
Even without the possibility of using Golang errors comparaison, I still prefer the second option. It keeps the duplicated code minimal. But in definitive it is your codebase and the choice should be yours. I will push my working commit of the second option, tell me if this is ok for you. |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #26 +/- ##
==========================================
- Coverage 72.37% 68.19% -4.18%
==========================================
Files 5 5
Lines 438 327 -111
==========================================
- Hits 317 223 -94
+ Misses 68 62 -6
+ Partials 53 42 -11 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hello,
mp4ff had a massive rework on its functions set in its v0.40.0 release :
DecryptSampleCenc
does not exist anymoreCryptSampleCenc
But internaly a lot changed to hide the complexity and provide a cleaner high level access. So instead of just replacing the function and leaving the decrypt code that was inspired by the v0.39.0 decrypt utility, I started from scratch from the same utility but in v0.46.0, resulting on a much smaller code base to replicate.
The only change I made to the API, was to allow the slice of keys from the widevine license (and automatically select the content key from it) as input instead of the right key in bytes. The example in readme has been updated to reflect this change.
Tests for decrypts work fine for 3 of 4 samples. The audio sample does not pass the test but I am unable to know why. As you created those samples you might get why better than me.