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 // TODO(xhwang): Replace |security_level| with a vector of |properties| string |
| 45 // if needed. |
| 46 static bool IsTypeSupported(const std::vector<uint8>& scheme_uuid, |
| 47 const std::string& security_level, |
| 48 const std::string& container, |
| 49 const std::vector<std::string>& codecs); |
| 50 |
44 // MediaPlayerAndroid implementation. | 51 // MediaPlayerAndroid implementation. |
45 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; | 52 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; |
46 virtual void Start() OVERRIDE; | 53 virtual void Start() OVERRIDE; |
47 virtual void Pause() OVERRIDE; | 54 virtual void Pause() OVERRIDE; |
48 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE; | 55 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE; |
49 virtual void Release() OVERRIDE; | 56 virtual void Release() OVERRIDE; |
50 virtual void SetVolume(double volume) OVERRIDE; | 57 virtual void SetVolume(double volume) OVERRIDE; |
51 virtual int GetVideoWidth() OVERRIDE; | 58 virtual int GetVideoWidth() OVERRIDE; |
52 virtual int GetVideoHeight() OVERRIDE; | 59 virtual int GetVideoHeight() OVERRIDE; |
53 virtual base::TimeDelta GetCurrentTime() OVERRIDE; | 60 virtual base::TimeDelta GetCurrentTime() OVERRIDE; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 218 |
212 MediaDrmBridge* drm_bridge_; | 219 MediaDrmBridge* drm_bridge_; |
213 | 220 |
214 friend class MediaSourcePlayerTest; | 221 friend class MediaSourcePlayerTest; |
215 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 222 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
216 }; | 223 }; |
217 | 224 |
218 } // namespace media | 225 } // namespace media |
219 | 226 |
220 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 227 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |