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 CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 // Called when the player needs the new config data from ChunkDemuxer. | 100 // Called when the player needs the new config data from ChunkDemuxer. |
101 void OnMediaConfigRequest(); | 101 void OnMediaConfigRequest(); |
102 | 102 |
103 // Called by the Destroyer to destroy an instance of this object. | 103 // Called by the Destroyer to destroy an instance of this object. |
104 void Destroy(); | 104 void Destroy(); |
105 | 105 |
106 // Called on the main thread to check whether the video stream is encrypted. | 106 // Called on the main thread to check whether the video stream is encrypted. |
107 bool IsVideoEncrypted(); | 107 bool IsVideoEncrypted(); |
108 | 108 |
| 109 // Gets the ChunkDemuxer timeline offset. |
| 110 base::Time GetTimelineOffset() const; |
| 111 |
109 private: | 112 private: |
110 // This is private to enforce use of the Destroyer. | 113 // This is private to enforce use of the Destroyer. |
111 virtual ~MediaSourceDelegate(); | 114 virtual ~MediaSourceDelegate(); |
112 | 115 |
113 // Methods inherited from DemuxerHost. | 116 // Methods inherited from DemuxerHost. |
114 virtual void AddBufferedTimeRange(base::TimeDelta start, | 117 virtual void AddBufferedTimeRange(base::TimeDelta start, |
115 base::TimeDelta end) OVERRIDE; | 118 base::TimeDelta end) OVERRIDE; |
116 virtual void SetDuration(base::TimeDelta duration) OVERRIDE; | 119 virtual void SetDuration(base::TimeDelta duration) OVERRIDE; |
117 virtual void OnDemuxerError(media::PipelineStatus status) OVERRIDE; | 120 virtual void OnDemuxerError(media::PipelineStatus status) OVERRIDE; |
118 virtual void AddTextStream(media::DemuxerStream* text_stream, | 121 virtual void AddTextStream(media::DemuxerStream* text_stream, |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; | 240 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; |
238 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; | 241 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; |
239 base::WeakPtr<MediaSourceDelegate> main_weak_this_; | 242 base::WeakPtr<MediaSourceDelegate> main_weak_this_; |
240 | 243 |
241 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); | 244 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); |
242 }; | 245 }; |
243 | 246 |
244 } // namespace content | 247 } // namespace content |
245 | 248 |
246 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 249 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
OLD | NEW |