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

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

Issue 2445533002: Don't suspend the pipeline before HaveFutureData while decoding progressing (Closed)
Patch Set: Remove unused variable Created 4 years, 1 month 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/blink/webmediaplayer_delegate.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/time/default_tick_clock.h"
21 #include "base/timer/elapsed_timer.h" 22 #include "base/timer/elapsed_timer.h"
22 #include "base/timer/timer.h" 23 #include "base/timer/timer.h"
23 #include "build/build_config.h" 24 #include "build/build_config.h"
24 #include "media/base/media_observer.h" 25 #include "media/base/media_observer.h"
25 #include "media/base/media_tracks.h" 26 #include "media/base/media_tracks.h"
26 #include "media/base/pipeline_impl.h" 27 #include "media/base/pipeline_impl.h"
27 #include "media/base/renderer_factory.h" 28 #include "media/base/renderer_factory.h"
28 #include "media/base/surface_manager.h" 29 #include "media/base/surface_manager.h"
29 #include "media/base/text_track.h" 30 #include "media/base/text_track.h"
30 #include "media/blink/buffered_data_source_host_impl.h" 31 #include "media/blink/buffered_data_source_host_impl.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 blink::WebContentDecryptionModule* cdm, 180 blink::WebContentDecryptionModule* cdm,
180 blink::WebContentDecryptionModuleResult result) override; 181 blink::WebContentDecryptionModuleResult result) override;
181 182
182 bool supportsOverlayFullscreenVideo() override; 183 bool supportsOverlayFullscreenVideo() override;
183 void enteredFullscreen() override; 184 void enteredFullscreen() override;
184 void exitedFullscreen() override; 185 void exitedFullscreen() override;
185 186
186 // WebMediaPlayerDelegate::Observer implementation. 187 // WebMediaPlayerDelegate::Observer implementation.
187 void OnHidden() override; 188 void OnHidden() override;
188 void OnShown() override; 189 void OnShown() override;
189 void OnSuspendRequested(bool must_suspend) override; 190 bool OnSuspendRequested(bool must_suspend) override;
190 void OnPlay() override; 191 void OnPlay() override;
191 void OnPause() override; 192 void OnPause() override;
192 void OnVolumeMultiplierUpdate(double multiplier) override; 193 void OnVolumeMultiplierUpdate(double multiplier) override;
193 194
194 #if defined(OS_ANDROID) // WMPI_CAST 195 #if defined(OS_ANDROID) // WMPI_CAST
195 bool isRemote() const override; 196 bool isRemote() const override;
196 void requestRemotePlayback() override; 197 void requestRemotePlayback() override;
197 void requestRemotePlaybackControl() override; 198 void requestRemotePlaybackControl() override;
198 199
199 void SetMediaPlayerManager( 200 void SetMediaPlayerManager(
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 base::OneShotTimer background_pause_timer_; 557 base::OneShotTimer background_pause_timer_;
557 558
558 // Monitors the watch time of the played content. 559 // Monitors the watch time of the played content.
559 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; 560 std::unique_ptr<WatchTimeReporter> watch_time_reporter_;
560 bool is_encrypted_; 561 bool is_encrypted_;
561 562
562 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. 563 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback.
563 int underflow_count_; 564 int underflow_count_;
564 std::unique_ptr<base::ElapsedTimer> underflow_timer_; 565 std::unique_ptr<base::ElapsedTimer> underflow_timer_;
565 566
567 // The last time didLoadingProgress() returned true.
568 base::TimeTicks last_time_loading_progressed_;
569
570 // Points to |default_tick_clock_| by default, but can be overridden by tests.
DaleCurtis 2016/11/03 18:05:47 Just have a single std::unique_ptr<base::TickClock
watk 2016/11/03 19:25:01 oops, done.
571 base::TickClock* tick_clock_;
572 base::DefaultTickClock default_tick_clock_;
573
566 // Monitors the player events. 574 // Monitors the player events.
567 base::WeakPtr<MediaObserver> observer_; 575 base::WeakPtr<MediaObserver> observer_;
568 576
569 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 577 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
570 }; 578 };
571 579
572 } // namespace media 580 } // namespace media
573 581
574 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 582 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_delegate.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698