@pictor-sdk/video-android 0.1.0
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/LICENSE +21 -0
- package/README.md +40 -0
- package/android/CMakeLists.txt +30 -0
- package/android/build.gradle +119 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/cpp/pictor_overlaystage.cpp +372 -0
- package/android/src/main/cpp/pictor_publish.cpp +87 -0
- package/android/src/main/cpp/pictor_videosurface.cpp +735 -0
- package/android/src/main/java/dev/pictor/video/AacPriming.kt +261 -0
- package/android/src/main/java/dev/pictor/video/AudioMixer.kt +1112 -0
- package/android/src/main/java/dev/pictor/video/AudioProbe.kt +162 -0
- package/android/src/main/java/dev/pictor/video/CadenceShaderProgram.kt +337 -0
- package/android/src/main/java/dev/pictor/video/CodecLedger.kt +126 -0
- package/android/src/main/java/dev/pictor/video/CompositionSpike.kt +978 -0
- package/android/src/main/java/dev/pictor/video/Diagnostics.kt +54 -0
- package/android/src/main/java/dev/pictor/video/EncoderGate.kt +476 -0
- package/android/src/main/java/dev/pictor/video/ExportGate.kt +1974 -0
- package/android/src/main/java/dev/pictor/video/ExportHeartbeat.kt +72 -0
- package/android/src/main/java/dev/pictor/video/ExportProgress.kt +103 -0
- package/android/src/main/java/dev/pictor/video/FrameClock.kt +591 -0
- package/android/src/main/java/dev/pictor/video/FramePending.kt +181 -0
- package/android/src/main/java/dev/pictor/video/GateAudio.kt +456 -0
- package/android/src/main/java/dev/pictor/video/GateDestination.kt +445 -0
- package/android/src/main/java/dev/pictor/video/GateFrames.kt +662 -0
- package/android/src/main/java/dev/pictor/video/GateMux.kt +185 -0
- package/android/src/main/java/dev/pictor/video/ManagedSources.kt +333 -0
- package/android/src/main/java/dev/pictor/video/Media3Player.kt +934 -0
- package/android/src/main/java/dev/pictor/video/MediaStoreSave.kt +419 -0
- package/android/src/main/java/dev/pictor/video/OverlayResources.kt +169 -0
- package/android/src/main/java/dev/pictor/video/PictorVideoModule.kt +1612 -0
- package/android/src/main/java/dev/pictor/video/PictorVideoPackage.kt +26 -0
- package/android/src/main/java/dev/pictor/video/PlaybackAnchor.kt +161 -0
- package/android/src/main/java/dev/pictor/video/PreviewAudioPlayer.kt +291 -0
- package/android/src/main/java/dev/pictor/video/PreviewConfig.kt +96 -0
- package/android/src/main/java/dev/pictor/video/PreviewMix.kt +396 -0
- package/android/src/main/java/dev/pictor/video/PreviewSync.kt +374 -0
- package/android/src/main/java/dev/pictor/video/PreviewTrace.kt +478 -0
- package/android/src/main/java/dev/pictor/video/PrimingTrim.kt +337 -0
- package/android/src/main/java/dev/pictor/video/RepeatingEncoderFactory.kt +97 -0
- package/android/src/main/java/dev/pictor/video/SceneProgram.kt +169 -0
- package/android/src/main/java/dev/pictor/video/SceneProgramNative.kt +299 -0
- package/android/src/main/java/dev/pictor/video/SkiaPassThroughEffect.kt +695 -0
- package/android/src/main/java/dev/pictor/video/SurfaceAttachment.kt +110 -0
- package/android/src/main/java/dev/pictor/video/ThumbnailDecoder.kt +171 -0
- package/android/src/main/java/dev/pictor/video/VideoSurface.kt +394 -0
- package/app.plugin.js +43 -0
- package/dist/index.d.mts +3622 -0
- package/dist/index.d.ts +3622 -0
- package/dist/index.js +3737 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3625 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +82 -0
- package/plugin/gradleProperties.d.ts +19 -0
- package/plugin/gradleProperties.js +64 -0
- package/react-native.config.js +13 -0
- package/src/NativePictorVideo.ts +574 -0
- package/src/audioProbe.ts +72 -0
- package/src/compositionSpike.ts +305 -0
- package/src/convergence.ts +112 -0
- package/src/encoderGate.ts +66 -0
- package/src/exportDestination.ts +149 -0
- package/src/exportJob.ts +232 -0
- package/src/exportProgress.ts +391 -0
- package/src/exportProgressPump.ts +190 -0
- package/src/exporter.ts +655 -0
- package/src/index.ts +276 -0
- package/src/managedSources.ts +252 -0
- package/src/media3.ts +412 -0
- package/src/mediaStore.ts +177 -0
- package/src/memoryGuard.ts +118 -0
- package/src/mixSources.ts +82 -0
- package/src/overlayStaging.ts +216 -0
- package/src/playbackLifecycle.ts +137 -0
- package/src/player.ts +39 -0
- package/src/playlistSession.ts +125 -0
- package/src/previewAudioDiagnostics.ts +67 -0
- package/src/previewAudioSession.ts +168 -0
- package/src/previewCadence.ts +950 -0
- package/src/previewMix.ts +212 -0
- package/src/previewTrace.ts +348 -0
- package/src/spikeExcursions.ts +405 -0
- package/src/submissionScoring.ts +680 -0
- package/src/surfaceOwner.ts +264 -0
- package/src/surfaceRecovery.ts +121 -0
- package/src/syncTrace.ts +189 -0
- package/src/thumbnailProvider.ts +163 -0
- package/src/tracePhases.ts +217 -0
- package/src/useCompositionPlayback.ts +327 -0
- package/src/useMedia3Playback.ts +492 -0
- package/src/usePreviewAudio.ts +305 -0
- package/src/useVideoSurface.ts +282 -0
package/app.plugin.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// `@expo/config-plugins`, not `expo/config-plugins`. The two are the same
|
|
2
|
+
// module, but the `expo/` alias only resolves from a directory that has `expo`
|
|
3
|
+
// in its own resolution path — which a package inside a pnpm workspace, or
|
|
4
|
+
// inside a consumer's strict node_modules, does not. It is declared as an
|
|
5
|
+
// optional peer for the same reason: a host that never prebuilds does not need
|
|
6
|
+
// it, and a host that does already has it through `expo`.
|
|
7
|
+
const { createRunOncePlugin, withGradleProperties } = require('@expo/config-plugins')
|
|
8
|
+
|
|
9
|
+
const pkg = require('./package.json')
|
|
10
|
+
const { MIN_SDK_VERSION, withMinSdkVersion } = require('./plugin/gradleProperties')
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The build settings this adapter needs, applied by prebuild rather than by hand.
|
|
14
|
+
*
|
|
15
|
+
* Installing `@pictor-sdk/video-android` raises a host's `minSdkVersion`, and there
|
|
16
|
+
* is exactly one honest place to say so: here. The alternative — editing
|
|
17
|
+
* `android/gradle.properties` after prebuilding — survives until the next
|
|
18
|
+
* `expo prebuild --clean`, and then the build fails somewhere that does not
|
|
19
|
+
* mention this package.
|
|
20
|
+
*
|
|
21
|
+
* ## What it does not do
|
|
22
|
+
*
|
|
23
|
+
* No manifest changes. The adapter needs no permission: it opens whatever URI
|
|
24
|
+
* the host hands it, and a host that reads from the gallery is responsible for
|
|
25
|
+
* its own access. Adding `READ_MEDIA_VIDEO` here would give every consumer a
|
|
26
|
+
* permission most of them do not want, to support a case none of them asked
|
|
27
|
+
* for. Nothing about the surface, the decoder or the external texture needs a
|
|
28
|
+
* manifest entry either.
|
|
29
|
+
*
|
|
30
|
+
* `createRunOncePlugin` means a host that both installs the package and lists it
|
|
31
|
+
* in `plugins` gets it applied once, not twice.
|
|
32
|
+
*
|
|
33
|
+
* @type {import('@expo/config-plugins').ConfigPlugin<{ minSdkVersion?: number } | void>}
|
|
34
|
+
*/
|
|
35
|
+
const withPictorVideoAndroid = (config, props) => {
|
|
36
|
+
const required = props && props.minSdkVersion ? props.minSdkVersion : MIN_SDK_VERSION
|
|
37
|
+
return withGradleProperties(config, (gradle) => {
|
|
38
|
+
gradle.modResults = withMinSdkVersion(gradle.modResults, required)
|
|
39
|
+
return gradle
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
module.exports = createRunOncePlugin(withPictorVideoAndroid, pkg.name, pkg.version)
|