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

Side by Side Diff: content/renderer/media/webmediaplayer_impl.h

Issue 206103004: Remove HasAudio(), HasVideo(), GetInitialNaturalSize() from media::Pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
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_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // This path is slower than notifying the compositor directly as it performs 167 // This path is slower than notifying the compositor directly as it performs
168 // more work and can trigger layouts. It should only be used in two cases: 168 // more work and can trigger layouts. It should only be used in two cases:
169 // 1) Major state changes (e.g., first frame available, run time error 169 // 1) Major state changes (e.g., first frame available, run time error
170 // occured) 170 // occured)
171 // 2) Compositing not available 171 // 2) Compositing not available
172 void InvalidateOnMainThread(); 172 void InvalidateOnMainThread();
173 173
174 void OnPipelineSeek(media::PipelineStatus status); 174 void OnPipelineSeek(media::PipelineStatus status);
175 void OnPipelineEnded(); 175 void OnPipelineEnded();
176 void OnPipelineError(media::PipelineStatus error); 176 void OnPipelineError(media::PipelineStatus error);
177 void OnPipelineHasTrack(media::Pipeline::TrackType track);
177 void OnPipelineBufferingState( 178 void OnPipelineBufferingState(
178 media::Pipeline::BufferingState buffering_state); 179 media::Pipeline::BufferingState buffering_state);
179 void OnDemuxerOpened(); 180 void OnDemuxerOpened();
180 void OnKeyAdded(const std::string& session_id); 181 void OnKeyAdded(const std::string& session_id);
181 void OnKeyError(const std::string& session_id, 182 void OnKeyError(const std::string& session_id,
182 media::MediaKeys::KeyError error_code, 183 media::MediaKeys::KeyError error_code,
183 uint32 system_code); 184 uint32 system_code);
184 void OnKeyMessage(const std::string& session_id, 185 void OnKeyMessage(const std::string& session_id,
185 const std::vector<uint8>& message, 186 const std::vector<uint8>& message,
186 const std::string& default_url); 187 const std::string& default_url);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 scoped_refptr<media::MediaLog> media_log_; 263 scoped_refptr<media::MediaLog> media_log_;
263 media::Pipeline pipeline_; 264 media::Pipeline pipeline_;
264 265
265 // The currently selected key system. Empty string means that no key system 266 // The currently selected key system. Empty string means that no key system
266 // has been selected. 267 // has been selected.
267 std::string current_key_system_; 268 std::string current_key_system_;
268 269
269 // The LoadType passed in the |load_type| parameter of the load() call. 270 // The LoadType passed in the |load_type| parameter of the load() call.
270 LoadType load_type_; 271 LoadType load_type_;
271 272
273 // Cache of available tracks for answering hasAudio() and hasVideo().
274 bool has_audio_;
275 bool has_video_;
276
272 // Playback state. 277 // Playback state.
273 // 278 //
274 // TODO(scherkus): we have these because Pipeline favours the simplicity of a 279 // TODO(scherkus): we have these because Pipeline favours the simplicity of a
275 // single "playback rate" over worrying about paused/stopped etc... It forces 280 // single "playback rate" over worrying about paused/stopped etc... It forces
276 // all clients to manage the pause+playback rate externally, but is that 281 // all clients to manage the pause+playback rate externally, but is that
277 // really a bad thing? 282 // really a bad thing?
278 // 283 //
279 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want 284 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want
280 // to hang the render thread during pause(), we record the time at the same 285 // to hang the render thread during pause(), we record the time at the same
281 // time we pause and then return that value in currentTime(). Otherwise our 286 // time we pause and then return that value in currentTime(). Otherwise our
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 WebContentDecryptionModuleImpl* web_cdm_; 357 WebContentDecryptionModuleImpl* web_cdm_;
353 358
354 media::DecryptorReadyCB decryptor_ready_cb_; 359 media::DecryptorReadyCB decryptor_ready_cb_;
355 360
356 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 361 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
357 }; 362 };
358 363
359 } // namespace content 364 } // namespace content
360 365
361 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 366 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_impl.cc » ('j') | content/renderer/media/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698