Repository navigation
[video_player_avplay] Handle consecutive seekTo calls - #1152
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e56086814f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
xiaowei-guan
left a comment
There was a problem hiding this comment.
Inline details for my previous review. Two items cannot be anchored to this diff: restore() doesn't cancel seeks (unchanged code, video_player_tizen.dart:394), and no integration tests were added for consecutive seekTo / dispose-during-seek.
- Document play/pause idempotency in CHANGELOG - Cancel pending seeks in restore() as in dispose()/suspend() - Report seek cancellation as StateError with per-lifecycle wording - Drop the no-op SendSeekCompleted from PlusPlayer::StopAndClose Co-Authored-By: Cline SR
Verified on Tizen 9.0. All other comments have been addressed. |
Main changes:
Track active and pending
seekoperations in the Dart FFI implementation so only onenative seekis in flight per player. Coalesce consecutiveseekTorequests to the latestpendingposition, complete all waitingfutureswhen theseekfinishes, and failpending seekswhen the player isdisposedor reports an error.Send a
seekCompletedevent from native code so Dart can complete theactive seekand start anypending seek.