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

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

Issue 302453012: Support casting for embedded YT videos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed MediaSourcePlayer test Created 6 years, 6 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
« no previous file with comments | « media/base/android/media_player_bridge.cc ('k') | media/base/android/media_source_player.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 24 matching lines...) Expand all
35 // MediaCodec to decode audio and video streams in two separate threads. 35 // MediaCodec to decode audio and video streams in two separate threads.
36 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, 36 class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
37 public DemuxerAndroidClient { 37 public DemuxerAndroidClient {
38 public: 38 public:
39 // Constructs a player with the given ID and demuxer. |manager| must outlive 39 // Constructs a player with the given ID and demuxer. |manager| must outlive
40 // the lifetime of this object. 40 // the lifetime of this object.
41 MediaSourcePlayer(int player_id, 41 MediaSourcePlayer(int player_id,
42 MediaPlayerManager* manager, 42 MediaPlayerManager* manager,
43 const RequestMediaResourcesCB& request_media_resources_cb, 43 const RequestMediaResourcesCB& request_media_resources_cb,
44 const ReleaseMediaResourcesCB& release_media_resources_cb, 44 const ReleaseMediaResourcesCB& release_media_resources_cb,
45 scoped_ptr<DemuxerAndroid> demuxer); 45 scoped_ptr<DemuxerAndroid> demuxer,
46 const GURL& frame_url);
46 virtual ~MediaSourcePlayer(); 47 virtual ~MediaSourcePlayer();
47 48
48 // MediaPlayerAndroid implementation. 49 // MediaPlayerAndroid implementation.
49 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE; 50 virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) OVERRIDE;
50 virtual void Start() OVERRIDE; 51 virtual void Start() OVERRIDE;
51 virtual void Pause(bool is_media_related_action ALLOW_UNUSED) OVERRIDE; 52 virtual void Pause(bool is_media_related_action ALLOW_UNUSED) OVERRIDE;
52 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE; 53 virtual void SeekTo(base::TimeDelta timestamp) OVERRIDE;
53 virtual void Release() OVERRIDE; 54 virtual void Release() OVERRIDE;
54 virtual void SetVolume(double volume) OVERRIDE; 55 virtual void SetVolume(double volume) OVERRIDE;
55 virtual int GetVideoWidth() OVERRIDE; 56 virtual int GetVideoWidth() OVERRIDE;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // NOTE: Weak pointers must be invalidated before all other member variables. 265 // NOTE: Weak pointers must be invalidated before all other member variables.
265 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; 266 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_;
266 base::WeakPtr<MediaSourcePlayer> weak_this_; 267 base::WeakPtr<MediaSourcePlayer> weak_this_;
267 268
268 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); 269 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer);
269 }; 270 };
270 271
271 } // namespace media 272 } // namespace media
272 273
273 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 274 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
OLDNEW
« no previous file with comments | « media/base/android/media_player_bridge.cc ('k') | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698