@pictor-sdk/video-android 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +36 -9
- package/android/consumer-rules.pro +47 -0
- package/android/src/main/AndroidManifest.xml +15 -1
- package/android/src/main/cpp/pictor_videosurface.cpp +88 -8
- package/android/src/main/java/dev/pictor/video/AudioMixer.kt +39 -4
- package/android/src/main/java/dev/pictor/video/BoundedWait.kt +89 -0
- package/android/src/main/java/dev/pictor/video/CadenceShaderProgram.kt +29 -0
- package/android/src/main/java/dev/pictor/video/ExportGate.kt +421 -44
- package/android/src/main/java/dev/pictor/video/GateLadder.kt +405 -0
- package/android/src/main/java/dev/pictor/video/MediaStoreSave.kt +216 -9
- package/android/src/main/java/dev/pictor/video/PictorVideoModule.kt +13 -0
- package/android/src/main/java/dev/pictor/video/RunRegistry.kt +108 -0
- package/android/src/main/java/dev/pictor/video/SkiaPassThroughEffect.kt +4 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/plugin/gradleProperties.js +9 -6
- package/src/NativePictorVideo.ts +11 -0
- package/src/exporter.ts +41 -3
package/dist/index.mjs
CHANGED
|
@@ -1797,9 +1797,10 @@ function createMedia3VideoExporter(options) {
|
|
|
1797
1797
|
);
|
|
1798
1798
|
}
|
|
1799
1799
|
const resources = overlayPlan.resources;
|
|
1800
|
+
const viaMedia3 = options.videoSpeedVia === "media3";
|
|
1800
1801
|
const shards = plan.map((shard, index) => {
|
|
1801
1802
|
const clip = playable[index];
|
|
1802
|
-
const cadence = cadenceFor(shard.plan.frames);
|
|
1803
|
+
const cadence = viaMedia3 && clip.speed !== 1 ? null : cadenceFor(shard.plan.frames);
|
|
1803
1804
|
return {
|
|
1804
1805
|
uri: uris[index],
|
|
1805
1806
|
startMs: Math.round(clip.sourceIn / 1e3),
|
|
@@ -1818,11 +1819,19 @@ function createMedia3VideoExporter(options) {
|
|
|
1818
1819
|
What matters is that the *source's* audio never enters this pipeline:
|
|
1819
1820
|
a per-shard audio track has to be re-encoded to concatenate, which is
|
|
1820
1821
|
what put a second generation on everything the user hears.
|
|
1822
|
+
|
|
1823
|
+
`ExportGate` notes that `setRemoveAudio` beside a speed change is a
|
|
1824
|
+
combination Media3 warns about, and that was tried as a candidate
|
|
1825
|
+
fix for the high-rate export stall: giving the re-timing the real
|
|
1826
|
+
stream instead of silence. It made no difference to the fault — the
|
|
1827
|
+
encoder stopped at exactly the same place — so the change was
|
|
1828
|
+
reverted rather than kept for a benefit that could not be shown.
|
|
1829
|
+
See `docs/research/export-speed-stall.md`.
|
|
1821
1830
|
*/
|
|
1822
1831
|
forceAudioTrack: true,
|
|
1823
1832
|
removeAudio: true,
|
|
1824
|
-
emitsPerInput: cadence
|
|
1825
|
-
outputPtsUs: cadence
|
|
1833
|
+
emitsPerInput: cadence?.emitsPerInput,
|
|
1834
|
+
outputPtsUs: cadence?.outputPtsUs,
|
|
1826
1835
|
spanUs: Math.round(shard.plan.frameCount * 1e6 / fps)
|
|
1827
1836
|
};
|
|
1828
1837
|
});
|