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

Side by Side Diff: media/base/data_source.h

Issue 212803004: Separate DemuxerHost from DataSourceHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
OLDNEW
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 #ifndef MEDIA_BASE_DATA_SOURCE_H_ 5 #ifndef MEDIA_BASE_DATA_SOURCE_H_
6 #define MEDIA_BASE_DATA_SOURCE_H_ 6 #define MEDIA_BASE_DATA_SOURCE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 class MEDIA_EXPORT DataSourceHost { 14 class MEDIA_EXPORT DataSourceHost {
15 public: 15 public:
16 // Set the total size of the media file. 16 // Set the total size of the media file.
17 virtual void SetTotalBytes(int64 total_bytes) = 0; 17 virtual void SetTotalBytes(int64 total_bytes) = 0;
18 18
19 // Notify the host that byte range [start,end] has been buffered. 19 // Notify the host that byte range [start,end] has been buffered.
20 // TODO(fischman): remove this method when demuxing is push-based instead of 20 // TODO(fischman): remove this method when demuxing is push-based instead of
21 // pull-based. http://crbug.com/131444 21 // pull-based. http://crbug.com/131444
22 virtual void AddBufferedByteRange(int64 start, int64 end) = 0; 22 virtual void AddBufferedByteRange(int64 start, int64 end) = 0;
23 23
24 // Notify the host that time range [start,end] has been buffered.
25 virtual void AddBufferedTimeRange(base::TimeDelta start,
26 base::TimeDelta end) = 0;
27
28 protected: 24 protected:
29 virtual ~DataSourceHost(); 25 virtual ~DataSourceHost();
30 }; 26 };
31 27
32 class MEDIA_EXPORT DataSource { 28 class MEDIA_EXPORT DataSource {
33 public: 29 public:
34 typedef base::Callback<void(int64, int64)> StatusCallback; 30 typedef base::Callback<void(int64, int64)> StatusCallback;
35 typedef base::Callback<void(int)> ReadCB; 31 typedef base::Callback<void(int)> ReadCB;
36 static const int kReadError; 32 static const int kReadError;
37 33
(...skipping 29 matching lines...) Expand all
67 63
68 private: 64 private:
69 DataSourceHost* host_; 65 DataSourceHost* host_;
70 66
71 DISALLOW_COPY_AND_ASSIGN(DataSource); 67 DISALLOW_COPY_AND_ASSIGN(DataSource);
72 }; 68 };
73 69
74 } // namespace media 70 } // namespace media
75 71
76 #endif // MEDIA_BASE_DATA_SOURCE_H_ 72 #endif // MEDIA_BASE_DATA_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698