Files
RetroArch/record/record_gpu_reinit.c
Codex d44a83afda android: integrate asynchronous native GPU recording
Connect the MediaCodec recording frontend to worker-owned encoders and
Vulkan capture without frame-path readbacks or new waits. Keep capture
leases through native retirement and defer cold queue work on contention.

Calibrate AAC presentation edits, omit an empty audio source, and drain
healthy recordings before video resets. Retain the teardown path for
failed or ambiguous GPU work. Include portable lifecycle, audio, file
and capture regressions.
2026-10-27 13:02:24 +01:00

40 lines
1020 B
C

/* Copyright (C) 2026 The RetroArch team.
* SPDX-License-Identifier: GPL-3.0-or-later */
#include "record_driver.h"
#include "../command.h"
#include "../driver.h"
#include "../gfx/video_driver.h"
#include "../runloop.h"
static int recording_reinit_flags;
bool recording_gpu_defer_reinit(int flags)
{
if (!recording_reinit_flags
&& (!(flags & DRIVER_VIDEO_MASK) || !recording_gpu_reset_pending()))
return false;
recording_reinit_flags |= flags;
recording_gpu_stop();
return true;
}
void recording_gpu_reinit_poll(void)
{
int flags;
if (!recording_reinit_flags)
return;
if (runloop_state_get_ptr()->quit_pending
|| runloop_state_get_ptr()->content_closing
|| runloop_is_content_switching() || !video_state_get_ptr()->data)
{
recording_reinit_flags = 0;
return;
}
recording_gpu_stop();
if (recording_gpu_reset_pending())
return;
flags = recording_reinit_flags;
recording_reinit_flags = 0;
command_event_reinit(flags);
}