#include "cast/streaming/public/receiver.h"
#include <stdint.h>
#include <algorithm>
#include <array>
#include <utility>
#include <vector>
#include "cast/streaming/impl/compound_rtcp_parser.h"
#include "cast/streaming/impl/frame_crypto.h"
#include "cast/streaming/public/constants.h"
#include "cast/streaming/public/encoded_frame.h"
#include "cast/streaming/public/environment.h"
#include "cast/streaming/impl/receiver_packet_router.h"
#include "cast/streaming/impl/rtcp_common.h"
#include "cast/streaming/impl/rtcp_session.h"
#include "cast/streaming/impl/rtp_defines.h"
#include "cast/streaming/impl/rtp_packetizer.h"
#include "cast/streaming/rtp_time.h"
#include "cast/streaming/impl/sender_report_builder.h"
#include "cast/streaming/impl/session_config.h"
#include "cast/streaming/ssrc.h"
#include "cast/streaming/testing/mock_environment.h"
#include "cast/streaming/testing/simple_socket_subscriber.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "platform/api/time.h"
#include "platform/api/udp_socket.h"
#include "platform/base/error.h"
#include "platform/base/ip_address.h"
#include "platform/base/span.h"
#include "platform/base/udp_packet.h"
#include "platform/test/byte_view_test_util.h"
#include "platform/test/fake_clock.h"
#include "platform/test/fake_task_runner.h"
#include "util/chrono_helpers.h"
#include "util/osp_logging.h"
_;
AtLeast;
Gt;
Invoke;
SaveArg;
namespace openscreen::cast {
namespace {
constexpr Ssrc kSenderSsrc = …;
constexpr Ssrc kReceiverSsrc = …;
constexpr int kRtpTimebase = …;
constexpr milliseconds kTargetPlayoutDelay{ … };
constexpr auto kAesKey = …;
constexpr auto kCastIvMask = …;
constexpr milliseconds kTargetPlayoutDelayChange{ … };
constexpr RtpPayloadType kRtpPayloadType = …;
constexpr int kMaxRtpPacketSize = …;
constexpr auto kOneWayNetworkDelay = …;
constexpr auto kRoundTripNetworkDelay = …;
static_assert …;
struct SimulatedFrame : public EncodedFrame { … };
constexpr milliseconds SimulatedFrame::kFrameDuration;
constexpr milliseconds SimulatedFrame::kTargetPlayoutDelayChange;
constexpr int SimulatedFrame::kPlayoutChangeAtFrame;
class MockSender : public CompoundRtcpParser::Client { … };
class MockConsumer : public Receiver::Consumer { … };
class ReceiverTest : public testing::Test { … };
TEST_F(ReceiverTest, ReceivesAndSendsRtcpPackets) { … }
TEST_F(ReceiverTest, ReceivesFramesInOrder) { … }
TEST_F(ReceiverTest, ReceivesFramesOutOfOrder) { … }
TEST_F(ReceiverTest, RequestsKeyFrameToRectifyPictureLoss) { … }
TEST_F(ReceiverTest, PLICanBeDisabled) { … }
TEST_F(ReceiverTest, EatsItsFill) { … }
TEST_F(ReceiverTest, DropsLateFrames) { … }
}
}