Skip to content

refactor: deduplicate EAGAIN_YIELD_THRESHOLD backoff in dav1d.rs and av1.rs #302

@staging-devin-ai-integration

Description

Summary

Follow-up from #299. PR #279 extracted a shared vaapi_decode_loop_body<D>() function that deduplicated the VA-API decode loops between vaapi_h264.rs and vaapi_av1.rs.

However, dav1d.rs and av1.rs still have their own independent EAGAIN_YIELD_THRESHOLD backoff patterns that are not using the shared function.

Files involved

  • crates/nodes/src/video/dav1d.rs — independent EAGAIN_YIELD_THRESHOLD constant + backoff logic
  • crates/nodes/src/video/av1.rs — independent EAGAIN_YIELD_THRESHOLD constant + backoff logic
  • crates/nodes/src/video/vaapi_av1.rs — contains the shared vaapi_decode_loop_body<D>() to reference

Suggestion

Evaluate whether the backoff pattern in dav1d.rs and av1.rs can also be abstracted into the shared function, or into a similar generic helper. The decode loop structure differs from VA-API (different decoder APIs), so a direct reuse of vaapi_decode_loop_body may not be possible — but the EAGAIN_YIELD_THRESHOLD constant and retry logic could still be consolidated.

Origin

Split from #299 after the VA-API portion was addressed in PR #279.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions