Fix-up on alvaroelpob's change: resolve the libwebrtc conflicts with main and recount the throwing export total on the merged tree.
22 KiB
libwebrtc technical debt
Unknown function info
- 320 exports (60 without a known name, bound by NID) (libwebrtc) - every function export of
libwebrtc.sprxfrom the firmware 13.60 export table that the next section does not implement, names from aerolib.csv only wheretools/nid_names.pycompute_nidreproduces the NID. Signatures, parameter layouts and behaviour are unknown; every export throws throughNotImplemented_nid_no_patch - 31 data exports (libwebrtc) - the module also exports 31 data objects (+qcl2IzxTzg, -ix-knPYqWA, 00mefEErs+Y, 5FM0YOa3NWc, 67nsSkXmJ7E, 7I2xDnqfDV4, 8Dzy4JayJSU, CVCDyAzGrhI, HpbtuVdvO-w, PGIpx6NnFLE, Q+xnDp4KI-s, QXDv9OpZNvM, aOOjLmup+u4, g5USRJNh3bU, hvpHGXjlpbk, iU6+qODNSjU, jpkYoOv34AM, lHLJlq3NEqE, lQJvoyxHov4, nUaORqH85DQ, o6LS+08kOUs, oh8srl3AcNE, oslHzys1vV0, sp5NqvqDdHw, t66Gw3OIpSo, tr8vseK8-ro, uSis0q+bv6k, uTz5pEKL+hM, uxkudCJIYJA, whHm70jlRXw, yW0sV3sCdPA); they are not defined, so imports of them stay unresolved until their layout is known
Public source implementations
-
FileWrapper::Close, Flush, Write and its move constructor have no PS5 ABI or behavior measurements. Signatures and layout follow WebRTC M127 and M134, where the four methods are identical. The module's exact revision is unknown; its
rtc::names andInterleavedViewresampler exports bracket it between those versions (PR #13687). Null wrappers, invalid move objects, and Flush or Write without an open stream throw for violations of the upstream preconditions. A nonempty write from null data throws instead of dereferencing it. File errors follow guest libc and lack console comparison. -
Source revision (libwebrtc) - the module's exact WebRTC revision is not identified. Its
rtc::names andInterleavedViewresampler overloads place it between M127 (branch-heads/6533) and M134 (branch-heads/6998), so the exports below follow code that is the same at both. Nothing is checked on the console. Closes when: the revision is identified and the exports are compared with the console. -
absl::numbers_internal::FastIntToBuffer(int, char*) (libwebrtc) - follows the abseil both branches pin, 65ef38d368 and d212a71416: the decimal text and a NUL, returning a pointer to the NUL. For magnitudes from 10 to 99999999 its 8-byte store also zeroes the bytes after the digits up to 8 from the first digit. A null buffer, which abseil writes through, throws. Closes when: compared with the console.
-
rtc::TimeMillis and rtc::TimeMicros (libwebrtc) - follow
TimeNanosand the POSIXSystemTimeNanosin time_utils.cc and system_time.cc, the same at both branches: the guestCLOCK_MONOTONICin nanoseconds, divided down. Whether the module is built withWEBRTC_EXCLUDE_SYSTEM_TIMEand a console clock of its own is unknown. No export sets a clock for testing, so theg_clockpath is left out. A failingclock_gettimethrows. Closes when: compared with the console. -
rtc::ExpFilter::Reset and Apply (libwebrtc) - adapted from exp_filter.cc, with its WebRTC copyright notice and BSD licence at the top of the file, on the 12-byte
alpha_,filtered_andmax_layout ofexp_filter.h. -1 marks both an unset output and no maximum, so an output that lands on exactly -1 restarts the filter on the next sample, as upstream does. The last bit of a result can differ if the console build fuses the multiply-adds. A null filter throws. Closes when: compared with the console. -
webrtc::rtcp::CommonHeader::Parse (libwebrtc) - adapted from common_header.cc, with its WebRTC copyright notice and BSD licence at the top of the file, on the 16-byte layout of
common_header.h: packet type, count or format and padding size at 0 to 2, payload size at 4 and payload pointer at 8. Its checks run in the same order, so a short buffer or a wrong version leaves the header untouched and the later failures leave the fields already parsed. TheRTC_LOG(LS_WARNING)message each failure logs upstream is not emitted. A null header, or a null buffer of 4 bytes or more, which upstream reads, throws. Closes when: the warnings are logged through libwebrtc's logging and the parse is compared with the console. -
webrtc::RmsLevel::RmsLevel, ~RmsLevel, Analyze and Average (libwebrtc) - adapted from rms_level.cc, with its copyright notice and BSD licence on top, on the 40-byte layout of
rms_level.h:sum_square_at 0,sample_count_at 8,max_sum_square_at 16, andblock_size_'s value and flag at 24 and 32. M127'sabsl::optionalthere isstd::optional, as the pinned abseil setsABSL_OPTION_USE_STD_OPTIONALto 2, so both pins share the layout.Analyzegets the view's pointer and size afterthis. The destructor does nothing, as upstream's is defaulted; a null object throws. The console'slog10may round a level differently. Not compared with the console. -
webrtc::rtcp::Pli::Parse (libwebrtc) - the
RTC_LOG(LS_WARNING)upstream writes for a payload shorter than 8 bytes is not emitted, and, as in a release build, the packet type and format that upstream onlyRTC_DCHECKs are not checked. Adapted from pli.cc andParseCommonFeedbackin psfb.cc, with their WebRTC notice and BSD licence at the top of the file, on the 16-byte layout ofpsfb.h: vtable pointer,sender_ssrc_at 8,media_ssrc_at 12. A short payload leaves the packet untouched. A null packet, header, or payload of 8 bytes or more throws. Closes when: the warning is logged and the parse is compared with the console. -
WebRtcOpus encoder functions (libwebrtc) - the 16
WebRtcOpus_*encoder exports are adapted from opus_interface.cc, with its WebRTC copyright notice and BSD licence at the top of the file. They encode through the bundled libopus 1.6.1, not WebRTC's pinned copy, so packet bytes can differ. Signatures match at both revisions; M127 only adds a DTX change behind theWebRTC-Audio-OpusAvoidNoisePumpingDuringDtxfield trial, which stays off becauseInitFieldTrialsFromStringthrows. Frames over 60 ms, up to 120 ms, throw: they depend onWEBRTC_OPUS_SUPPORT_120MS_PTIME. A null encoder or buffer inEncode, which upstream reads, throws. Closes when: the build flag is known and packets are compared with the console. -
WebRtcVad_Create, WebRtcVad_Free, WebRtcVad_Init, WebRtcVad_set_mode and WebRtcVad_Process use the opaque-handle C API and validation rules from upstream WebRTC, with the signal-processing core from libfvad. PS5 signatures and classification parity are not measured; differences between the console core and this WebRTC-derived revision remain unverified. Handles are host allocations and expose no guest-visible object layout.
-
rtc::RecursiveCriticalSection and rtc::CritScope (libwebrtc) - never write
thread_orrecursion_count_or check the owning thread, as builds withoutRTC_DCHECK_IS_ONdo; whether the module is one is unknown. A non-zero return from a guest pthread call throws, where upstream ignores it, and a null section or scope throws. Otherwise the POSIX path of recursive_critical_section.cc, the same at both branches, with its WebRTC copyright notice and BSD licence at the top of the file: a recursive guest mutex in the first 8 bytes of the 24-byte layout ofrecursive_critical_section.h. Closes when: compared with the console. -
webrtc::TaskQueueBase::Current and CurrentTaskQueueSetter (libwebrtc) - adapted from task_queue_base.cc, with its WebRTC copyright notice and BSD licence at the top of the file. A thread-local pointer starts null on every thread; the 8-byte setter stores the current queue in
previous_, makes its queue current, and its destructor makesprevious_current again. The file'sthread_localand pthread-key variants behave the same. A null setter, which upstream writes through, throws. Closes when: compared with the console. -
rtc::IPAddress::ipv4_address, ipv6_address, v4AddressAsHostOrderInteger, operator== and rtc::CountIPMaskBits (libwebrtc) - adapted from ip_address.cc, with its WebRTC copyright notice and BSD licence at the top of the file, on the 32-byte layout of
ip_address.h: the vtable pointer at 0,family_at 8 and thein_addrorin6_addrunion at 12.AF_UNSPEC,AF_INETandAF_INET6are 0, 2 and 28, as in FreeBSD's socket.h and libSceNet.CountIPMaskBitscounts from the top bit to the lowest set bit of the first word that is not all ones, so a mask with gaps counts them, as upstream does. A null address, which upstream reads, throws. Closes when: compared with the console. -
webrtc::AudioFrame::AudioFrame(), Mute, muted, data, mutable_data and AudioFrameOperations::Mute(AudioFrame*) (libwebrtc) - adapted from audio_frame.cc and audio_frame_operations.cc, with their WebRTC copyright notices and BSD licence at the top of each file, on the 15456-byte layout of
audio_frame.hwithmuted_at 15432 and the libc++std::optionalthat abseil'sABSL_OPTION_USE_STD_OPTIONAL 2selects. The constructor leaves the samples uninitialized, as upstream does. A muted frame'sdata()points to a shared zeroed buffer.AudioFrameOperations::Muteon more than 7680 samples, which only anRTC_DCHECK_GErejects, throws. A null frame throws. Closes when: compared with the console. -
webrtc::ANAStats::ANAStats() and the AudioEncoder GetANAStats, GetDtx, SetTargetBitrate, DisableAudioNetworkAdaptor, OnReceivedRtt, OnReceivedOverhead and SetReceiverFrameLengthRange defaults (libwebrtc) - adapted from audio_encoder.cc, with its WebRTC copyright notice and BSD licence at the top of the file.
ANAStatsis the 56-byte struct of seven libc++std::optionals (value, then the engaged flag) that abseil'sABSL_OPTION_USE_STD_OPTIONAL 2selects; the constructor andGetANAStatsleave all of them empty, andGetANAStatsreturns it through the caller's result pointer.GetDtxreturns false and the other defaults do nothing, as upstream. A nullANAStatsor result throws. Closes when: compared with the console. -
webrtc::AudioDeviceGeneric BuiltInAECIsAvailable, BuiltInAGCIsAvailable, BuiltInNSIsAvailable, EnableBuiltInAEC, EnableBuiltInAGC, EnableBuiltInNS and GetPlayoutUnderrunCount (libwebrtc) - adapted from audio_device_generic.cc, with its WebRTC copyright notice and BSD licence at the top of the file. As upstream, the availability checks return false and the others return -1 without reading the device. The
RTC_LOG_F(LS_ERROR)"Not supported on this platform" message each call logs upstream is not emitted. Closes when: the message is logged through libwebrtc's logging and the defaults are compared with the console. -
webrtc::AudioDecoder HasDecodePlc, DecodePlc, GeneratePlc and ErrorCode (libwebrtc) - adapted from audio_decoder.cc, with its WebRTC copyright notice and BSD licence at the top of the file. As upstream,
HasDecodePlcreturns false,DecodePlcandErrorCodereturn 0, andGeneratePlcleaves the concealment buffer untouched, none of them reading the decoder or the output. Closes when: compared with the console. -
webrtc::GetAvailableCpuFeatures (libwebrtc) - whether the module is built with
WEBRTC_ENABLE_AVX2is unknown; this follows the default x86 build, whereavx2needs AVX, XSAVE, OSXSAVE, the kernel saving the YMM state, AVX2 and BMI2. Without that flag the console reportsavx2false on every CPU. Adapted from cpu_features.cc andGetCPUInfoin system_wrappers/source/cpu_features.cc, with their WebRTC notices and BSD licence at the top of the file:sse2is CPUID leaf 1 EDX bit 26 andneonis false. The features are those of the host CPU running the title, not the console's Zen 2. Closes when: the build flag is known. -
webrtc::AudioCodecInfo five-argument constructor (libwebrtc) - the console layout and behaviour remain unverified. Adapted from audio_format.cc, retaining its WebRTC copyright notice and BSD licence. The constructor and
AudioCodecInfostruct in audio_format.h are identical at M127 and M134; Sony's exact revision is unknown. A null object, which upstream dereferences, throwsstd::invalid_argument; arguments outside upstream's debug-onlyRTC_DCHECKbounds (positive sample rate and channel count, nonnegative minimum bitrate, minimum <= default <= maximum) are stored unchecked, as in release builds. Closes when: compared with the console. -
rtc::SocketAddress port, ipaddr, IsAnyIP, IsComplete and IsNil (libwebrtc) - nothing is checked on the console. Adapted from socket_address.cc and
IPIsAnyinip_address.cc, with their WebRTC notice and BSD licence at the top of the file, on the 88-byte layout ofsocket_address.h: the guest's 40-bytestd::stringmeasured in GuestLocale.hpp, the 32-byteIPAddressat 40,port_at 72,scope_id_at 76 andliteral_at 80.IsNilreads the string's size, andIsAnyIPmatches 0.0.0.0,::and::ffff:0.0.0.0. A null address throws. Closes when: compared with the console. -
rtc::RaceChecker constructor (libwebrtc) - nothing is checked on the console. race_checker.cc, whose WebRTC notice and BSD licence head the file, defines it empty, so only the default member initializer of
race_checker.hruns:access_count_at offset 0 becomes 0, andaccessing_thread_at 8, a POSIXpthread_t, is left as it was. A null checker throws. Closes when: compared with the console. -
webrtc::rtcp::TransportFeedback::GetBaseSequence (libwebrtc) - nothing is checked on the console. Adapted from transport_feedback.cc, whose WebRTC notice and BSD licence head the file: it returns
base_seq_no_, theuint16_tat offset 16 after the vtable pointer,sender_ssrc_andmedia_ssrc_ofrtcp_packet.handrtpfb.h.transport_feedback.handrtpfb.hare the same at M127 and M134. A null packet throws. Closes when: compared with the console. -
webrtc::AudioNetworkAdaptorImpl::Config constructor and destructor (libwebrtc) - nothing is checked on the console. Adapted from audio_network_adaptor_impl.cc, whose WebRTC notice and BSD licence head the file: the constructor sets
event_log, the struct's only member, to null, and the defaulted destructor does nothing, as upstream, since the struct does not own the log. A null config throws in the constructor. Closes when: compared with the console. -
webrtc::AudioState::Config constructor (libwebrtc) - nothing is checked on the console. audio_state.cc, whose WebRTC notice and BSD licence head the file, defaults it, so the four
scoped_refptrmembers ofaudio_state.h(mixer, processing, device module and async processing factory) start null. The destructor still throws: it releases those references through the guest objects'Release. A null config throws. Closes when: the destructor is implemented and compared with the console. -
webrtc::EchoCanceller3Config copy constructor and operator= (libwebrtc) - the struct's fields are not modelled, and these copy all 608 bytes, while the firmware 13.42 copy, read from disassembly and not measured on a console, leaves
0x71-0x77,0x14e-0x14f,0x179-0x17f,0x184-0x187and0x249-0x24fof the destination unwritten, all padding. Both are defaulted in echo_canceller3_config.cc, whose WebRTC notice and BSD licence head the file;echo_canceller3_config.h, identical at M127 and M134, compiles to 608 bytes aligned to 8 on x86-64. A null object or source throws. Closes when: the default constructor and fields are implemented and compared with the console. -
webrtc::AudioFrame::UpdateFrame and data_view (libwebrtc) - nothing is checked on the console. Adapted from audio_frame.cc and
GuessChannelLayoutin channel_layout.cc, the same at M127 and M134.UpdateFramestores the fields, guesses the layout from 1 to 8 channels and copies the samples, or mutes the frame for null data; more thankMaxConcurrentChannels(8) channels throw before any field is set, and more than 7680 samples throw after the fields are set, as upstream'sRTC_CHECKs do.data_viewreturns the 32-byteInterleavedViewofaudio_view.h, over the zeroed buffer when muted and null when empty. A null frame throws. Closes when: compared with the console.