Index: media/base/demuxer.h |
diff --git a/media/base/demuxer.h b/media/base/demuxer.h |
index 972d250a094cfdbd84d275718d3b837edaa4c15c..2534cb205b3c85e9125674449b7eaafc3ee01711 100644 |
--- a/media/base/demuxer.h |
+++ b/media/base/demuxer.h |
@@ -6,6 +6,7 @@ |
#define MEDIA_BASE_DEMUXER_H_ |
#include "base/memory/ref_counted.h" |
+#include "media/base/data_source.h" |
#include "media/base/demuxer_stream.h" |
#include "media/base/media_export.h" |
@@ -16,7 +17,26 @@ |
namespace media { |
-class FilterHost; |
+class DemuxerHost : public DataSourceHost { |
+ public: |
+ // Get the duration of the media in microseconds. If the duration has not |
+ // been determined yet, then returns 0. |
+ virtual void SetDuration(base::TimeDelta duration) = 0; |
+ |
+ // Set the approximate amount of playable data buffered so far in micro- |
+ // seconds. |
+ virtual void SetBufferedTime(base::TimeDelta buffered_time) = 0; |
+ |
+ // Sets the byte offset at which the client is requesting the video. |
+ virtual void SetCurrentReadPosition(int64 offset) = 0; |
+ |
+ // Stops execution of the pipeline due to a fatal error. Do not call this |
+ // method with PIPELINE_OK. |
+ virtual void OnDemuxerError(PipelineStatus error) = 0; |
+ |
+ protected: |
+ virtual ~DemuxerHost() {} |
Ami GONE FROM CHROMIUM
2011/12/15 18:39:08
Out-of-line please.
(even though here the clang pl
acolwell GONE FROM CHROMIUM
2011/12/15 20:57:59
Done and made public since I don't have a good rea
|
+}; |
class MEDIA_EXPORT Demuxer |
: public base::RefCountedThreadSafe<Demuxer> { |
@@ -27,7 +47,7 @@ class MEDIA_EXPORT Demuxer |
// to be released before the host object is destroyed by the pipeline. |
// |
// TODO(acolwell): Change this to a narrow DemuxerHost interface. |
- virtual void set_host(FilterHost* host); |
+ virtual void set_host(DemuxerHost* host); |
// The pipeline playback rate has been changed. Demuxers may implement this |
// method if they need to respond to this call. |
@@ -70,13 +90,13 @@ class MEDIA_EXPORT Demuxer |
protected: |
Ami GONE FROM CHROMIUM
2011/12/15 18:39:08
Ditto q about documenting protected.
acolwell GONE FROM CHROMIUM
2011/12/15 20:57:59
Done.
|
Demuxer(); |
- FilterHost* host() { return host_; } |
+ DemuxerHost* host() { return host_; } |
friend class base::RefCountedThreadSafe<Demuxer>; |
virtual ~Demuxer(); |
private: |
- FilterHost* host_; |
+ DemuxerHost* host_; |
DISALLOW_COPY_AND_ASSIGN(Demuxer); |
}; |