| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "media/base/fake_text_track_stream.h" | 5 #include "media/base/fake_text_track_stream.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 13 #include "media/base/decoder_buffer.h" | 13 #include "media/base/decoder_buffer.h" |
| 14 #include "media/filters/webvtt_util.h" | 14 #include "media/filters/webvtt_util.h" |
| 15 | 15 |
| 16 namespace media { | 16 namespace media { |
| 17 | 17 |
| 18 FakeTextTrackStream::FakeTextTrackStream() | 18 FakeTextTrackStream::FakeTextTrackStream() |
| 19 : task_runner_(base::ThreadTaskRunnerHandle::Get()), | 19 : task_runner_(base::ThreadTaskRunnerHandle::Get()), |
| 20 stopping_(false) { | 20 stopping_(false) { |
| 21 } | 21 } |
| 22 | 22 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); | 88 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void FakeTextTrackStream::Stop() { | 91 void FakeTextTrackStream::Stop() { |
| 92 stopping_ = true; | 92 stopping_ = true; |
| 93 if (!read_cb_.is_null()) | 93 if (!read_cb_.is_null()) |
| 94 AbortPendingRead(); | 94 AbortPendingRead(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace media | 97 } // namespace media |
| OLD | NEW |