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

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

Issue 1341883003: Prepare MediaDrmBridge to work with MediaCodecPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug526755
Patch Set: Fixed MediaDrmBridgeTest unit tests Created 5 years, 2 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 (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
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 int player_id() { return player_id_; } 95 int player_id() { return player_id_; }
96 96
97 GURL frame_url() { return frame_url_; } 97 GURL frame_url() { return frame_url_; }
98 98
99 // Attach/Detaches |listener_| for listening to all the media events. If 99 // Attach/Detaches |listener_| for listening to all the media events. If
100 // |j_media_player| is NULL, |listener_| only listens to the system media 100 // |j_media_player| is NULL, |listener_| only listens to the system media
101 // events. Otherwise, it also listens to the events from |j_media_player|. 101 // events. Otherwise, it also listens to the events from |j_media_player|.
102 void AttachListener(jobject j_media_player); 102 void AttachListener(jobject j_media_player);
103 void DetachListener(); 103 void DetachListener();
104 104
105 // Behavior controlled by finch flag.
106 static bool UseMediaThread();
107
108 protected: 105 protected:
109 MediaPlayerAndroid(int player_id, 106 MediaPlayerAndroid(int player_id,
110 MediaPlayerManager* manager, 107 MediaPlayerManager* manager,
111 const RequestMediaResourcesCB& request_media_resources_cb, 108 const RequestMediaResourcesCB& request_media_resources_cb,
112 const GURL& frame_url); 109 const GURL& frame_url);
113 110
114 // TODO(qinmin): Simplify the MediaPlayerListener class to only listen to 111 // TODO(qinmin): Simplify the MediaPlayerListener class to only listen to
115 // media interrupt events. And have a separate child class to listen to all 112 // media interrupt events. And have a separate child class to listen to all
116 // the events needed by MediaPlayerBridge. http://crbug.com/422597. 113 // the events needed by MediaPlayerBridge. http://crbug.com/422597.
117 // MediaPlayerListener callbacks. 114 // MediaPlayerListener callbacks.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Weak pointer passed to |listener_| for callbacks. 149 // Weak pointer passed to |listener_| for callbacks.
153 // NOTE: Weak pointers must be invalidated before all other member variables. 150 // NOTE: Weak pointers must be invalidated before all other member variables.
154 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_; 151 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_;
155 152
156 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); 153 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid);
157 }; 154 };
158 155
159 } // namespace media 156 } // namespace media
160 157
161 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 158 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « media/base/android/media_drm_bridge_unittest.cc ('k') | media/base/android/media_player_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698