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

Side by Side Diff: content/renderer/media/android/media_source_delegate.h

Issue 257323003: Remove the IPC to request DemuxerConfigs when config changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // If |is_browser_seek| is true, then this is a short-term hack browser 91 // If |is_browser_seek| is true, then this is a short-term hack browser
92 // seek. 92 // seek.
93 // TODO(wolenetz): Instead of doing browser seek, browser player should replay 93 // TODO(wolenetz): Instead of doing browser seek, browser player should replay
94 // cached data since last keyframe. See http://crbug.com/304234. 94 // cached data since last keyframe. See http://crbug.com/304234.
95 void Seek(const base::TimeDelta& seek_time, bool is_browser_seek); 95 void Seek(const base::TimeDelta& seek_time, bool is_browser_seek);
96 96
97 // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer. 97 // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer.
98 void OnReadFromDemuxer(media::DemuxerStream::Type type); 98 void OnReadFromDemuxer(media::DemuxerStream::Type type);
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();
wolenetz 2014/05/02 22:25:30 I believe this method is now made obsolete. Remove
qinmin 2014/05/05 20:52:19 Done.
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 private: 109 private:
110 // This is private to enforce use of the Destroyer. 110 // This is private to enforce use of the Destroyer.
111 virtual ~MediaSourceDelegate(); 111 virtual ~MediaSourceDelegate();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bool IsSeeking() const; 173 bool IsSeeking() const;
174 174
175 // Returns |seek_time| if it is still buffered or if there is no currently 175 // Returns |seek_time| if it is still buffered or if there is no currently
176 // buffered range including or soon after |seek_time|. If |seek_time| is not 176 // buffered range including or soon after |seek_time|. If |seek_time| is not
177 // buffered, but there is a later range buffered near to |seek_time|, returns 177 // buffered, but there is a later range buffered near to |seek_time|, returns
178 // next buffered range's start time instead. Only call this for browser seeks. 178 // next buffered range's start time instead. Only call this for browser seeks.
179 // |seeking_lock_| must be held by caller. 179 // |seeking_lock_| must be held by caller.
180 base::TimeDelta FindBufferedBrowserSeekTime_Locked( 180 base::TimeDelta FindBufferedBrowserSeekTime_Locked(
181 const base::TimeDelta& seek_time) const; 181 const base::TimeDelta& seek_time) const;
182 182
183 void GetDemuxerConfigFromStream(media::DemuxerConfigs* configs,
184 bool is_audio);
185
183 RendererDemuxerAndroid* demuxer_client_; 186 RendererDemuxerAndroid* demuxer_client_;
184 int demuxer_client_id_; 187 int demuxer_client_id_;
185 188
186 scoped_refptr<media::MediaLog> media_log_; 189 scoped_refptr<media::MediaLog> media_log_;
187 UpdateNetworkStateCB update_network_state_cb_; 190 UpdateNetworkStateCB update_network_state_cb_;
188 DurationChangeCB duration_change_cb_; 191 DurationChangeCB duration_change_cb_;
189 192
190 scoped_ptr<media::ChunkDemuxer> chunk_demuxer_; 193 scoped_ptr<media::ChunkDemuxer> chunk_demuxer_;
191 bool is_demuxer_ready_; 194 bool is_demuxer_ready_;
192 195
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698