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 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 // TODO(wolenetz): Refactor to instead verify the expected signalling or lack | 247 // TODO(wolenetz): Refactor to instead verify the expected signalling or lack |
248 // thereof of new coded frame group by the FrameProcessor. See | 248 // thereof of new coded frame group by the FrameProcessor. See |
249 // https://crbug.com/580613. | 249 // https://crbug.com/580613. |
250 bool in_coded_frame_group() { | 250 bool in_coded_frame_group() { |
251 return frame_processor_->in_coded_frame_group_; | 251 return frame_processor_->in_coded_frame_group_; |
252 } | 252 } |
253 | 253 |
254 base::MessageLoop message_loop_; | 254 base::MessageLoop message_loop_; |
255 StrictMock<FrameProcessorTestCallbackHelper> callbacks_; | 255 StrictMock<FrameProcessorTestCallbackHelper> callbacks_; |
256 | 256 |
257 scoped_ptr<FrameProcessor> frame_processor_; | 257 std::unique_ptr<FrameProcessor> frame_processor_; |
258 base::TimeDelta append_window_start_; | 258 base::TimeDelta append_window_start_; |
259 base::TimeDelta append_window_end_; | 259 base::TimeDelta append_window_end_; |
260 base::TimeDelta timestamp_offset_; | 260 base::TimeDelta timestamp_offset_; |
261 scoped_ptr<ChunkDemuxerStream> audio_; | 261 std::unique_ptr<ChunkDemuxerStream> audio_; |
262 scoped_ptr<ChunkDemuxerStream> video_; | 262 std::unique_ptr<ChunkDemuxerStream> video_; |
263 const TrackId audio_id_; | 263 const TrackId audio_id_; |
264 const TrackId video_id_; | 264 const TrackId video_id_; |
265 const base::TimeDelta frame_duration_; // Currently the same for all streams. | 265 const base::TimeDelta frame_duration_; // Currently the same for all streams. |
266 const BufferQueue empty_queue_; | 266 const BufferQueue empty_queue_; |
267 const TextBufferQueueMap empty_text_buffers_; | 267 const TextBufferQueueMap empty_text_buffers_; |
268 | 268 |
269 // StoreStatusAndBuffer's most recent result. | 269 // StoreStatusAndBuffer's most recent result. |
270 DemuxerStream::Status last_read_status_; | 270 DemuxerStream::Status last_read_status_; |
271 scoped_refptr<DecoderBuffer> last_read_buffer_; | 271 scoped_refptr<DecoderBuffer> last_read_buffer_; |
272 bool read_callback_called_; | 272 bool read_callback_called_; |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 EXPECT_EQ(frame_duration_ * -9, timestamp_offset_); | 738 EXPECT_EQ(frame_duration_ * -9, timestamp_offset_); |
739 EXPECT_TRUE(in_coded_frame_group()); | 739 EXPECT_TRUE(in_coded_frame_group()); |
740 CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }"); | 740 CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }"); |
741 CheckReadsThenReadStalls(audio_.get(), "0 10:100"); | 741 CheckReadsThenReadStalls(audio_.get(), "0 10:100"); |
742 } | 742 } |
743 | 743 |
744 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true)); | 744 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true)); |
745 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false)); | 745 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false)); |
746 | 746 |
747 } // namespace media | 747 } // namespace media |
OLD | NEW |