OLD | NEW |
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 #ifndef WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 5 #ifndef WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
6 #define WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 6 #define WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 void Seek(base::TimeDelta time); | 69 void Seek(base::TimeDelta time); |
70 | 70 |
71 void CancelPendingSeek(); | 71 void CancelPendingSeek(); |
72 | 72 |
73 void NotifyDemuxerReady(const std::string& key_system); | 73 void NotifyDemuxerReady(const std::string& key_system); |
74 | 74 |
75 // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer. | 75 // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer. |
76 // If it's the first request after the seek, |seek_done| will be true. | 76 // If it's the first request after the seek, |seek_done| will be true. |
77 void OnReadFromDemuxer(media::DemuxerStream::Type type, bool seek_done); | 77 void OnReadFromDemuxer(media::DemuxerStream::Type type, bool seek_done); |
78 | 78 |
| 79 // Called when the player needs the new config data from ChunkDemuxer. |
| 80 void OnMediaConfigRequest(); |
| 81 |
79 // Called by the Destroyer to destroy an instance of this object. | 82 // Called by the Destroyer to destroy an instance of this object. |
80 void Destroy(); | 83 void Destroy(); |
81 | 84 |
82 private: | 85 private: |
83 // This is private to enforce use of the Destroyer. | 86 // This is private to enforce use of the Destroyer. |
84 virtual ~MediaSourceDelegate(); | 87 virtual ~MediaSourceDelegate(); |
85 | 88 |
86 // Methods inherited from DemuxerHost. | 89 // Methods inherited from DemuxerHost. |
87 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE; | 90 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE; |
88 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE; | 91 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> video_params_; | 154 scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> video_params_; |
152 | 155 |
153 bool seeking_; | 156 bool seeking_; |
154 size_t access_unit_size_; | 157 size_t access_unit_size_; |
155 | 158 |
156 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); | 159 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); |
157 }; | 160 }; |
158 | 161 |
159 } // namespace webkit_media | 162 } // namespace webkit_media |
160 #endif // WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 163 #endif // WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
OLD | NEW |