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

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

Issue 2046253002: When HLS redirects are encountered recreate WebMediaPlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 6 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 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>
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 }; 216 };
217 217
218 // Playback state variables computed together in UpdatePlayState(). 218 // Playback state variables computed together in UpdatePlayState().
219 // (Public for testing.) 219 // (Public for testing.)
220 struct PlayState { 220 struct PlayState {
221 DelegateState delegate_state; 221 DelegateState delegate_state;
222 bool is_memory_reporting_enabled; 222 bool is_memory_reporting_enabled;
223 bool is_suspended; 223 bool is_suspended;
224 }; 224 };
225 225
226 blink::WebURL alternativeSourceURL() const override;
227
226 private: 228 private:
227 friend class WebMediaPlayerImplTest; 229 friend class WebMediaPlayerImplTest;
228 230
229 void OnPipelineSuspended(); 231 void OnPipelineSuspended();
230 void OnDemuxerOpened(); 232 void OnDemuxerOpened();
231 233
232 // Pipeline::Client overrides. 234 // Pipeline::Client overrides.
233 void OnError(PipelineStatus status) override; 235 void OnError(PipelineStatus status) override;
234 void OnEnded() override; 236 void OnEnded() override;
235 void OnMetadata(PipelineMetadata metadata) override; 237 void OnMetadata(PipelineMetadata metadata) override;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame 507 // OnSuspendRequested() is called. If the state is UNKNOWN, the current frame
506 // from the compositor will be queried to see if suspend is supported; the 508 // from the compositor will be queried to see if suspend is supported; the
507 // state will be set to YES or NO respectively if a frame is available. 509 // state will be set to YES or NO respectively if a frame is available.
508 enum class CanSuspendState { UNKNOWN, YES, NO }; 510 enum class CanSuspendState { UNKNOWN, YES, NO };
509 CanSuspendState can_suspend_state_; 511 CanSuspendState can_suspend_state_;
510 512
511 // Called some-time after OnHidden() if the media was suspended in a playing 513 // Called some-time after OnHidden() if the media was suspended in a playing
512 // state as part of the call to OnHidden(). 514 // state as part of the call to OnHidden().
513 base::OneShotTimer background_pause_timer_; 515 base::OneShotTimer background_pause_timer_;
514 516
517 GURL alternative_source_url_;
518
515 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 519 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
516 }; 520 };
517 521
518 } // namespace media 522 } // namespace media
519 523
520 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 524 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698