Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: media/base/android/media_source_player.h

Issue 2338223003: Unassociating MediaSession from media players (in blink & content) (Closed)
Patch Set: fixed tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 9
10 #include <map> 10 #include <map>
(...skipping 28 matching lines...) Expand all
39 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, 39 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
40 public DemuxerAndroidClient { 40 public DemuxerAndroidClient {
41 public: 41 public:
42 // Constructs a player with the given ID and demuxer. |manager| must outlive 42 // Constructs a player with the given ID and demuxer. |manager| must outlive
43 // the lifetime of this object. 43 // the lifetime of this object.
44 MediaSourcePlayer( 44 MediaSourcePlayer(
45 int player_id, 45 int player_id,
46 MediaPlayerManager* manager, 46 MediaPlayerManager* manager,
47 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, 47 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb,
48 std::unique_ptr<DemuxerAndroid> demuxer, 48 std::unique_ptr<DemuxerAndroid> demuxer,
49 const GURL& frame_url, 49 const GURL& frame_url);
50 int media_session_id);
51 ~MediaSourcePlayer() override; 50 ~MediaSourcePlayer() override;
52 51
53 // MediaPlayerAndroid implementation. 52 // MediaPlayerAndroid implementation.
54 void SetVideoSurface(gl::ScopedJavaSurface surface) override; 53 void SetVideoSurface(gl::ScopedJavaSurface surface) override;
55 void Start() override; 54 void Start() override;
56 void Pause(bool is_media_related_action) override; 55 void Pause(bool is_media_related_action) override;
57 void SeekTo(base::TimeDelta timestamp) override; 56 void SeekTo(base::TimeDelta timestamp) override;
58 void Release() override; 57 void Release() override;
59 bool HasVideo() const override; 58 bool HasVideo() const override;
60 bool HasAudio() const override; 59 bool HasAudio() const override;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 base::WeakPtr<MediaSourcePlayer> weak_this_; 280 base::WeakPtr<MediaSourcePlayer> weak_this_;
282 // NOTE: Weak pointers must be invalidated before all other member variables. 281 // NOTE: Weak pointers must be invalidated before all other member variables.
283 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; 282 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_;
284 283
285 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); 284 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer);
286 }; 285 };
287 286
288 } // namespace media 287 } // namespace media
289 288
290 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 289 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
OLDNEW
« no previous file with comments | « media/base/android/media_player_bridge_unittest.cc ('k') | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698