feat: render TikTok photo posts into a video, and release 1.6.0 - #20
Merged
Conversation
…ixels Budget total pixels when choosing inSampleSize: the previous per-axis guard joined both axes with && , so it never fired for a landscape source against a portrait frame and a 4032x3024 photo decoded at full size. Catch Throwable in the channel handler. An OutOfMemoryError is an Error, so it escaped, killed the worker thread and left MethodChannel.Result never completed - crashing the app and hanging the Dart future. Add frameColorAt and assert the decoded frame colours plus a file-size ceiling. Every previous assertion passed against a deliberate U/V swap. Derive the queueInputBuffer size from the planes' rowStride, guard both retriever entry points to local files, and bound the cause-chain walk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renders a TikTok photo post's images and music into one MP4 on the device, and
releases it as 1.6.0.
What this adds
1080x1920 H.264 MP4 at three seconds an image, with the post's music
transcoded to AAC and muxed alongside it.
split off ahead of the download queue and rendered instead. The finished file
enters history as a file that already exists.
outside the download queue and neither the progress bar nor the Cancel button
could reach it.
cannot tell Android from iOS — both have
dart.library.io— so a runtimePlatform.isAndroidcheck in the renderer is what narrows support, and iOS,desktop and Web see no slideshow row at all.
Design notes worth reviewing
MediaMuxerrefusesboth MP3 in an MP4 and any track added after
start(), so the whole track istranscoded and buffered first. A track that will not decode therefore cannot
damage the picture: the render carries on and produces a silent video with a
note on it.
downloadUrlis the post URL, not empty. An empty oneis the shape that 404s if anything ever fetches it.
while a failed task is persisted, so a retry after a restart recovers the
source from the post rather than falling through to the download path.
Verification
tool/check_all.ps1passes all 7 steps on this branch: 261 unit tests, 20Android integration tests on an emulator, release Web build, Node tests,
formatting and analysis.
No pre-existing test was edited —
git diffagainst the previousmainfortest/andintegration_test/is additions only, zero deletions.Release
The final commit bumps to 1.6.0 with matching changelog notes, so merging this
starts the release workflow. The workflow's own three gates were checked
locally first: the changelog section is present and non-empty,
v1.6.0doesnot exist, and the version increases over 1.5.2.
Merge with
--rebaseto keepmainlinear.