Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: media/base/fake_text_track_stream.cc

Issue 2667283002: Refactor MediaResource to be multi-stream capable (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/fake_text_track_stream.h ('k') | media/base/media_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 bool FakeTextTrackStream::enabled() const { 49 bool FakeTextTrackStream::enabled() const {
50 return true; 50 return true;
51 } 51 }
52 52
53 void FakeTextTrackStream::set_enabled(bool enabled, base::TimeDelta timestamp) { 53 void FakeTextTrackStream::set_enabled(bool enabled, base::TimeDelta timestamp) {
54 NOTIMPLEMENTED(); 54 NOTIMPLEMENTED();
55 } 55 }
56 56
57 void FakeTextTrackStream::SetStreamStatusChangeCB(
58 const StreamStatusChangeCB& cb) {
59 NOTIMPLEMENTED();
60 }
61
62 void FakeTextTrackStream::SatisfyPendingRead( 57 void FakeTextTrackStream::SatisfyPendingRead(
63 const base::TimeDelta& start, 58 const base::TimeDelta& start,
64 const base::TimeDelta& duration, 59 const base::TimeDelta& duration,
65 const std::string& id, 60 const std::string& id,
66 const std::string& content, 61 const std::string& content,
67 const std::string& settings) { 62 const std::string& settings) {
68 DCHECK(!read_cb_.is_null()); 63 DCHECK(!read_cb_.is_null());
69 64
70 const uint8_t* const data_buf = 65 const uint8_t* const data_buf =
71 reinterpret_cast<const uint8_t*>(content.data()); 66 reinterpret_cast<const uint8_t*>(content.data());
(...skipping 29 matching lines...) Expand all
101 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer()); 96 base::ResetAndReturn(&read_cb_).Run(kOk, DecoderBuffer::CreateEOSBuffer());
102 } 97 }
103 98
104 void FakeTextTrackStream::Stop() { 99 void FakeTextTrackStream::Stop() {
105 stopping_ = true; 100 stopping_ = true;
106 if (!read_cb_.is_null()) 101 if (!read_cb_.is_null())
107 AbortPendingRead(); 102 AbortPendingRead();
108 } 103 }
109 104
110 } // namespace media 105 } // namespace media
OLDNEW
« no previous file with comments | « media/base/fake_text_track_stream.h ('k') | media/base/media_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698