Skip to content

[video_player_avplay] Handle consecutive seekTo calls - #1152

Merged
gin7773 merged 9 commits into
flutter-tizen:mainfrom
gin7773:avplay/seekTo
Sep 23, 2026
Merged

gin7773 merged 9 commits into
flutter-tizen:mainfrom
gin7773:avplay/seekTo

Conversation

@gin7773

@gin7773 gin7773 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Main changes:

Track active and pending seek operations in the Dart FFI implementation so only one native seek is in flight per player. Coalesce consecutive seekTo requests to the latest pending position, complete all waiting futures when the seek finishes, and fail pending seeks when the player is disposed or reports an error.

Send a seekCompleted event from native code so Dart can complete the active seek and start any pending seek.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart Outdated
Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart Outdated
Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart Outdated
Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart
Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart
xiaowei-guan

This comment was marked as duplicate.

@xiaowei-guan xiaowei-guan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart Outdated
Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart
Comment thread packages/video_player_avplay/lib/src/video_player_tizen.dart Outdated
Comment thread packages/video_player_avplay/tizen/src/media_player.cc
Comment thread packages/video_player_avplay/tizen/src/plus_player.cc
Comment thread packages/video_player_avplay/tizen/src/plus_player.cc
Comment thread packages/video_player_avplay/tizen/src/media_player.cc
Comment thread packages/video_player_avplay/tizen/src/plus_player.cc Outdated
- 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
@gin7773

gin7773 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

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.

Verified on Tizen 9.0. All other comments have been addressed.

@xiaowei-guan
xiaowei-guan self-requested a review September 22, 2026 07:16
xiaowei-guan

This comment was marked as duplicate.

@gin7773
gin7773 merged commit a2d7516 into flutter-tizen:main Sep 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants