OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 const int kDefaultSecondClusterEndTimestamp = 132; | 78 const int kDefaultSecondClusterEndTimestamp = 132; |
79 | 79 |
80 base::TimeDelta kDefaultDuration() { | 80 base::TimeDelta kDefaultDuration() { |
81 return base::TimeDelta::FromMilliseconds(201224); | 81 return base::TimeDelta::FromMilliseconds(201224); |
82 } | 82 } |
83 | 83 |
84 // Write an integer into buffer in the form of vint that spans 8 bytes. | 84 // Write an integer into buffer in the form of vint that spans 8 bytes. |
85 // The data pointed by |buffer| should be at least 8 bytes long. | 85 // The data pointed by |buffer| should be at least 8 bytes long. |
86 // |number| should be in the range 0 <= number < 0x00FFFFFFFFFFFFFF. | 86 // |number| should be in the range 0 <= number < 0x00FFFFFFFFFFFFFF. |
87 static void WriteInt64(uint8* buffer, int64 number) { | 87 static void WriteInt64(uint8* buffer, int64 number) { |
88 DCHECK(number >= 0 && number < GG_LONGLONG(0x00FFFFFFFFFFFFFF)); | 88 DCHECK(number >= 0 && number < 0x00FFFFFFFFFFFFFFLL); |
89 buffer[0] = 0x01; | 89 buffer[0] = 0x01; |
90 int64 tmp = number; | 90 int64 tmp = number; |
91 for (int i = 7; i > 0; i--) { | 91 for (int i = 7; i > 0; i--) { |
92 buffer[i] = tmp & 0xff; | 92 buffer[i] = tmp & 0xff; |
93 tmp >>= 8; | 93 tmp >>= 8; |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 MATCHER_P(HasTimestamp, timestamp_in_ms, "") { | 97 MATCHER_P(HasTimestamp, timestamp_in_ms, "") { |
98 return arg.get() && !arg->end_of_stream() && | 98 return arg.get() && !arg->end_of_stream() && |
(...skipping 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3207 // Verify that audio & video streams continue to return expected values. | 3207 // Verify that audio & video streams continue to return expected values. |
3208 CheckExpectedBuffers(audio_stream, "160 180"); | 3208 CheckExpectedBuffers(audio_stream, "160 180"); |
3209 CheckExpectedBuffers(video_stream, "180 210"); | 3209 CheckExpectedBuffers(video_stream, "180 210"); |
3210 } | 3210 } |
3211 | 3211 |
3212 // TODO(wolenetz): Enable testing of new frame processor based on this flag, | 3212 // TODO(wolenetz): Enable testing of new frame processor based on this flag, |
3213 // once the new processor has landed. See http://crbug.com/249422. | 3213 // once the new processor has landed. See http://crbug.com/249422. |
3214 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, ChunkDemuxerTest, Values(true)); | 3214 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, ChunkDemuxerTest, Values(true)); |
3215 | 3215 |
3216 } // namespace media | 3216 } // namespace media |
OLD | NEW |