Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

decodeQueueSize/encodeQueueSize is not updated on the task where dequeue event is fired

Đang mở
#724 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
api, web-dev

Hướng nghiên cứu

Bắt đầu với các thuật toán reset, close và dequeue-event của WebCodecs encoder và decoder được issue mô tả. Theo dõi thời điểm các cập nhật queue-size, error callbacks và dequeue tasks có thể được JavaScript quan sát, sau đó xác định hành vi dự kiến đối với AbortError và các race giữa close và reset. Công việc được hoàn thành khi event timing và state transitions được đặc tả một cách nhất quán.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

CR Blocking

The usual pattern is to update a read-only attribute value and synchronously fire the corresponding event.
This is not the case for decoders/encoders, I wonder why. Note this means that the timing where the control messages are run is somehow observable to JS.

Also, now that we execute the error callback synchronously as part of the close encoder/decoder algorithm, the corresponding dequeue event is fired in a task after the error callback execution. This might be a bit surprising to applications.

I wonder whether we could consider something along those lines:

  • In case of reset/close with non AbortError, fire the dequeue event synchronously so that it happens just before the error callback execution.
  • In case of AbortError reset/closure, do not fire the dequeue event (the app triggered reset/close so does not really need a dequeue event).
  • In case of close being called by the web application between the time the dequeue event task is scheduled and the time the task runs, do not fire the dequeue event. The same approach could be useful for reset as well but might require introducing more states.
Ngôn ngữ chính
HTML
Star
1.3k
Fork
192
Merge trung bình
3 giờ 36 phút
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của w3c/webcodecs

Tất cả issue của w3c/webcodecs

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.