Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / media / AGENTS.md
| 1 | # AGENTS.md — library/media/ (':library:media') |
| 2 | |
| 3 | > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/media/` + allowed shared modules. Do not root-scan. |
| 4 | |
| 5 | - Gradle: :library:media / dir: library/media/ |
| 6 | - Package roots present: (audio codecs — one package, pure Kotlin/Java) |
| 7 | - Entry files: OpusTranscoder.kt (no MainActivity/Route — library) |
| 8 | - Deps: (none) |
| 9 | - Metadata: metadata_data/library-media.md (absent — libraries have none by design) |
| 10 | - Rust: no / screenshotTest: no |
| 11 | |
| 12 | ## Overview |
| 13 | **Purpose:** Pure-JVM audio plumbing — Opus encode/remux/tag (Ogg), PCM buffers, polyphase resampling, Vorbis comments. Used by music/cast/communicate recording and playback paths. |
| 14 | **How to use:** Transcode via `OpusTranscoder`, remux via `OpusRemuxer`, tag via `OggOpusTagger` + `VorbisComments`; resample with `PolyphaseResampler`. |
| 15 | **Entry points:** `OpusTranscoder.kt` → `OpusRemuxer.kt` → `OggOpusTagger.kt`. |
| 16 | **Gotchas:** Keep it dependency-free (no Android media APIs) so it stays unit-testable on JVM. |
| 17 | |
| 18 | ## Key files |
| 19 | - com/vayunmathur/library/media/OpusTranscoder.kt |
| 20 | - com/vayunmathur/library/media/OpusRemuxer.kt |
| 21 | - com/vayunmathur/library/media/OggOpusTagger.kt |
| 22 | - com/vayunmathur/library/media/OggStreamWriter.kt |
| 23 | - com/vayunmathur/library/media/OpusHead.kt |
| 24 | - com/vayunmathur/library/media/PcmBuffers.kt |
| 25 | - com/vayunmathur/library/media/PolyphaseResampler.kt |
| 26 | - com/vayunmathur/library/media/VorbisComments.kt |
| 27 | - com/vayunmathur/library/media/ByteArrayMediaDataSource.kt |
| 28 | |
| 29 | ## Verify (this module only) |
| 30 | ``` |
| 31 | ./gradlew :library:media:compileDevKotlin |
| 32 | ./gradlew :library:media:lint |
| 33 | ``` |