chromium/third_party/openscreen/src/cast/streaming/impl/rtp_packet_parser_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cast/streaming/impl/rtp_packet_parser.h"

#include "cast/streaming/impl/rtp_defines.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "util/big_endian.h"

ElementsAreArray;

namespace openscreen::cast {
namespace {

// Tests that a simple packet for a key frame can be parsed.
TEST(RtpPacketParserTest, ParsesPacketForKeyFrame) {}

// Tests that a packet which includes a "referenced frame ID" can be parsed.
TEST(RtpPacketParserTest, ParsesPacketForNonKeyFrameWithReferenceFrameId) {}

// Tests that a packet which lacks a "referenced frame ID" field can be parsed,
// but the parser will provide the implied referenced_frame_id value in the
// result.
TEST(RtpPacketParserTest, ParsesPacketForNonKeyFrameWithoutReferenceFrameId) {}

// Tests that a packet indicating a new playout delay can be parsed.
TEST(RtpPacketParserTest, ParsesPacketWithAdaptiveLatencyExtension) {}

// Tests that the parser can handle multiple Cast Header Extensions in a RTP
// packet, and ignores all but the one (Adaptive Latency) that it understands.
TEST(RtpPacketParserTest, ParsesPacketWithMultipleExtensions) {}

// Tests that the parser ignores packets from an unknown source.
TEST(RtpPacketParserTest, IgnoresPacketWithWrongSsrc) {}

// Tests that unexpected truncations in the RTP packets does not crash the
// parser, and that it correctly errors-out.
TEST(RtpPacketParserTest, RejectsTruncatedPackets) {}

// Tests that the parser rejects invalid packet ID values.
TEST(RtpPacketParserTest, RejectsPacketWithBadFramePacketIds) {}

}  // namespace
}  // namespace openscreen::cast