feat(libwebrtc): implement FileWrapper output and ownership #14246
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14246"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by mkrieger95 on 2026-11-01T03:41:36Z.
What
Implement four previously throwing libwebrtc exports:
webrtc::FileWrapper::Close,Flush,Write(const void*, size_t)and the move constructor. Operations use the existing guest libcFileStreamAPIs, preserving guest stream tracking and platform handling.Supersedes boykopovar/AnyPS5#13882.
The eight-byte object owns one stream pointer. Write reports whether all requested bytes were accepted; Flush forwards stream errors; Close clears ownership even when the close reports a write failure and succeeds when already empty. Move construction transfers ownership and empties the source without reading uninitialized destination storage.
Source evidence: compared
file_wrapper.handfile_wrapper.ccat M127 with M134 header and implementation. These four methods, signatures and one-pointer layout are identical. Those versions bracket the module's inferred revision from its rtc namespace and InterleavedView exports, as investigated in boykopovar/AnyPS5#13687. This code is written against that contract; no new third-party dependency or copied source is added.PS5 ABI and behavior have not been measured. Invalid wrappers/move objects, Flush or Write without an open stream, and nonempty writes from null data throw for upstream contract violations. These limitations are recorded in
docs/dev/debt/libwebrtc.md. No title unblock is claimed.Tested
Linux x86-64, GCC 14.2, Release,
BUILD_TESTING=ON; based on upstreamba627802e2210187d417deb64c8f2fed8e33011fon 2026-11-01 UTC.guest_webrtc_file_wrapper,guest_webrtc_vad,guest_webrtc_fast_int_to_buffer,guest_webrtc_time,guest_webrtc_exp_filter,guest_webrtc_rtcp_common_header,guest_webrtc_opus.python3 core/libs/tests/test_public_headers.py --audit-only: 399 libraries, 26,227 exports pass.python3 tools/check_conventions.py --base origin/mainandgit diff --check: pass./dev/fullchecks failed flush, failed implicit flush during close, and pointer clearing even when close returns false.Not tested: Windows, a title or a PS5. No console-parity claim; no full-suite or whole-project-build claim.
Overlap check at
ed8d036367a423d4131eda0488751fc3c9d56d0b:python3 tools/pr_overlap.py --branch feat/webrtc-file-wrapper-v2 --repo boykopovar/AnyPS5scanned 1,662 open PRs againstba627802e2210187d417deb64c8f2fed8e33011f. The reported same exports/new files are this PR itself (#14246), whose remote head was still the previous revision during the scan. No other completed comparison reports conflicting lines, exports or new files. Full pairwise merge previews are clean with #14087, #14095, #14116, #14120, #14129, #14148, #14232 and #14381. This resolves the same-line debt overlaps raised in review by revising our edits, so no landing-order dependency is needed.The helper still exits 2 because existing conflicts with main prevent complete comparisons for #5021, #7275, #8650, #9156, #9162, #9293, #9297, #9302, #9383, #12642, #13253, #13256 (shared CMake file) and #14212 (shared debt file). Each shared-file patch was inspected manually. Three-way merges of those files using this head have exactly the same conflict hunks as merges using unmodified main; this PR adds no conflict hunks. The CMake edits register unrelated targets or configure macOS linking, with no FileWrapper references; #14212 changes debt formatting/counts and its pre-existing conflict hunks do not contain our new entry.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T04:00:00Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The implementation and focused tests look coherent on source inspection, but the PR's own overlap report leaves required landing-order coordination unresolved.
What I ran
Reviewed head
df83dac6c54f75d1a55ad77bdd31a65b9302576cagainst PR base5d3ad2112f60f35d463dc2c9d96d1c9d35871015; the merge preview against currentmain8c91f25b3924a8419096aa368ce44043a5894558was clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0, Git 2.39.5. I did not build or run CTest.Results
libwebrtcUnknown00–59exports. This lexical check does not certify binary ABI.GuestWebrtcFileWrapper.cppis registered incore/libs/CMakeLists.txt. The heuristic is a false positive here.main8c91f25b3924a8419096aa368ce44043a5894558.Raw output excerpts
Precheck conventions output:
ABI audit summary:
Test-quality heuristic output for the changed C++ test:
Overlap-helper error:
Findings
Blocking
The PR's description says its overlap scan found shared CMake/debt metadata edits with open PRs #14087, #14095, #14116, #14120, #14129, #14148 and #14232, and explicitly says no landing-order agreement is claimed.
CONTRIBUTING.mdrequires the authors of PRs that change the same lines to agree which lands first and declare that order withDepends on. The checklist currently saysDepends on: none. Please coordinate the order with the affected authors and update the checklist (or revise the changes so the overlap no longer applies).Non-blocking
No source-level defect was established in this pass. The test-registration heuristic warning is resolved by the registration visible in the changed CMake file.
Sources
Depends onentryNot verified
I did not build or run the focused CTests or the negative controls. The reported focused tests are author-provided, and the mutation checks predate this rebase. Hosted Windows was still running; Linux and specialized jobs were skipped. No PS5 or title behavior was tested.
To get this to a good state
Agree and record the landing order for the reported open overlaps, then update
Depends onand rerun the overlap check. I will recheck the exact new head and rerun the applicable no-build checks.