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

Side by Side Diff: media/filters/memory_data_source.cc

Issue 2267963002: Add support for cancellation of demuxer reads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix and add tests. Created 4 years, 3 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/filters/memory_data_source.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/filters/memory_data_source.h" 5 #include "media/filters/memory_data_source.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 25 matching lines...) Expand all
36 memcpy(data, data_ + position, clamped_size); 36 memcpy(data, data_ + position, clamped_size);
37 } 37 }
38 38
39 read_cb.Run(clamped_size); 39 read_cb.Run(clamped_size);
40 } 40 }
41 41
42 void MemoryDataSource::Stop() { 42 void MemoryDataSource::Stop() {
43 is_stopped_ = true; 43 is_stopped_ = true;
44 } 44 }
45 45
46 void MemoryDataSource::Abort() {}
47
46 bool MemoryDataSource::GetSize(int64_t* size_out) { 48 bool MemoryDataSource::GetSize(int64_t* size_out) {
47 *size_out = size_; 49 *size_out = size_;
48 return true; 50 return true;
49 } 51 }
50 52
51 bool MemoryDataSource::IsStreaming() { 53 bool MemoryDataSource::IsStreaming() {
52 return false; 54 return false;
53 } 55 }
54 56
55 void MemoryDataSource::SetBitrate(int bitrate) {} 57 void MemoryDataSource::SetBitrate(int bitrate) {}
56 58
57 } // namespace media 59 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/memory_data_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698