Commit Graph
147 Commits
Author SHA1 Message Date
Codex d434515a14 test: cover fractional PCM through calibrated RTMP output
Exercise source-rate conversion through the real worker and AAC calibration across AVC, HEVC/PQ and AV1 receiver cases, including TLS. Check normalized duration independently and compare every submitted PCM sample before packet replay.
2026-11-16 20:01:26 +01:00
Codex 06d6d80856 record: route fractional MediaCodec audio through owned conversion
Keep producer timestamps and queue capacity in source frames, configure AAC at a native rate and initialize conversion before exposing the Surface. Preserve direct standard-rate input. Cancel partial network startup on setup failure, retaining the original error.

Full Windows C89 and GCC/Clang sanitizer suites pass, including source clocks and conversion-startup rollback. Native device acceptance remains separate.
2026-11-16 20:01:26 +01:00
Codex 908c1ea783 record: convert source PCM on the MediaCodec worker
Borrow queue spans, convert at most 256 source frames per action and retain output across partial encoder acceptance. Track source and encoded ends separately through calibration, trim and cancellation. Calculate ceil durations exactly from the binary64 source rate.

Tests cover fractional mono/stereo, packet boundaries, anti-aliasing, empty/short EOF, source gaps, cancellation and file/live calibration. An independent Python rational oracle checks 176 duration cases.
2026-11-16 20:01:26 +01:00
Codex 1a288ddfed record: admit AV1 file and RTMP recording through MediaCodec
Accept vcodec=av1, route its sized OBUs to enhanced FLV, and preserve SDR/HDR profile and source color admission. Select Android AV1 levels from Annex A main-tier display-rate, picture, dimension, header-rate and bitrate bounds; native inventory still validates the complete request.

Strict C89 Windows and Linux ASan/UBSan frontend/session/worker suites pass. File and stream tests cover SDR, PQ and scRGB; four actual-source MIME, routing and level-limit mutations are rejected. Native device encoder acceptance remains separate.
2026-11-16 20:01:26 +01:00
Codex 32c7981adb tests: set AV1 fixture CICP in the encoded bitstream
Some CI libaom builds leave primaries and transfer unspecified despite encoder options. Apply the independent FFmpeg AV1 metadata filter and verify the source CICP before transmission, keeping the production mux agreement checks strict.
2026-11-16 20:01:26 +01:00
Codex ca2a4c0665 tests: receive calibrated HEVC and AV1 streams independently
Add enhanced RTMP receiver cases for HEVC 8-bit, HEVC 10-bit PQ and AV1. Verify decoded pictures, complete source PCM, source epochs and color metadata over standard/legacy RTMP, TLS 1.2/1.3 and video-only output. Preserve ten-bit samples in the comparison and retain AVC coverage.
2026-11-16 20:01:26 +01:00
Codex 728277498e record: verify calibrated MediaCodec worker against real receivers
Replay independently encoded AVC/AAC only at the encoder boundary while running the actual worker, PCM queue, AAC probe, FLV adapter and RTMP/TLS client. Check partial PCM acceptance, silent preroll, calibration removal, source PCM recovery, video epoch and EOS drain. Keep adapter-only checks and run both targets in CI.

Validation: GCC and Clang ASan/UBSan five-case receiver runs pass (standard/legacy RTMP, TLS 1.2/1.3, video-only). A two-millisecond actual worker video epoch mutation is rejected after successful transport. This is portable integration evidence, not native MediaCodec device acceptance.
2026-11-16 20:01:26 +01:00
Codex 3ff13b8c1a tests: preserve receiver evidence and validate stream identity
Require fresh explicit artifact directories so reruns cannot overwrite failures. Verify received codec, sample rate and channel identity as well as packet clocks and decoded bytes. The strengthened five-case oracle passes with the previously built GCC sanitizer publisher.
2026-11-16 20:01:26 +01:00
Codex 15a19489d1 tests: independently receive MediaCodec output adapter over RTMP and TLS
Replay independently encoded AVC/AAC through the real native output adapter, shared FLV mux, owned RTMP client and TCP/TLS transport. Compare received packet counts, millisecond timestamps and independently decoded RGB/PCM bytes. Cover standard and legacy RTMP, TLS 1.2/1.3 and video-only output.

GCC and Clang ASan/UBSan matrices pass five cases each (120 pictures and 80 AAC packets per compiler). An adapter mutation shifting both media clocks by one second is rejected after successful transport drain. Metadata getters and encoded packet input are replayed: native MediaCodec, the calibrated worker and device capture are not established by this test. Add the matrix to Android CI and retain exact evidence.
2026-11-16 20:01:26 +01:00
Codex 1059e887b8 record: activate native Android streaming through the MediaCodec frontend
Select the owned stream dispatcher for RTMP(S), validate native FLV/AAC options, propagate coded HDR source metadata, and keep stream URLs out of file history. Expose backend streaming capability and enable shared RTMP/FLV in Vulkan Android NDK builds with crypto.

Windows frontend and native menu checks pass; full arm64 Android library builds and links with native streaming entry points and passes 16 KiB ELF alignment. This is build/contract acceptance, not physical-device or independent receiver acceptance. Direct integer source audio rates and AVC/HEVC are retained; fractional-rate resampling and AV1 frontend selection remain separate work.
2026-11-16 20:01:25 +01:00
Codex 4a5bde636f record: schedule owned MediaCodec streams on the I/O dispatcher
Copy native stream configuration and URL at cold startup. Negotiate the owned shared RTMP client before publishing Surface readiness, poll producer/resolver/socket interests together, and keep detached DNS notifications independent of dispatcher lifetime. Setup and drain deadlines are I/O-owner-only; no new frame/audio waits or clocks.

Windows contract suite, focused Linux ASan/UBSan and TSan thread/wake tests, and eight actual Android NDK dispatcher compiles pass. Client and recording session boundaries remain mocked; real receiver/device acceptance and frontend activation remain pending.
2026-11-16 20:01:25 +01:00
Codex af6b3b2c1c tests: reject file trim and early codec stop for network sessions
Fault injection exposed a fixture gap: a file audio-edit query on a network session did not fail. Track network output lifetime so trim queries and codec stop are rejected until the appropriate file mode or output retirement. Four actual-session mutations now fail; restored Linux sanitizer and Windows strict-C89 fixtures pass.
2026-11-16 20:01:25 +01:00
Codex 3ddbeb2a11 record: connect MediaCodec network output to owned session lifetime
Add an RTMP/FLV-gated network session constructor and bounded network service entry point. Select live AAC priming, skip file creation and MP4 edits, report socket interests, and retire the output before stopping codecs or releasing encoders. The caller retains client ownership.

Windows strict C89 suite plus focused completion check pass. Session fixtures cover cold rollback, file regressions, network failure, delayed retirement and source/GPU closure with native/output boundaries mocked. Dispatcher activation and real receiver/device acceptance remain pending.
2026-11-16 20:01:25 +01:00
Codex d3d8d404c4 record: prime live MediaCodec AAC without publishing calibration
Gate source PCM until measured delay determines the silent input boundary. Drop complete calibration packets before output, retain silent AAC preroll and shift video/source ends to the same epoch. Preserve the existing MP4 calibration/edit path and stable descriptors across output backpressure.

Strict C89 Windows suite passes; calibrated fixtures cover six delays, empty PCM, output backpressure and early cancellation. Native MediaCodec and network session activation still require acceptance.
2026-11-16 20:01:25 +01:00
Codex a3f1ac1471 record: define calibrated AAC live-stream source epochs
Calculate packet-aligned source input and coded origins from measured encoder delay, retaining two silent AAC frames before source audio and rounding the matching video epoch upward. Keep file edit semantics separate.

Check all delays 0-4096 at six rates. Independently encode/decode synthetic AAC-LC at 44.1/48 kHz mono/stereo, recover delay from the chirp, omit calibration packets and compare source PCM against continuous decoding. This is not MediaCodec device acceptance or dispatcher activation.
2026-11-16 20:01:25 +01:00
Codex dfaf13cfbd record: bridge MediaCodec packet borrows to shared RTMP output
Add a bounded I/O-worker output adapter with cold mux setup, serialized packet admission, transport backpressure, normal drain and cancellation retirement. Keep the MediaCodec descriptor live until both shared mux and RTMP transport borrows retire.

The controller must establish live AAC priming and source epochs separately; this adapter does not enable Android streaming or reuse MP4 calibration edits. Strict C89 Windows contract suite passes with the actual shared FLV mux and mocked transport.
2026-11-16 20:01:25 +01:00
Codex e41c91b7fc record: build shared FLV configuration from MediaCodec setup data
Create worker-side AVC/HEVC/AV1 mux configuration from bounded native CSD and optional AAC setup. Join separate AVC parameter sets only during cold setup, retain neither native format nor encoder metadata, and preserve microsecond packet clocks without rebasing. Reuse shared Annex B and AV1 mux validation, including codec-specific packet budgets and depth/color admission.

Add actual shared-mux fixtures for configuration copying, separate/combined AVC setup, AAC payload borrowing, microsecond timestamps, codec depth mismatch and early packet-budget refusal. This does not enable the unfinished Android network publisher.
2026-11-16 20:01:25 +01:00
Codex ea2af53aa4 record: retain MediaCodec output across consumer backpressure
Add a copied worker-owned output callback table, with the existing file mux as the default adapter. Retain one immutable native packet descriptor per encoder while output is BUSY; calibrate AAC only once for that packet and release the codec borrow only after output acceptance. Worker free waits for bounded output retirement before encoder destruction is allowed.

Exercise no-repump/no-early-release behavior, callback-table ownership, delayed cancellation retirement and calibrated coded/source clocks under BUSY. The strict-C89 native MinGW MediaCodec suite passes. Android network publisher integration remains unfinished.
2026-11-16 20:01:25 +01:00
Codex b2e921be5a record: expose bounded borrowed MediaCodec video configuration
Allow the owning worker to inspect native csd-0/csd-1 buffers before constructing shared stream output. Bound each buffer to 65535 bytes, clear outputs on refusal and preserve encoder state for optional/malformed metadata. No dequeue, release, allocation or encoded-payload copy occurs. Audio and stopped encoders cannot expose video configuration.

Cover separate CSD borrows, missing/malformed/oversized metadata, invalid arguments, audio refusal and stopped-state invalidation. Streaming remains disabled pending output/publisher and lifecycle integration.
2026-11-16 20:01:25 +01:00
Codex 8d0b716fca record: integrate native Vulkan frontend capture and A/V drain
Connect the admitted desktop Vulkan encode queue to viewport recording through
an asynchronous worker. Capture GPU pixels in the renderer submission, publish
only successful submissions, and retain source/device resources through stop,
resize and deferred video reinitialization. Refuse unsupported devices, HDR,
formats and audio layouts before creating output. Start after the first core
frame so admission uses its actual audio layout.

Hold PCM on the existing worker queue until encoded video establishes its
clock limit. Trim trailing queued PCM at video EOS before AC-3 padding and
publish the actual consumed count after worker retirement. This prevents a
threaded resize from leaving audio beyond the last captured picture. Add no
producer locks, waits, pixel readbacks or pacing logs.

Configure selects the driver on desktop Vulkan builds with its dependencies;
existing default driver priority is retained. Add frontend admission/lifetime,
delayed-video PCM, terminal-result publication and native isolated-window
resize/reinit/stop regression coverage.

Validation: GCC/Clang ASan+UBSan frontend contracts, Vulkan encode contracts,
recording output/session/dispatch contracts and independent MP4 A/V checks.
Windows native recording passes threaded/direct multichannel float PCM at
32/44.1/48 kHz, plus resize, reinit and stop with Khronos sync validation.
Desktop Linux and Windows frontends build with automatic feature selection.
Native Linux GPU acceptance remains open. The unrelated extended RSLC unsized
uniform-buffer fixture is rejected by the installed standalone SPIR-V validator;
that check is retained as a failure, not reported as an extended-suite pass.
2026-11-16 19:50:40 +01:00
Codex b578db3004 record: own Vulkan capture resources on the recording worker
Compile and publish optional capture resources with dispatcher readiness, then retire them on the worker after the video producer proves its GPU commands complete. Keep the encoder pool alive through capture destruction and skip unused capture startup after early cancellation.

Lifecycle regressions cover startup refusal, cancellation and independent video/audio closure; an injected premature destruction fails. Native direct-image and buffer A/V runs pass with zero synchronization-validation errors, alongside Windows, GCC/Clang sanitizers, TSan and a linked threadless frontend. Renderer binding remains separate.
2026-11-16 18:41:14 +01:00
Codex 266a1841ef record: dispatch Vulkan recording work away from producers
Own session startup, file output and retirement on a dedicated worker. Publish immutable pool borrows after startup, wake through the existing lock-free eventcount backend and wait for each producer to close itself before teardown. Add concurrent startup/cancel/error contracts and native GPU A/V acceptance for both capture paths. Threadless and locking-fallback configurations refuse admission.
2026-11-16 18:04:45 +01:00
Codex a59fb03764 test: exercise native file SRC packet and teardown helpers
Cover cached output, failed mux binding, converter setup failure and retryable reset retirement through the shipping adapter helpers for one through eight channels. Keep native API mocks distinct from macOS runtime acceptance.
2026-11-16 17:47:49 +01:00
Codex fa19896686 record: convert fractional core PCM for Metal file recording
Keep the producer clock and queue budget in source frames. Convert on the recording worker through AudioToolbox, retain converted packets across mux backpressure and retire native input borrows before queue teardown. Preserve the direct path for integral rates and extend conversion contracts through eight channels.
2026-11-16 17:47:49 +01:00
Codex 09778a7a2a record: own Vulkan encoder and file output through retirement
Add a worker-owned Vulkan recording session with rational video clocks and encoder-derived mux metadata. Producer closure gates output, GPU and queue retirement; cancellation preserves borrowed packets and startup errors. Exercise actual queue/worker/mux/audio contracts with delayed GPU/file completion, independent producers, threadless builds and emitted MP4 metadata checks.
2026-11-16 17:38:32 +01:00
LibretroAdmin 8ea1d9b3dc metal_frontend stream sample: allow a threaded stream to start late
With audio, video and audio are stamped from the same frame clock, so
the first video packet sits at the AAC priming delay. Under threaded
video the newest frame replaces an unclaimed one when both ring slots
are taken; a frame replaced while the video thread starts keeps its
timestamp, so the stream's first packet comes that many frames later.
The mono threaded case on the macOS runner landed past the 0.12 s the
check allowed. The threaded bound is now a second; the unthreaded one
is unchanged, and the assertion prints the first timestamps.
2026-11-16 05:55:57 +01:00
Codex c65eb0dbfa tests: gate native iOS recording on the production application link
After real SDK unit admission succeeds, build the existing iOS Release application without signing. Assert resolved Metal/AVFoundation/thread/configuration and RTMP/FLV flags, reject FFmpeg, retain Xcode diagnostics and inspect the linked executable's libraries. Use structured subprocess arguments for signing overrides. Keep application-link scope distinct from physical device acceptance.
2026-11-14 11:45:22 +01:00
Codex 2d2a58b0a3 record: wire eligible Apple SDKs to native recording and shared RTMP
Derive the native Metal backend from a shared SDK floor rather than a desktop-only target check. Add shared RTMP/FLV flags to the existing Apple network configuration and let griffin include the existing native implementation units. Extend the real SDK audit to compile the actual C frontend using automatic backend admission, with ARC kept out of C compilation.

This is an unlanded integration candidate. SDK compilation, full Apple application linking and physical-device recording/streaming acceptance are pending.
2026-11-14 11:45:22 +01:00
Codex 1bdcf6f545 record: connect native Metal session and dispatcher on mobile Apple SDKs
Compile the real session and dedicated worker on eligible iOS/tvOS SDKs and reject older runtimes before startup. Mobile uses verified hardware admission without assuming a desktop GPU registry ID. Preserve desktop enumeration and affinity selection. Expand the opt-in SDK audit to compile capture, session, dispatcher and muxer units, with explicit non-stub and native-slot assertions.

The SDK audit remains a pending gate. This candidate does not enable mobile application feature defines or claim native-device recording acceptance.
2026-11-14 11:45:22 +01:00
Codex 5ad25ed5c1 record: admit advertised hardware encoders before iOS 17.4
Guard mobile hardware require/query keys at their actual SDK and runtime floor. On older supported mobile systems, retain an advertised hardware encoder ID matching the requested codec and verify the created session reports the same ID. Reject malformed, missing and software-only advertisements. Preserve desktop hardware requirement and query behavior.

Portable strict-C89 VideoToolbox fixture suite passes on native MinGW, including hardware-ID admission and retained-list ownership checks. Real iOS SDK compilation and physical-device acceptance remain separate gates; this does not yet enable the mobile recording frontend.
2026-11-14 11:45:21 +01:00
Codex f9273712e6 tests: add real iOS SDK admission audit for native VT headers
Compile the production wrapper for arm64 iPhoneOS and simulator at iOS 13 and 17.4 deployment floors. Preserve compiler diagnostics and distinguish SDK acceptance from unavailable physical-device encoding tests. The opt-in workflow dispatch isolates this audit without disabling normal default coverage.
2026-11-14 11:45:21 +01:00
Codex 0d1f649a2d tests: exercise native Metal streaming with bounded queue sizes
Run direct and threaded frontend cases with two, four, eight and sixteen capture slots. Save the requested configuration in acceptance results and verify it when explicitly selected. Preserve offline verification of earlier artifacts without the setting. Revalidated all eight saved native cases and 1137 decoded pictures with the updated verifier.
2026-11-12 18:53:15 +01:00
Codex e3120a9c87 tests: verify requested NVENC capture ring sizes at initialization
Exercise the production frontend initializer with capture allocation intercepted. Check every supported ring size and the invalid-value fallback, and tie the test to both queue capacity constants. This validates configuration forwarding without claiming native GPU allocation or encoding acceptance.
2026-11-12 18:53:15 +01:00
Codex 54a6926a3f record: align native buffer settings with bounded capture rings
Use the same native queue limits in menu ranges and backend initialization. Honor the selected NVENC ring size instead of fixing it at four. Keep invalid legacy values on the existing four-slot fallback and restore legacy ranges when switching away from native recording.

Validate native ranges and fallback values, driver changes and actual Metal initializer slot configurations in the portable frontend tests.
2026-11-12 18:53:15 +01:00
Codex 094d4192aa menu: filter native streaming services by TLS availability
Keep the built-in RTMPS-only Facebook and Kick choices out of native plaintext-only builds while preserving FFmpeg protocol choices. Navigate the finite set of supported modes in both directions without timers or backend work. Exercise the actual dropdown filter and actions in plain and TLS variants; the previous capability predicate fails the no-TLS fixture.
2026-11-12 18:53:15 +01:00
Codex df859b6ca0 menu: expose supported native recording and streaming controls
Query registered recording backends instead of restricting the shared Recording page and Quick Menu start action to FFmpeg. Native GPU recorders expose their custom profiles, GPU capture, frame-drop and queue controls; compiled Metal/NVENC RTMP providers also expose service, profile and URL settings. Keep unsupported quality/software controls hidden and omit the UDP Local mode for RTMP-only backends in dropdowns and left/right navigation. Capability queries do no device, codec or network work.

The production settings-list, Quick Menu predicate and setting actions pass a shared native capability fixture on Windows and Linux sanitizers. The actual old settings-list body and old start predicate each fail it. Full application/native build checks remain required before publication.
2026-11-12 18:53:15 +01:00
Codex 4ef383d2da tests: preserve coded frame counts in native streaming verification
FFmpeg default output synchronization filled three presentation gaps in the native frontend capture: 156 packets became 159 decoded output frames. Decode with passthrough timestamps and retain the exact packet/picture check. The saved native H264 stream passes independent Linux pixel, AAC, clock and history checks. Allow saved-case verification and focused frontend dispatches; default CI still runs every native gate.
2026-11-12 17:12:00 +01:00
Codex 655c5b53fe tests: exercise real Metal frontend stream initialization
Drive the production initializer through strict profiles and worker admission. Cover the packet-reader limit that previously broke first-sample binding, fractional and mono audio clocks, video-only operation, PQ/scRGB configuration and file/stream ownership. The actual old initializer fails this fixture; the corrected source passes on native MinGW and Linux ASan/UBSan. These are configuration contracts, not native HDR rendering acceptance.
2026-11-12 17:00:30 +01:00
Codex 3685e90f99 record: reject impossible packet bounds before Metal stream startup 2026-11-12 16:48:00 +01:00
Codex f10151d1c8 record: share the native packet capacity limit with Metal streaming 2026-11-12 16:46:17 +01:00
Codex 677c749aad tests: preserve RTMP receiver negotiation diagnostics 2026-11-12 16:37:28 +01:00
Codex e7d01e8638 record: observe flushed frontend stream logs and command replies
Mac terminal logging is buffered while the frontend remains running. Use its explicit flushed log file, require the streaming command acknowledgement and wait for independently received output before measuring the active interval. Enable the builtin player so the stream-history exclusion is exercised.
2026-11-12 16:31:45 +01:00
Codex 04c6866bcb record: connect native Metal streaming to the frontend
Admit RTMP/RTMPS URLs and strict FLV/AAC profiles, preserve fractional source audio clocks and choose supported AAC output rates. Enable the built-in transport by default for eligible networked Metal/AVFoundation builds while respecting explicit feature disables.

Keep stream URLs out of recording history and avoid retaining a redundant frontend URL copy. Release the worker startup URL after the client adopts it and keep unsupported SDK builds on the existing fallback.

Add portable profile/source-clock checks and native application start/stop acceptance for direct/threaded AVC, fractional HEVC, mono and video-only output. Native acceptance remains required before landing.
2026-11-12 16:25:20 +01:00
Codex 0042a8cca7 record: hold accepted Metal work across stream cancellation
Exercise direct TCP and TLS/SRC cancellation with an accepted command buffer left uncommitted. Require the dispatcher to retain native ownership until renderer submission and finish retirement afterward. Keep truncated cancellation output separate from decode-quality results.
2026-11-12 15:51:20 +01:00
Codex 6fc9ae8ee8 record: exercise DNS completion after Metal dispatcher retirement
Hold the real resolver callback until cancellation frees its dispatcher, then run it after descriptor reuse under native ASan/UBSan. Reject a borrowed-wake mutant through a use-after-free report.

Use the supported Metal frontend build dialect in full link checks: C89_BUILD intentionally excludes Metal in the generated make configuration. Native worker fixtures retain their strict C89 checks.
2026-11-12 15:48:19 +01:00
Codex c9260506ee record: drive Metal streaming on the owned I/O worker
Own RTMP setup and socket/producer readiness on the existing dispatcher. Retain independent DNS completion notifications through cancellation, keep native audio conversion on the worker and service the connection before first-picture format binding. Preserve file-mode Mach scheduling and producer retirement barriers.

Add independent native receiver coverage of the URL-owning worker and full network-enabled frontend links with and without threads. Native acceptance remains a gate before frontend streaming selection.
2026-11-12 15:44:20 +01:00
Codex 42270588f9 record: exercise Metal streaming factory over real RTMP
Capture renderer textures through the shared native factory and independently check received BT.709 pixels, cropped P010 geometry, explicit frame clocks and aligned audio. Cover direct and fractional/downsampled audio over TCP and TLS under ARC and manual reference counting. Calibrate the receiver oracle against FFmpeg RGB conversion and reject stale frames, bad priming and missing video epochs.
2026-11-12 14:53:05 +01:00
Codex d391508ed1 record: bind native VT streaming to Metal session startup
Adopt fresh AAC/SRC and a ready RTMP client with the renderer-selected video resources. Retain the first encoded format through output retirement, keep producer closure independent, and clean up both adopted and unbound resources. Cover drain, borrowed SRC cancellation, missing format and cancellation before binding with SDK stand-ins; reject early format release.
2026-11-12 14:43:07 +01:00
Codex 1ab9e85b97 record: share Metal cold startup with owned outputs
Let an output binder adopt the existing renderer-selected encoder, aligned pool and capture. Keep file recording on that bootstrap and verify null/refused binders retire their cold resources before the next successful startup.
2026-11-12 14:43:07 +01:00
Codex 807245ddcd record: check native streaming cancellation retirement
Stop direct and resampled owned sessions after native output starts. Require complete GPU slot retirement and session teardown; keep truncated cancellation output separate from receiver quality acceptance.
2026-11-12 14:43:07 +01:00