RtpPacket::UpdateDelayStatistics was previously optimized with several sanity checks added. These sanity checks caused many of the unit tests in peerconnection_integration_unittests to fail and the CL was therefore reverted. This CL contains the sanity checks along with patches so that the unit tests pass. Bug: webrtc:9439 Change-Id: Ia5f5e8b125e5f3f4b79d433e2282901143530a25 Reviewed-on: https://webrtc-review.googlesource.com/99802 Reviewed-by: Björn Terelius <terelius@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Johannes Kron <kron@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24813}
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef MEDIA_BASE_FAKEFRAMESOURCE_H_
|
|
#define MEDIA_BASE_FAKEFRAMESOURCE_H_
|
|
|
|
#include "api/video/video_frame.h"
|
|
|
|
#include "rtc_base/timeutils.h"
|
|
|
|
namespace cricket {
|
|
|
|
class FakeFrameSource {
|
|
public:
|
|
FakeFrameSource(int width,
|
|
int height,
|
|
int interval_us,
|
|
int64_t timestamp_offset_us);
|
|
FakeFrameSource(int width, int height, int interval_us);
|
|
|
|
webrtc::VideoRotation GetRotation() const;
|
|
void SetRotation(webrtc::VideoRotation rotation);
|
|
|
|
webrtc::VideoFrame GetFrame();
|
|
webrtc::VideoFrame GetFrameRotationApplied();
|
|
|
|
// Override configuration.
|
|
webrtc::VideoFrame GetFrame(int width,
|
|
int height,
|
|
webrtc::VideoRotation rotation,
|
|
int interval_us);
|
|
|
|
private:
|
|
const int width_;
|
|
const int height_;
|
|
const int interval_us_;
|
|
|
|
webrtc::VideoRotation rotation_ = webrtc::kVideoRotation_0;
|
|
int64_t next_timestamp_us_;
|
|
};
|
|
|
|
} // namespace cricket
|
|
|
|
#endif // MEDIA_BASE_FAKEFRAMESOURCE_H_
|