Squashed buildout of the tgcalls testbench: - CLI test tool with --mode p2p/reflector/group/group-churn, cross-version interop (--version, --version2), and quiet/summary output - Linux toolchain + Docker multi-stage build, AWS Fargate mass test harness, local parallel mass test harness with signaling loss simulation - SCTP writable gate, retransmission timer tuning, role-based handshake - InstanceV2CompatImpl (PeerConnection backend with V2Impl signaling) and SignalingTranslator for v14.0.0 interop - In-process Go/Pion SFU (ICE+DTLS+SRTP+SCTP per participant) with audio RTP forwarding, ActiveAudio/VideoSsrcs data channel broadcast, RTCP feedback path, and CGo c-archive integration - GroupInstanceReferenceImpl (PeerConnection group-call) and mixed-impl group mode (--reference-participants), with SDP munging for simulcast - H264 simulcast group video (FakeVideoTrackSource pattern generator, FakeVideoSink frame counting, --video flag, two-pass channel setup, reactive video setup from ActiveVideoSsrcs) - Group churn stress mode (--mode group-churn, --churn-cycles) - SFU stream-quality adaptation: BandwidthEstimator, LayerSelector state machine, RtxRingBuffer, simulcast SSRC rewrite - Transport-cc feedback generation, NetworkSimulator (delay/jitter/loss/ token-bucket bandwidth), --network-scenario step-down-up - CLAUDE.md updates throughout Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
24 lines
879 B
C++
24 lines
879 B
C++
#pragma once
|
|
#include "api/video/video_frame.h"
|
|
#include "api/video/video_sink_interface.h"
|
|
#include <atomic>
|
|
|
|
class FakeVideoSink : public rtc::VideoSinkInterface<webrtc::VideoFrame> {
|
|
public:
|
|
void OnFrame(const webrtc::VideoFrame& frame) override {
|
|
frameCount_.fetch_add(1, std::memory_order_relaxed);
|
|
int w = frame.width();
|
|
int h = frame.height();
|
|
lastWidth_.store(w, std::memory_order_relaxed);
|
|
lastHeight_.store(h, std::memory_order_relaxed);
|
|
}
|
|
int lastWidth() const { return lastWidth_.load(std::memory_order_relaxed); }
|
|
int lastHeight() const { return lastHeight_.load(std::memory_order_relaxed); }
|
|
int frameCount() const {
|
|
return frameCount_.load(std::memory_order_relaxed);
|
|
}
|
|
private:
|
|
std::atomic<int> frameCount_{0};
|
|
std::atomic<int> lastWidth_{0};
|
|
std::atomic<int> lastHeight_{0};
|
|
};
|