Chromium Code Reviews| 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_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 23 matching lines...) Expand all Loading... | |
| 34 // MediaCodec to decode audio and video streams in two separate threads. | 34 // MediaCodec to decode audio and video streams in two separate threads. |
| 35 // IPC is being used to send data from the render process to this object. | 35 // IPC is being used to send data from the render process to this object. |
| 36 // TODO(qinmin): use shared memory to send data between processes. | 36 // TODO(qinmin): use shared memory to send data between processes. |
| 37 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid { | 37 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid { |
| 38 public: | 38 public: |
| 39 // Construct a MediaSourcePlayer object with all the needed media player | 39 // Construct a MediaSourcePlayer object with all the needed media player |
| 40 // callbacks. | 40 // callbacks. |
| 41 MediaSourcePlayer(int player_id, MediaPlayerManager* manager); | 41 MediaSourcePlayer(int player_id, MediaPlayerManager* manager); |
| 42 virtual ~MediaSourcePlayer(); | 42 virtual ~MediaSourcePlayer(); |
| 43 | 43 |
| 44 static bool CanPlayType(const std::vector<uint8>& scheme_uuid, | |
|
ddorwin
2013/08/27 18:14:19
Use IsTypeSupported, since it is the permanent nam
xhwang
2013/08/28 01:21:24
Done.
| |
| 45 const std::string& security_level, | |
|
ddorwin
2013/08/27 18:14:19
should we just call this "properties" to support o
xhwang
2013/08/28 01:21:24
Yeah, added a TODO for the possible future refacto
ddorwin
2013/08/28 02:28:50
I'd just drop the TODO since we don't plan to addr
xhwang
2013/08/28 18:19:15
Done.
| |
| 46 const std::string& container, | |
| 47 const std::vector<std::string>& codecs); | |
| 48 | |
| 44 // MediaPlayerAndroid implementation. | 49 // MediaPlayerAndroid implementation. |
| 45 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; | 50 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; |
| 46 virtual void Start() OVERRIDE; | 51 virtual void Start() OVERRIDE; |
| 47 virtual void Pause() OVERRIDE; | 52 virtual void Pause() OVERRIDE; |
| 48 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE; | 53 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE; |
| 49 virtual void Release() OVERRIDE; | 54 virtual void Release() OVERRIDE; |
| 50 virtual void SetVolume(double volume) OVERRIDE; | 55 virtual void SetVolume(double volume) OVERRIDE; |
| 51 virtual int GetVideoWidth() OVERRIDE; | 56 virtual int GetVideoWidth() OVERRIDE; |
| 52 virtual int GetVideoHeight() OVERRIDE; | 57 virtual int GetVideoHeight() OVERRIDE; |
| 53 virtual base::TimeDelta GetCurrentTime() OVERRIDE; | 58 virtual base::TimeDelta GetCurrentTime() OVERRIDE; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 | 216 |
| 212 MediaDrmBridge* drm_bridge_; | 217 MediaDrmBridge* drm_bridge_; |
| 213 | 218 |
| 214 friend class MediaSourcePlayerTest; | 219 friend class MediaSourcePlayerTest; |
| 215 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 220 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
| 216 }; | 221 }; |
| 217 | 222 |
| 218 } // namespace media | 223 } // namespace media |
| 219 | 224 |
| 220 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 225 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
| OLD | NEW |