OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Joint LogSerializer and LogDeserializer testing to make sure they stay in | 5 // Joint LogSerializer and LogDeserializer testing to make sure they stay in |
6 // sync. | 6 // sync. |
7 | 7 |
8 #include "media/cast/logging/log_deserializer.h" | 8 #include "media/cast/logging/log_deserializer.h" |
9 #include "media/cast/logging/log_serializer.h" | 9 #include "media/cast/logging/log_serializer.h" |
10 #include "media/cast/logging/logging_defines.h" | 10 #include "media/cast/logging/logging_defines.h" |
11 #include "media/cast/logging/proto/proto_utils.h" | 11 #include "media/cast/logging/proto/proto_utils.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 using media::cast::proto::AggregatedFrameEvent; | 14 using media::cast::proto::AggregatedFrameEvent; |
15 using media::cast::proto::AggregatedPacketEvent; | 15 using media::cast::proto::AggregatedPacketEvent; |
16 using media::cast::proto::BasePacketEvent; | 16 using media::cast::proto::BasePacketEvent; |
17 using media::cast::proto::LogMetadata; | 17 using media::cast::proto::LogMetadata; |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 const media::cast::CastLoggingEvent kVideoFrameEvents[] = { | 21 const media::cast::CastLoggingEvent kVideoFrameEvents[] = { |
22 media::cast::kVideoFrameCaptured, media::cast::kVideoFrameReceived, | 22 media::cast::kVideoFrameCaptured, media::cast::kVideoFrameReceived, |
23 media::cast::kVideoFrameSentToEncoder, media::cast::kVideoFrameEncoded, | 23 media::cast::kVideoFrameSentToEncoder, media::cast::kVideoFrameEncoded, |
24 media::cast::kVideoFrameDecoded, media::cast::kVideoRenderDelay}; | 24 media::cast::kVideoFrameDecoded, media::cast::kVideoRenderDelay}; |
25 | 25 |
26 const media::cast::CastLoggingEvent kVideoPacketEvents[] = { | 26 const media::cast::CastLoggingEvent kVideoPacketEvents[] = { |
27 media::cast::kPacketSentToPacer, media::cast::kPacketSentToNetwork, | 27 media::cast::kVideoPacketSentToPacer, |
28 media::cast::kVideoPacketReceived}; | 28 media::cast::kVideoPacketSentToNetwork, media::cast::kVideoPacketReceived}; |
29 | 29 |
30 // The frame event fields cycle through these numbers. | 30 // The frame event fields cycle through these numbers. |
31 const int kEncodedFrameSize[] = {512, 425, 399, 400, 237}; | 31 const int kEncodedFrameSize[] = {512, 425, 399, 400, 237}; |
32 const int kDelayMillis[] = {15, 4, 8, 42, 23, 16}; | 32 const int kDelayMillis[] = {15, 4, 8, 42, 23, 16}; |
33 | 33 |
34 const int kMaxSerializedBytes = 10000; | 34 const int kMaxSerializedBytes = 10000; |
35 } | 35 } |
36 | 36 |
37 namespace media { | 37 namespace media { |
38 namespace cast { | 38 namespace cast { |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 compressed, | 216 compressed, |
217 100, | 217 100, |
218 serialized_.get(), | 218 serialized_.get(), |
219 &output_bytes_); | 219 &output_bytes_); |
220 EXPECT_FALSE(success); | 220 EXPECT_FALSE(success); |
221 EXPECT_EQ(0, output_bytes_); | 221 EXPECT_EQ(0, output_bytes_); |
222 } | 222 } |
223 | 223 |
224 } // namespace cast | 224 } // namespace cast |
225 } // namespace media | 225 } // namespace media |
OLD | NEW |