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

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

Issue 10800041: Update media duration if data is appended after the previous duration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « media/base/clock.cc ('k') | media/base/demuxer.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 (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/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "media/base/media_export.h" 11 #include "media/base/media_export.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 class MEDIA_EXPORT DataSourceHost { 15 class MEDIA_EXPORT DataSourceHost {
16 public: 16 public:
17 // Set the total size of the media file. 17 // Set the total size of the media file.
18 virtual void SetTotalBytes(int64 total_bytes) = 0; 18 virtual void SetTotalBytes(int64 total_bytes) = 0;
19 19
20 // Notify the host that byte range [start,end] has been buffered. 20 // Notify the host that byte range [start,end] has been buffered.
21 // TODO(fischman): remove this method when demuxing is push-based instead of 21 // TODO(fischman): remove this method when demuxing is push-based instead of
22 // pull-based. http://crbug.com/131444 22 // pull-based. http://crbug.com/131444
23 virtual void AddBufferedByteRange(int64 start, int64 end) = 0; 23 virtual void AddBufferedByteRange(int64 start, int64 end) = 0;
24 24
25 // Notify the host that time range [start,end] has been buffered.
26 virtual void AddBufferedTimeRange(base::TimeDelta start,
vrk (LEFT CHROMIUM) 2012/07/19 19:15:42 (this change was not necessary; just a clean-up mo
27 base::TimeDelta end) = 0;
28
29 protected: 25 protected:
30 virtual ~DataSourceHost(); 26 virtual ~DataSourceHost();
31 }; 27 };
32 28
33 class MEDIA_EXPORT DataSource : public base::RefCountedThreadSafe<DataSource> { 29 class MEDIA_EXPORT DataSource : public base::RefCountedThreadSafe<DataSource> {
34 public: 30 public:
35 typedef base::Callback<void(int64, int64)> StatusCallback; 31 typedef base::Callback<void(int64, int64)> StatusCallback;
36 typedef base::Callback<void(int)> ReadCB; 32 typedef base::Callback<void(int)> ReadCB;
37 static const int kReadError; 33 static const int kReadError;
38 34
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 70
75 private: 71 private:
76 DataSourceHost* host_; 72 DataSourceHost* host_;
77 73
78 DISALLOW_COPY_AND_ASSIGN(DataSource); 74 DISALLOW_COPY_AND_ASSIGN(DataSource);
79 }; 75 };
80 76
81 } // namespace media 77 } // namespace media
82 78
83 #endif // MEDIA_BASE_DATA_SOURCE_H_ 79 #endif // MEDIA_BASE_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « media/base/clock.cc ('k') | media/base/demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698