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

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: New names. 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
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_impl.cc » ('j') | media/base/pipeline.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 OnPipelineBufferingState( 177 void OnPipelineMetadata(media::PipelineMetadata metadata);
178 media::Pipeline::BufferingState buffering_state); 178 void OnPipelinePrerollCompleted();
179 void OnDemuxerOpened(); 179 void OnDemuxerOpened();
180 void OnKeyAdded(const std::string& session_id); 180 void OnKeyAdded(const std::string& session_id);
181 void OnKeyError(const std::string& session_id, 181 void OnKeyError(const std::string& session_id,
182 media::MediaKeys::KeyError error_code, 182 media::MediaKeys::KeyError error_code,
183 uint32 system_code); 183 uint32 system_code);
184 void OnKeyMessage(const std::string& session_id, 184 void OnKeyMessage(const std::string& session_id,
185 const std::vector<uint8>& message, 185 const std::vector<uint8>& message,
186 const std::string& default_url); 186 const std::string& default_url);
187 void OnNeedKey(const std::string& type, 187 void OnNeedKey(const std::string& type,
188 const std::vector<uint8>& init_data); 188 const std::vector<uint8>& init_data);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 scoped_refptr<media::MediaLog> media_log_; 262 scoped_refptr<media::MediaLog> media_log_;
263 media::Pipeline pipeline_; 263 media::Pipeline pipeline_;
264 264
265 // The currently selected key system. Empty string means that no key system 265 // The currently selected key system. Empty string means that no key system
266 // has been selected. 266 // has been selected.
267 std::string current_key_system_; 267 std::string current_key_system_;
268 268
269 // The LoadType passed in the |load_type| parameter of the load() call. 269 // The LoadType passed in the |load_type| parameter of the load() call.
270 LoadType load_type_; 270 LoadType load_type_;
271 271
272 // Cache of metadata for answering hasAudio(), hasVideo(), and naturalSize().
273 media::PipelineMetadata pipeline_metadata_;
274
272 // Playback state. 275 // Playback state.
273 // 276 //
274 // TODO(scherkus): we have these because Pipeline favours the simplicity of a 277 // TODO(scherkus): we have these because Pipeline favours the simplicity of a
275 // single "playback rate" over worrying about paused/stopped etc... It forces 278 // single "playback rate" over worrying about paused/stopped etc... It forces
276 // all clients to manage the pause+playback rate externally, but is that 279 // all clients to manage the pause+playback rate externally, but is that
277 // really a bad thing? 280 // really a bad thing?
278 // 281 //
279 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want 282 // 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 283 // 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 284 // time we pause and then return that value in currentTime(). Otherwise our
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 scoped_ptr<media::Demuxer> demuxer_; 327 scoped_ptr<media::Demuxer> demuxer_;
325 media::ChunkDemuxer* chunk_demuxer_; 328 media::ChunkDemuxer* chunk_demuxer_;
326 329
327 // Temporary for EME v0.1. In the future the init data type should be passed 330 // Temporary for EME v0.1. In the future the init data type should be passed
328 // through GenerateKeyRequest() directly from WebKit. 331 // through GenerateKeyRequest() directly from WebKit.
329 std::string init_data_type_; 332 std::string init_data_type_;
330 333
331 // Video rendering members. 334 // Video rendering members.
332 media::VideoFramePainter painter_; 335 media::VideoFramePainter painter_;
333 media::SkCanvasVideoRenderer skcanvas_video_renderer_; 336 media::SkCanvasVideoRenderer skcanvas_video_renderer_;
334 gfx::Size natural_size_;
335 337
336 // The compositor layer for displaying the video content when using composited 338 // The compositor layer for displaying the video content when using composited
337 // playback. 339 // playback.
338 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; 340 scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
339 341
340 // A pointer back to the compositor to inform it about state changes. This is 342 // A pointer back to the compositor to inform it about state changes. This is
341 // not NULL while the compositor is actively using this webmediaplayer. 343 // not NULL while the compositor is actively using this webmediaplayer.
342 cc::VideoFrameProvider::Client* video_frame_provider_client_; 344 cc::VideoFrameProvider::Client* video_frame_provider_client_;
343 345
344 // Text track objects get a unique index value when they're created. 346 // Text track objects get a unique index value when they're created.
345 int text_track_index_; 347 int text_track_index_;
346 348
347 // Manages decryption keys and decrypts encrypted frames. 349 // Manages decryption keys and decrypts encrypted frames.
348 scoped_ptr<ProxyDecryptor> proxy_decryptor_; 350 scoped_ptr<ProxyDecryptor> proxy_decryptor_;
349 351
350 // Non-owned pointer to the CDM. Updated via calls to 352 // Non-owned pointer to the CDM. Updated via calls to
351 // setContentDecryptionModule(). 353 // setContentDecryptionModule().
352 WebContentDecryptionModuleImpl* web_cdm_; 354 WebContentDecryptionModuleImpl* web_cdm_;
353 355
354 media::DecryptorReadyCB decryptor_ready_cb_; 356 media::DecryptorReadyCB decryptor_ready_cb_;
355 357
356 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 358 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
357 }; 359 };
358 360
359 } // namespace content 361 } // namespace content
360 362
361 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 363 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_impl.cc » ('j') | media/base/pipeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698