xref: /aosp_15_r20/external/webrtc/test/pc/e2e/analyzer/video/simulcast_dummy_buffer_helper.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef TEST_PC_E2E_ANALYZER_VIDEO_SIMULCAST_DUMMY_BUFFER_HELPER_H_
12 #define TEST_PC_E2E_ANALYZER_VIDEO_SIMULCAST_DUMMY_BUFFER_HELPER_H_
13 
14 #include "api/video/video_frame.h"
15 #include "api/video/video_frame_buffer.h"
16 
17 namespace webrtc {
18 namespace webrtc_pc_e2e {
19 
20 // Creates a special video frame buffer that should be used to create frames
21 // during Selective Forwarding Unit (SFU) emulation. Such frames are used when
22 // original was discarded and some frame is required to be passed upstream
23 // to make WebRTC pipeline happy and not request key frame on the received
24 // stream due to lack of incoming frames.
25 rtc::scoped_refptr<webrtc::VideoFrameBuffer> CreateDummyFrameBuffer();
26 
27 // Tests if provided frame contains a buffer created by
28 // `CreateDummyFrameBuffer`.
29 bool IsDummyFrame(const webrtc::VideoFrame& video_frame);
30 
31 }  // namespace webrtc_pc_e2e
32 }  // namespace webrtc
33 
34 #endif  // TEST_PC_E2E_ANALYZER_VIDEO_SIMULCAST_DUMMY_BUFFER_HELPER_H_
35