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

Side by Side Diff: media/base/android/media_player_android.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_PLAYER_ANDROID_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "media/base/android/demuxer_stream_player_params.h" 14 #include "media/base/android/demuxer_stream_player_params.h"
15 #include "media/base/media_export.h" 15 #include "media/base/media_export.h"
16 #include "ui/gl/android/scoped_java_surface.h" 16 #include "ui/gl/android/scoped_java_surface.h"
17 17
18 namespace media { 18 namespace media {
19 19
20 class MediaDrmBridge;
20 class MediaPlayerManager; 21 class MediaPlayerManager;
21 22
22 // This class serves as the base class for different media player 23 // This class serves as the base class for different media player
23 // implementations on Android. Subclasses need to provide their own 24 // implementations on Android. Subclasses need to provide their own
24 // MediaPlayerAndroid::Create() implementation. 25 // MediaPlayerAndroid::Create() implementation.
25 class MEDIA_EXPORT MediaPlayerAndroid { 26 class MEDIA_EXPORT MediaPlayerAndroid {
26 public: 27 public:
27 virtual ~MediaPlayerAndroid(); 28 virtual ~MediaPlayerAndroid();
28 29
29 // Error types for MediaErrorCB. 30 // Error types for MediaErrorCB.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Called when the requested data is received from the demuxer. 93 // Called when the requested data is received from the demuxer.
93 virtual void ReadFromDemuxerAck( 94 virtual void ReadFromDemuxerAck(
94 const MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); 95 const MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params);
95 96
96 // Called when a seek request is acked by the render process. 97 // Called when a seek request is acked by the render process.
97 virtual void OnSeekRequestAck(unsigned seek_request_id); 98 virtual void OnSeekRequestAck(unsigned seek_request_id);
98 99
99 // Called when the demuxer has changed the duration. 100 // Called when the demuxer has changed the duration.
100 virtual void DurationChanged(const base::TimeDelta& duration); 101 virtual void DurationChanged(const base::TimeDelta& duration);
101 102
103 // Pass a drm bridge to a player.
104 virtual void SetDrmBridge(MediaDrmBridge* drm_bridge);
105
102 int player_id() { return player_id_; } 106 int player_id() { return player_id_; }
103 107
104 protected: 108 protected:
105 MediaPlayerAndroid(int player_id, 109 MediaPlayerAndroid(int player_id,
106 MediaPlayerManager* manager); 110 MediaPlayerManager* manager);
107 111
108 // Called when player status changes. 112 // Called when player status changes.
109 virtual void OnMediaError(int error_type); 113 virtual void OnMediaError(int error_type);
110 virtual void OnVideoSizeChanged(int width, int height); 114 virtual void OnVideoSizeChanged(int width, int height);
111 virtual void OnBufferingUpdate(int percent); 115 virtual void OnBufferingUpdate(int percent);
(...skipping 16 matching lines...) Expand all
128 132
129 // Resource manager for all the media players. 133 // Resource manager for all the media players.
130 MediaPlayerManager* manager_; 134 MediaPlayerManager* manager_;
131 135
132 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); 136 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid);
133 }; 137 };
134 138
135 } // namespace media 139 } // namespace media
136 140
137 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 141 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698