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 27 matching lines...) Loading... |
38 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, | 38 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, |
39 public DemuxerAndroidClient { | 39 public DemuxerAndroidClient { |
40 public: | 40 public: |
41 // Constructs a player with the given ID and demuxer. |manager| must outlive | 41 // Constructs a player with the given ID and demuxer. |manager| must outlive |
42 // the lifetime of this object. | 42 // the lifetime of this object. |
43 MediaSourcePlayer( | 43 MediaSourcePlayer( |
44 int player_id, | 44 int player_id, |
45 MediaPlayerManager* manager, | 45 MediaPlayerManager* manager, |
46 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, | 46 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, |
47 scoped_ptr<DemuxerAndroid> demuxer, | 47 scoped_ptr<DemuxerAndroid> demuxer, |
48 const GURL& frame_url); | 48 const GURL& frame_url, |
| 49 int session_id); |
49 ~MediaSourcePlayer() override; | 50 ~MediaSourcePlayer() override; |
50 | 51 |
51 // MediaPlayerAndroid implementation. | 52 // MediaPlayerAndroid implementation. |
52 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; | 53 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; |
53 void Start() override; | 54 void Start() override; |
54 void Pause(bool is_media_related_action) override; | 55 void Pause(bool is_media_related_action) override; |
55 void SeekTo(base::TimeDelta timestamp) override; | 56 void SeekTo(base::TimeDelta timestamp) override; |
56 void Release() override; | 57 void Release() override; |
57 void SetVolume(double volume) override; | 58 void SetVolume(double volume) override; |
58 bool HasVideo() const override; | 59 bool HasVideo() const override; |
(...skipping 218 matching lines...) Loading... |
277 base::WeakPtr<MediaSourcePlayer> weak_this_; | 278 base::WeakPtr<MediaSourcePlayer> weak_this_; |
278 // NOTE: Weak pointers must be invalidated before all other member variables. | 279 // NOTE: Weak pointers must be invalidated before all other member variables. |
279 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; | 280 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; |
280 | 281 |
281 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 282 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
282 }; | 283 }; |
283 | 284 |
284 } // namespace media | 285 } // namespace media |
285 | 286 |
286 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 287 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |