Repository navigation
refactor: 使用来自 ffmpeg_audio 的 HTTP 播放源实现 - #133
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
将音频引擎的自研 HTTP Range 源替换为 ffmpeg_audio 提供的实现。
Changes:
- 升级
ffmpeg_audio至 0.3.0 并启用 HTTP、tracing。 - 接入
HttpAudioSource与HttpCancelHandle,删除原实现。 - 同步依赖锁文件及架构文档。
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
native/audio-engine/src/shared.rs |
管理新的取消句柄 |
native/audio-engine/src/player.rs |
调整加载、停止取消流程 |
native/audio-engine/src/lib.rs |
创建并传递取消句柄 |
native/audio-engine/src/http_source.rs |
删除自研 HTTP 源 |
native/audio-engine/src/decoder.rs |
接入上游 HTTP 音频源 |
native/audio-engine/Cargo.toml |
升级并配置依赖 |
Cargo.lock |
更新 Rust 依赖锁定 |
docs/native.md |
更新原生模块文档 |
CLAUDE.md |
更新架构说明 |
AGENTS.md |
更新代理开发指引 |
.github/copilot-instructions.md |
更新 Copilot 项目说明 |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
native/audio-engine/Cargo.toml:15
- 建议:删除自研
http_source后,项目源码已不再直接使用tokio-util,测试也不再使用httpmock,但两项仍保留在本文件第 40、50 行。请一并移除这些失效的直接依赖,避免继续维护并在测试构建中编译无用依赖。
ffmpeg_audio = { version = "0.3.1", default-features = false, features = [
"http",
"tracing",
] }
Comment on lines
+649
to
+651
| if let Some(h) = self.pending_load_handle.take() { | ||
| h.cancel(); | ||
| } |
imsyy
approved these changes
Aug 5, 2026
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.
改动类型
是否包含破坏性变更
改动说明
使用来自 ffmpeg-audio 的 HTTP 音频源实现,不重复造轮子
测试情况
在 Windows 上进行了充分的测试,包括频繁 Seek、切歌等
自查清单
pnpm format,并确认pnpm typecheck、pnpm lint通过pnpm build:native验证;未手写native/*/index.d.tsdev分支提交