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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 ChunkDemuxerTest() | 157 ChunkDemuxerTest() |
158 : append_window_end_for_next_append_(kInfiniteDuration()) { | 158 : append_window_end_for_next_append_(kInfiniteDuration()) { |
159 CreateNewDemuxer(); | 159 CreateNewDemuxer(); |
160 } | 160 } |
161 | 161 |
162 void CreateNewDemuxer() { | 162 void CreateNewDemuxer() { |
163 base::Closure open_cb = | 163 base::Closure open_cb = |
164 base::Bind(&ChunkDemuxerTest::DemuxerOpened, base::Unretained(this)); | 164 base::Bind(&ChunkDemuxerTest::DemuxerOpened, base::Unretained(this)); |
165 Demuxer::NeedKeyCB need_key_cb = | 165 Demuxer::NeedKeyCB need_key_cb = |
166 base::Bind(&ChunkDemuxerTest::DemuxerNeedKey, base::Unretained(this)); | 166 base::Bind(&ChunkDemuxerTest::DemuxerNeedKey, base::Unretained(this)); |
167 demuxer_.reset(new ChunkDemuxer(open_cb, need_key_cb, | 167 demuxer_.reset( |
168 base::Bind(&LogFunc))); | 168 new ChunkDemuxer(open_cb, need_key_cb, base::Bind(&LogFunc), false)); |
169 } | 169 } |
170 | 170 |
171 virtual ~ChunkDemuxerTest() { | 171 virtual ~ChunkDemuxerTest() { |
172 ShutdownDemuxer(); | 172 ShutdownDemuxer(); |
173 } | 173 } |
174 | 174 |
175 void CreateInitSegment(int stream_flags, | 175 void CreateInitSegment(int stream_flags, |
176 bool is_audio_encrypted, bool is_video_encrypted, | 176 bool is_audio_encrypted, bool is_video_encrypted, |
177 scoped_ptr<uint8[]>* buffer, | 177 scoped_ptr<uint8[]>* buffer, |
178 int* size) { | 178 int* size) { |
(...skipping 2963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3142 // NOTE: we start at 175 here because the buffer at 125 was returned | 3142 // NOTE: we start at 175 here because the buffer at 125 was returned |
3143 // to the pending read initiated above. | 3143 // to the pending read initiated above. |
3144 CheckExpectedBuffers(text_stream, "175 225"); | 3144 CheckExpectedBuffers(text_stream, "175 225"); |
3145 | 3145 |
3146 // Verify that audio & video streams contiue to return expected values. | 3146 // Verify that audio & video streams contiue to return expected values. |
3147 CheckExpectedBuffers(audio_stream, "160 180"); | 3147 CheckExpectedBuffers(audio_stream, "160 180"); |
3148 CheckExpectedBuffers(video_stream, "180 210"); | 3148 CheckExpectedBuffers(video_stream, "180 210"); |
3149 } | 3149 } |
3150 | 3150 |
3151 } // namespace media | 3151 } // namespace media |
OLD | NEW |