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

Side by Side Diff: media/blink/webmediaplayer_impl.h

Issue 2366373003: Not for submission. fastSeek prototype. (Closed)
Patch Set: Created 4 years, 2 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 | « media/base/video_renderer.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
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 MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/cancelable_callback.h" 14 #include "base/cancelable_callback.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/linked_ptr.h" 17 #include "base/memory/linked_ptr.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/threading/thread.h" 20 #include "base/threading/thread.h"
21 #include "base/timer/elapsed_timer.h" 21 #include "base/timer/elapsed_timer.h"
22 #include "base/timer/timer.h" 22 #include "base/timer/timer.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "media/base/media_tracks.h" 24 #include "media/base/media_tracks.h"
25 #include "media/base/pipeline_impl.h" 25 #include "media/base/pipeline_impl.h"
26 #include "media/base/renderer_factory.h" 26 #include "media/base/renderer_factory.h"
27 #include "media/base/stream_position.h"
27 #include "media/base/surface_manager.h" 28 #include "media/base/surface_manager.h"
28 #include "media/base/text_track.h" 29 #include "media/base/text_track.h"
29 #include "media/blink/buffered_data_source_host_impl.h" 30 #include "media/blink/buffered_data_source_host_impl.h"
30 #include "media/blink/media_blink_export.h" 31 #include "media/blink/media_blink_export.h"
31 #include "media/blink/multibuffer_data_source.h" 32 #include "media/blink/multibuffer_data_source.h"
32 #include "media/blink/video_frame_compositor.h" 33 #include "media/blink/video_frame_compositor.h"
33 #include "media/blink/webmediaplayer_delegate.h" 34 #include "media/blink/webmediaplayer_delegate.h"
34 #include "media/blink/webmediaplayer_params.h" 35 #include "media/blink/webmediaplayer_params.h"
35 #include "media/blink/webmediaplayer_util.h" 36 #include "media/blink/webmediaplayer_util.h"
36 #include "media/filters/pipeline_controller.h" 37 #include "media/filters/pipeline_controller.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 void load(LoadType load_type, 102 void load(LoadType load_type,
102 const blink::WebMediaPlayerSource& source, 103 const blink::WebMediaPlayerSource& source,
103 CORSMode cors_mode) override; 104 CORSMode cors_mode) override;
104 105
105 // Playback controls. 106 // Playback controls.
106 void play() override; 107 void play() override;
107 void pause() override; 108 void pause() override;
108 bool supportsSave() const override; 109 bool supportsSave() const override;
109 void seek(double seconds) override; 110 void seek(double seconds) override;
111 void fastSeek(double seconds);
110 void setRate(double rate) override; 112 void setRate(double rate) override;
111 void setVolume(double volume) override; 113 void setVolume(double volume) override;
112 void setSinkId(const blink::WebString& sink_id, 114 void setSinkId(const blink::WebString& sink_id,
113 const blink::WebSecurityOrigin& security_origin, 115 const blink::WebSecurityOrigin& security_origin,
114 blink::WebSetSinkIdCallbacks* web_callback) override; 116 blink::WebSetSinkIdCallbacks* web_callback) override;
115 void setPreload(blink::WebMediaPlayer::Preload preload) override; 117 void setPreload(blink::WebMediaPlayer::Preload preload) override;
116 void setBufferingStrategy( 118 void setBufferingStrategy(
117 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; 119 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override;
118 blink::WebTimeRanges buffered() const override; 120 blink::WebTimeRanges buffered() const override;
119 blink::WebTimeRanges seekable() const override; 121 blink::WebTimeRanges seekable() const override;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 void OnBufferingStateChange(BufferingState state) override; 246 void OnBufferingStateChange(BufferingState state) override;
245 void OnDurationChange() override; 247 void OnDurationChange() override;
246 void OnAddTextTrack(const TextTrackConfig& config, 248 void OnAddTextTrack(const TextTrackConfig& config,
247 const AddTextTrackDoneCB& done_cb) override; 249 const AddTextTrackDoneCB& done_cb) override;
248 void OnWaitingForDecryptionKey() override; 250 void OnWaitingForDecryptionKey() override;
249 void OnVideoNaturalSizeChange(const gfx::Size& size) override; 251 void OnVideoNaturalSizeChange(const gfx::Size& size) override;
250 void OnVideoOpacityChange(bool opaque) override; 252 void OnVideoOpacityChange(bool opaque) override;
251 253
252 // Actually seek. Avoids causing |should_notify_time_changed_| to be set when 254 // Actually seek. Avoids causing |should_notify_time_changed_| to be set when
253 // |time_updated| is false. 255 // |time_updated| is false.
254 void DoSeek(base::TimeDelta time, bool time_updated); 256 void DoSeek(StreamPosition position, bool time_updated);
255 257
256 // Ask for the renderer to be restarted (destructed and recreated). 258 // Ask for the renderer to be restarted (destructed and recreated).
257 void ScheduleRestart(); 259 void ScheduleRestart();
258 260
259 // Called after |defer_load_cb_| has decided to allow the load. If 261 // Called after |defer_load_cb_| has decided to allow the load. If
260 // |defer_load_cb_| is null this is called immediately. 262 // |defer_load_cb_| is null this is called immediately.
261 void DoLoad(LoadType load_type, 263 void DoLoad(LoadType load_type,
262 const blink::WebURL& url, 264 const blink::WebURL& url,
263 CORSMode cors_mode); 265 CORSMode cors_mode);
264 266
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. 549 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback.
548 int underflow_count_; 550 int underflow_count_;
549 std::unique_ptr<base::ElapsedTimer> underflow_timer_; 551 std::unique_ptr<base::ElapsedTimer> underflow_timer_;
550 552
551 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 553 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
552 }; 554 };
553 555
554 } // namespace media 556 } // namespace media
555 557
556 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 558 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/base/video_renderer.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698