{"id":50445220,"url":"https://github.com/saltifydev/acidify-codec","last_synced_at":"2026-05-31T21:02:09.632Z","repository":{"id":337235691,"uuid":"1152792099","full_name":"SaltifyDev/acidify-codec","owner":"SaltifyDev","description":"LagrangeCodec 的 Kotlin 绑定","archived":false,"fork":false,"pushed_at":"2026-02-08T13:11:43.000Z","size":27656,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T20:08:19.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SaltifyDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-08T12:51:27.000Z","updated_at":"2026-02-08T13:11:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/SaltifyDev/acidify-codec","commit_stats":null,"previous_names":["saltifydev/acidify-codec"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/SaltifyDev/acidify-codec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaltifyDev%2Facidify-codec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaltifyDev%2Facidify-codec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaltifyDev%2Facidify-codec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaltifyDev%2Facidify-codec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaltifyDev","download_url":"https://codeload.github.com/SaltifyDev/acidify-codec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaltifyDev%2Facidify-codec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33748607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T21:02:06.448Z","updated_at":"2026-05-31T21:02:09.623Z","avatar_url":"https://github.com/SaltifyDev.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# acidify-codec\n\n[LagrangeCodec](https://github.com/LagrangeDev/LagrangeCodec) 的 Kotlin 绑定，支持 JVM 和 Native (Windows / macOS / Linux) 平台。\n\n## 用法\n\n此项目提供了一些对图像、音频和视频进行识别和编码的 API：\n\n- `getImageInfo` - 获取图像的格式、尺寸信息\n- `audioToPcm` - 将音频数据解码为 PCM 格式\n- `silkEncode` 和 `silkDecode` - Silk 音频和 PCM 的相互转换\n- `calculatePcmDuration` - 计算 PCM 音频的时长\n- `getVideoInfo` - 获取视频的尺寸、时长信息\n- `getVideoFirstFrameJpg` - 以 JPEG 格式获取视频的第一帧图像\n\n这些功能在编写 QQ 协议端时非常有用。\n\n## 项目实现\n\n在 JVM 平台，该模块使用 JNA 调用 LagrangeCodec 的动态链接库；在 Native 平台，该模块通过 Kotlin C Interop 静态链接 LagrangeCodec 的静态库。JVM 平台的 jar 文件已经将动态库文件包含在内。\n\n项目的 `src/jvmMain/resources` 目录下包含了各个平台的动态库文件；`src/nativeInterop/lib` 目录下包含了各个平台的静态库文件。静态库文件编译自 [Wesley-Young/LagrangeCodec](https://github.com/Wesley-Young/LagrangeCodec) 仓库，对原仓库的构建逻辑进行了一些调整以适应 Kotlin/Native 链接静态库的需求。\n\n## 已知问题\n\n在链接 `mingwX64` 目标的应用程序时，**必须**指定如下的 `linkerOpts`：\n\n```\n-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic\n```\n\n否则程序启动时会报错，提示缺失 `libstdc++-6.dll`。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltifydev%2Facidify-codec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltifydev%2Facidify-codec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltifydev%2Facidify-codec/lists"}