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

Side by Side Diff: media/base/android/media_source_player.h

Issue 17563002: Add the SetMediaKeys handler to pass a drm bridge to a MediaSourcePlayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 virtual int GetVideoWidth() OVERRIDE; 142 virtual int GetVideoWidth() OVERRIDE;
143 virtual int GetVideoHeight() OVERRIDE; 143 virtual int GetVideoHeight() OVERRIDE;
144 virtual base::TimeDelta GetCurrentTime() OVERRIDE; 144 virtual base::TimeDelta GetCurrentTime() OVERRIDE;
145 virtual base::TimeDelta GetDuration() OVERRIDE; 145 virtual base::TimeDelta GetDuration() OVERRIDE;
146 virtual bool IsPlaying() OVERRIDE; 146 virtual bool IsPlaying() OVERRIDE;
147 virtual bool CanPause() OVERRIDE; 147 virtual bool CanPause() OVERRIDE;
148 virtual bool CanSeekForward() OVERRIDE; 148 virtual bool CanSeekForward() OVERRIDE;
149 virtual bool CanSeekBackward() OVERRIDE; 149 virtual bool CanSeekBackward() OVERRIDE;
150 virtual bool IsPlayerReady() OVERRIDE; 150 virtual bool IsPlayerReady() OVERRIDE;
151 virtual void OnSeekRequestAck(unsigned seek_request_id) OVERRIDE; 151 virtual void OnSeekRequestAck(unsigned seek_request_id) OVERRIDE;
152
153 // Called when the demuxer is ready.
154 virtual void DemuxerReady( 152 virtual void DemuxerReady(
155 const MediaPlayerHostMsg_DemuxerReady_Params& params) OVERRIDE; 153 const MediaPlayerHostMsg_DemuxerReady_Params& params) OVERRIDE;
156
157 // Called when the requested data is received from the demuxer.
158 virtual void ReadFromDemuxerAck( 154 virtual void ReadFromDemuxerAck(
159 const MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params) OVERRIDE; 155 const MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params) OVERRIDE;
160
161 // Called when the demuxer has changed the duration.
162 virtual void DurationChanged(const base::TimeDelta& duration) OVERRIDE; 156 virtual void DurationChanged(const base::TimeDelta& duration) OVERRIDE;
157 virtual void SetDrmBridge(MediaDrmBridge* drm_bridge) OVERRIDE;
163 158
164 private: 159 private:
165 // Update the timestamps for A/V sync scheduling. 160 // Update the timestamps for A/V sync scheduling.
166 void UpdateTimestamps( 161 void UpdateTimestamps(
167 const base::TimeDelta& presentation_timestamp, 162 const base::TimeDelta& presentation_timestamp,
168 const base::TimeTicks& wallclock_time); 163 const base::TimeTicks& wallclock_time);
169 164
170 // Helper function for starting media playback. 165 // Helper function for starting media playback.
171 void StartInternal(); 166 void StartInternal();
172 167
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 size_t audio_access_unit_index_; 246 size_t audio_access_unit_index_;
252 size_t video_access_unit_index_; 247 size_t video_access_unit_index_;
253 bool waiting_for_audio_data_; 248 bool waiting_for_audio_data_;
254 bool waiting_for_video_data_; 249 bool waiting_for_video_data_;
255 MediaPlayerHostMsg_ReadFromDemuxerAck_Params received_audio_; 250 MediaPlayerHostMsg_ReadFromDemuxerAck_Params received_audio_;
256 MediaPlayerHostMsg_ReadFromDemuxerAck_Params received_video_; 251 MediaPlayerHostMsg_ReadFromDemuxerAck_Params received_video_;
257 252
258 // Weak pointer passed to media decoder jobs for callbacks. 253 // Weak pointer passed to media decoder jobs for callbacks.
259 base::WeakPtrFactory<MediaSourcePlayer> weak_this_; 254 base::WeakPtrFactory<MediaSourcePlayer> weak_this_;
260 255
256 MediaDrmBridge* drm_bridge_;
257
261 friend class MediaSourcePlayerTest; 258 friend class MediaSourcePlayerTest;
262 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); 259 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer);
263 }; 260 };
264 261
265 } // namespace media 262 } // namespace media
266 263
267 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 264 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698