Files
piik/native/window-capture-helper/process_audio.h
T
AAA a560f54bcc feat(native): add WGC hardware H264 source (#109)
Adds the explicit Windows WGC/D3D11 hardware-only Media Foundation H.264 source, process-tree audio, direct Go/Pion fanout, source-aware UI/gate, and unique evaluation package helper. Browser VP8 remains the default. Local acceptance and bounded real-device evidence are recorded in the PR; GitHub jobs were billing-blocked before executing any step.
2026-08-21 05:37:29 +08:00

28 lines
860 B
C++

#pragma once
#include <windows.h>
#include <cstdint>
#include <functional>
namespace screener::capture {
constexpr UINT32 kAudioSampleRate = 48'000;
constexpr UINT16 kAudioChannels = 2;
constexpr UINT16 kAudioBytesPerSample = 2;
constexpr UINT32 kAudioFramesPerChunk = 960;
constexpr DWORD kAudioBytesPerChunk =
kAudioFramesPerChunk * kAudioChannels * kAudioBytesPerSample;
constexpr UINT64 kAudioChunkDuration100ns = 200'000;
using PCMWriter =
std::function<HRESULT(UINT64 timestamp100ns, const BYTE* data, DWORD size)>;
int WriteWindowList();
HRESULT ValidateWindowTarget(UINT64 window_handle, DWORD pid,
UINT64 expected_creation_time);
HRESULT CaptureProcessAudio(DWORD pid, UINT64 expected_creation_time,
HANDLE stop_event, const PCMWriter& writer);
} // namespace screener::capture