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

Side by Side Diff: chromecast/media/cma/pipeline/media_pipeline_impl.h

Issue 2032813002: [Chromecast] Log playback stall event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update playback stall check to for pause/buffering conditions 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_
6 #define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ 6 #define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void SetCdm(BrowserCdmCast* cdm); 67 void SetCdm(BrowserCdmCast* cdm);
68 68
69 private: 69 private:
70 enum BackendState { 70 enum BackendState {
71 BACKEND_STATE_UNINITIALIZED, 71 BACKEND_STATE_UNINITIALIZED,
72 BACKEND_STATE_INITIALIZED, 72 BACKEND_STATE_INITIALIZED,
73 BACKEND_STATE_PLAYING, 73 BACKEND_STATE_PLAYING,
74 BACKEND_STATE_PAUSED 74 BACKEND_STATE_PAUSED
75 }; 75 };
76 struct FlushTask; 76 struct FlushTask;
77 void CheckForPlaybackStall(base::TimeDelta media_time,
78 base::TimeTicks current_stc);
79
77 void OnFlushDone(bool is_audio_stream); 80 void OnFlushDone(bool is_audio_stream);
78 81
79 // Invoked to notify about a change of buffering state. 82 // Invoked to notify about a change of buffering state.
80 void OnBufferingNotification(bool is_buffering); 83 void OnBufferingNotification(bool is_buffering);
81 84
82 void UpdateMediaTime(); 85 void UpdateMediaTime();
83 86
84 void OnError(::media::PipelineStatus error); 87 void OnError(::media::PipelineStatus error);
85 88
86 void ResetBitrateState(); 89 void ResetBitrateState();
(...skipping 22 matching lines...) Expand all
109 base::TimeDelta last_media_time_; 112 base::TimeDelta last_media_time_;
110 113
111 // Used to make the statistics update period a multiplier of the time update 114 // Used to make the statistics update period a multiplier of the time update
112 // period. 115 // period.
113 int statistics_rolling_counter_; 116 int statistics_rolling_counter_;
114 base::TimeTicks last_sample_time_; 117 base::TimeTicks last_sample_time_;
115 base::TimeDelta elapsed_time_delta_; 118 base::TimeDelta elapsed_time_delta_;
116 int audio_bytes_for_bitrate_estimation_; 119 int audio_bytes_for_bitrate_estimation_;
117 int video_bytes_for_bitrate_estimation_; 120 int video_bytes_for_bitrate_estimation_;
118 121
122 // Playback stalled handling.
123 bool playback_stalled_;
124 base::TimeTicks playback_stalled_time_;
125 bool playback_stalled_notification_sent_;
126
119 base::WeakPtr<MediaPipelineImpl> weak_this_; 127 base::WeakPtr<MediaPipelineImpl> weak_this_;
120 base::WeakPtrFactory<MediaPipelineImpl> weak_factory_; 128 base::WeakPtrFactory<MediaPipelineImpl> weak_factory_;
121 129
122 DISALLOW_COPY_AND_ASSIGN(MediaPipelineImpl); 130 DISALLOW_COPY_AND_ASSIGN(MediaPipelineImpl);
123 }; 131 };
124 132
125 } // namespace media 133 } // namespace media
126 } // namespace chromecast 134 } // namespace chromecast
127 135
128 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ 136 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698