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 26 matching lines...) Expand all Loading... |
37 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, | 37 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, |
38 public DemuxerAndroidClient { | 38 public DemuxerAndroidClient { |
39 public: | 39 public: |
40 // Constructs a player with the given ID and demuxer. |manager| must outlive | 40 // Constructs a player with the given ID and demuxer. |manager| must outlive |
41 // the lifetime of this object. | 41 // the lifetime of this object. |
42 MediaSourcePlayer(int player_id, | 42 MediaSourcePlayer(int player_id, |
43 MediaPlayerManager* manager, | 43 MediaPlayerManager* manager, |
44 scoped_ptr<DemuxerAndroid> demuxer); | 44 scoped_ptr<DemuxerAndroid> demuxer); |
45 virtual ~MediaSourcePlayer(); | 45 virtual ~MediaSourcePlayer(); |
46 | 46 |
47 static bool IsTypeSupported(const std::vector<uint8>& scheme_uuid, | 47 static bool IsTypeSupported(const std::string& key_system, |
48 MediaDrmBridge::SecurityLevel security_level, | 48 MediaDrmBridge::SecurityLevel security_level, |
49 const std::string& container, | 49 const std::string& container, |
50 const std::vector<std::string>& codecs); | 50 const std::vector<std::string>& codecs); |
51 | 51 |
52 // MediaPlayerAndroid implementation. | 52 // MediaPlayerAndroid implementation. |
53 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; | 53 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; |
54 virtual void Start() OVERRIDE; | 54 virtual void Start() OVERRIDE; |
55 virtual void Pause(bool is_media_related_action ALLOW_UNUSED) OVERRIDE; | 55 virtual void Pause(bool is_media_related_action ALLOW_UNUSED) OVERRIDE; |
56 virtual void SeekTo(const base::TimeDelta& timestamp) OVERRIDE; | 56 virtual void SeekTo(const base::TimeDelta& timestamp) OVERRIDE; |
57 virtual void Release() OVERRIDE; | 57 virtual void Release() OVERRIDE; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // Test-only callback for hooking the completion of the next decode cycle. | 281 // Test-only callback for hooking the completion of the next decode cycle. |
282 base::Closure decode_callback_for_testing_; | 282 base::Closure decode_callback_for_testing_; |
283 | 283 |
284 friend class MediaSourcePlayerTest; | 284 friend class MediaSourcePlayerTest; |
285 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 285 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
286 }; | 286 }; |
287 | 287 |
288 } // namespace media | 288 } // namespace media |
289 | 289 |
290 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 290 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |