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.
28 lines
860 B
C++
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
|