OLD | NEW |
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 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 static const double kDefaultVolumeMultiplier; | 57 static const double kDefaultVolumeMultiplier; |
58 | 58 |
59 // Callback when the player releases decoding resources. | 59 // Callback when the player releases decoding resources. |
60 typedef base::Callback<void(int player_id)> OnDecoderResourcesReleasedCB; | 60 typedef base::Callback<void(int player_id)> OnDecoderResourcesReleasedCB; |
61 | 61 |
62 // Virtual destructor. | 62 // Virtual destructor. |
63 // For most subclasses we can delete on the caller thread. | 63 // For most subclasses we can delete on the caller thread. |
64 virtual void DeleteOnCorrectThread(); | 64 virtual void DeleteOnCorrectThread(); |
65 | 65 |
66 // Passing an external java surface object to the player. | 66 // Passing an external java surface object to the player. |
67 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) = 0; | 67 virtual void SetVideoSurface(gl::ScopedJavaSurface surface) = 0; |
68 | 68 |
69 // Start playing the media. | 69 // Start playing the media. |
70 virtual void Start() = 0; | 70 virtual void Start() = 0; |
71 | 71 |
72 // Pause the media. | 72 // Pause the media. |
73 virtual void Pause(bool is_media_related_action) = 0; | 73 virtual void Pause(bool is_media_related_action) = 0; |
74 | 74 |
75 // Seek to a particular position, based on renderer signaling actual seek | 75 // Seek to a particular position, based on renderer signaling actual seek |
76 // with MediaPlayerHostMsg_Seek. If eventual success, OnSeekComplete() will be | 76 // with MediaPlayerHostMsg_Seek. If eventual success, OnSeekComplete() will be |
77 // called. | 77 // called. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // Weak pointer passed to |listener_| for callbacks. | 197 // Weak pointer passed to |listener_| for callbacks. |
198 // NOTE: Weak pointers must be invalidated before all other member variables. | 198 // NOTE: Weak pointers must be invalidated before all other member variables. |
199 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_; | 199 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_; |
200 | 200 |
201 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); | 201 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); |
202 }; | 202 }; |
203 | 203 |
204 } // namespace media | 204 } // namespace media |
205 | 205 |
206 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 206 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
OLD | NEW |