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

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

Issue 1640123004: Propagate media session id into MediaPlayerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-media-session-id-over-ipc
Patch Set: Fix stray kDefaultMediaSessionID Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CODEC_PLAYER_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // For testing only. 184 // For testing only.
185 typedef base::Callback<void(DemuxerStream::Type)> CodecCreatedCallback; 185 typedef base::Callback<void(DemuxerStream::Type)> CodecCreatedCallback;
186 186
187 // Constructs a player with the given ID and demuxer. |manager| must outlive 187 // Constructs a player with the given ID and demuxer. |manager| must outlive
188 // the lifetime of this object. 188 // the lifetime of this object.
189 MediaCodecPlayer( 189 MediaCodecPlayer(
190 int player_id, 190 int player_id,
191 base::WeakPtr<MediaPlayerManager> manager, 191 base::WeakPtr<MediaPlayerManager> manager,
192 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, 192 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb,
193 scoped_ptr<DemuxerAndroid> demuxer, 193 scoped_ptr<DemuxerAndroid> demuxer,
194 const GURL& frame_url); 194 const GURL& frame_url,
195 int media_session_id);
195 ~MediaCodecPlayer() override; 196 ~MediaCodecPlayer() override;
196 197
197 // A helper method that performs the media thread part of initialization. 198 // A helper method that performs the media thread part of initialization.
198 void Initialize(); 199 void Initialize();
199 200
200 // MediaPlayerAndroid implementation. 201 // MediaPlayerAndroid implementation.
201 void DeleteOnCorrectThread() override; 202 void DeleteOnCorrectThread() override;
202 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; 203 void SetVideoSurface(gfx::ScopedJavaSurface surface) override;
203 void Start() override; 204 void Start() override;
204 void Pause(bool is_media_related_action) override; 205 void Pause(bool is_media_related_action) override;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 base::WeakPtr<MediaCodecPlayer> media_weak_this_; 419 base::WeakPtr<MediaCodecPlayer> media_weak_this_;
419 // NOTE: Weak pointers must be invalidated before all other member variables. 420 // NOTE: Weak pointers must be invalidated before all other member variables.
420 base::WeakPtrFactory<MediaCodecPlayer> media_weak_factory_; 421 base::WeakPtrFactory<MediaCodecPlayer> media_weak_factory_;
421 422
422 DISALLOW_COPY_AND_ASSIGN(MediaCodecPlayer); 423 DISALLOW_COPY_AND_ASSIGN(MediaCodecPlayer);
423 }; 424 };
424 425
425 } // namespace media 426 } // namespace media
426 427
427 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_ 428 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_
OLDNEW
« no previous file with comments | « content/browser/media/android/browser_media_player_manager.cc ('k') | media/base/android/media_codec_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698