Skip to content

NAT-551: Capability checks and acceptance fixes - #176

Open
eugene-mux wants to merge 2 commits into
releases/v1.1.0from
em/nat-551-capability-wiring
Open

eugene-mux wants to merge 2 commits into
releases/v1.1.0from
em/nat-551-capability-wiring

Conversation

@eugene-mux

@eugene-mux eugene-mux commented Nov 6, 2026 •

Copy link
Copy Markdown

Description

Complete the capability, configuration and compatibility fixes for Android Upload SDK 1.1.0. Targets releases/v1.1.0.

Changes

  • Probe the actual source/device before final planning; export only approved conversions and validate the selected encoder/profile.
  • Prefer H.264 High when supported, otherwise Baseline.
  • Honor analytics opt-out, chunk size and retry settings; each build() gets an independent upload session. Chunk sizes round down to 256 KiB multiples (minimum 256 KiB); negative retries become zero.
  • Add structured conversion diagnostics; remove the five-second/1 GiB scan ceilings while retaining cancellation and the 250k-sample bound.
  • Remove unused libyuv and Resample; the SDK AAR contains no native libraries.
  • Fix older-Android metadata resource handling and sample uploads without thumbnails; keep sample controls above navigation bars.

Compatibility

Android 6.0 (API 23) remains supported for original-file uploads, without local standardization. Conversion requires Android 7.0 (API 24)+ and a supported input/device. This is the accepted scope for 1.1.0.

Validation

  • 323 debug + 323 release unit tests, SDK/sample release builds, vital lint analyses and packaged-AAR/R8 consumers pass. The final commit changes only README wording.
  • Main matrix: 68 real SDK-to-Mux runs / 46 scenarios, with 34 validated conversions and 34 original uploads on Pixel 8 Pro, Galaxy S23, Galaxy A02 and an API 23 emulator.
  • Independent sample-UI recheck: 15 real uploads on S23/Android 15, Pixel 8/Android 16 and A02/Android 10. H.264 High confirmed on Qualcomm, Exynos and MediaTek; Baseline confirmed on emulators.
  • Android 7.0–9 emulator conversions reached ready Mux assets; Android 6 uploaded originals. A separate API 23–28 sweep verified the track-ID/inspection boundary using three fixtures per version.
  • Sample preview-failure/navigation, five live lifecycle journeys, additional process-death recovery, >1 GiB conversion, slow-scan cancellation and the 250k bound were checked.
  • Full lint still fails at 102 errors / 33 warnings, compared with 103 / 34 on the release branch. Vital analyses pass; performance acceptance remains owner-deferred.

Log evidence

Release SDK logging is off by default. Enable a logcat logger with MuxUploadSdk.useLogger(MuxUploadSdk.logcatLogger()); filter by MuxUploadStandardization.

Recorded S23 conversion and A02 decoder-fallback lines:

standard_input event=capabilities_checked targets=available decoder=true audio=true tone_mapping=true encoder=c2.qti.avc.encoder encoder_profile=H264High
standard_input event=payload_selected payload=standardized bytes=2550833
standard_input event=capabilities_checked targets=available decoder=false audio=true tone_mapping=true encoder=none encoder_profile=n/a
standard_input event=payload_selected payload=original bytes=2036148

Note

Medium Risk
Changes core standardization planning, codec preflight, and upload UploadInfo/Builder semantics; behavior shifts are broad but localized to the upload pipeline with heavy test coverage.

Overview
Standardization and conversion

Planning is split into propose (policy-only) and plan (merged with device/source capability probes). A new SdrPlanningCapabilityProbe runs real preflight (decode, audio, tone-map, encoder) before conversion is approved; H.264 targets prefer High and fall back to Baseline when preflight selects a weaker encoder. Export and validation use SdrEncodingTargets.withEncoder so output matches the encoder actually used. Structured MuxUploadStandardization logs (StandardInputDiagnostics) trace inspection, capabilities, plan selection, conversion, payload choice, and failures—documented in the README with MuxUploadSdk.useLogger.

Inspection and prep

Sample scanning drops the 1 GiB / 5s ceilings (full-file scan like iOS; cancellation still between reads; 250k-sample bound kept). Upload preparation wires the probe, emits diagnostics, and only exports when the final plan is Convert (fallback/original paths skip export and avoid codec queries where appropriate).

Transport and public API

MuxUpload.Builder: chunkSize is rounded down to 256 KiB multiples (minimum 256 KiB); retriesPerChunk clamps negatives to 0; optOutOfEventTracking now persists correctly; each build() copies UploadInfo so reused builders get independent sessions. HdrHandling KDoc reflects real preserve/tone-map behavior.

Dependencies and dead code

libyuv removed from the library; unused Resample deleted.

Metrics and sample app

UploadMetrics and demo extractThumbnail use explicit MediaMetadataRetriever release for older API levels. Example UI adds navigationBarsPadding, allows upload when preview is missing (“Preview unavailable”), and documents API 23 vs 24+ standardization in the README.

Tests

Planner, preparation, preflight, conversion adapter, and builder behavior are expanded or updated for the new flow and normalization rules.

Reviewed by Cursor Bugbot for commit a8083a7. Bugbot is set up for automated code reviews on this repo. Configure here.

@eugene-mux eugene-mux mentioned this pull request Nov 6, 2026
@eugene-mux eugene-mux changed the title NAT-551 (part 2): Capability checks and acceptance fixes NAT-551: Capability checks and acceptance fixes Nov 6, 2026
@eugene-mux
eugene-mux marked this pull request as ready for review November 6, 2026 21:57
@eugene-mux
eugene-mux requested a review from a team as a code owner November 6, 2026 21:57
@eugene-mux
eugene-mux requested a review from daytime-em November 6, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant