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

Side by Side Diff: webkit/media/webmediaplayer_impl.h

Issue 13419002: Media Source dispatches inband text tracks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: clean compile Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains Pipeline which is the actual media player pipeline, it glues 6 // It contains Pipeline which is the actual media player pipeline, it glues
7 // the media player pipeline, data source, audio renderer and renderer. 7 // the media player pipeline, data source, audio renderer and renderer.
8 // Pipeline would creates multiple threads and access some public methods 8 // Pipeline would creates multiple threads and access some public methods
9 // of this class, so we need to be extra careful about concurrent access of 9 // of this class, so we need to be extra careful about concurrent access of
10 // methods and members. 10 // methods and members.
(...skipping 13 matching lines...) Expand all
24 24
25 #include "base/memory/ref_counted.h" 25 #include "base/memory/ref_counted.h"
26 #include "base/memory/scoped_ptr.h" 26 #include "base/memory/scoped_ptr.h"
27 #include "base/memory/weak_ptr.h" 27 #include "base/memory/weak_ptr.h"
28 #include "base/threading/thread.h" 28 #include "base/threading/thread.h"
29 #include "cc/layers/video_frame_provider.h" 29 #include "cc/layers/video_frame_provider.h"
30 #include "googleurl/src/gurl.h" 30 #include "googleurl/src/gurl.h"
31 #include "media/base/audio_renderer_sink.h" 31 #include "media/base/audio_renderer_sink.h"
32 #include "media/base/decryptor.h" 32 #include "media/base/decryptor.h"
33 #include "media/base/pipeline.h" 33 #include "media/base/pipeline.h"
34 #include "media/base/text_track.h"
34 #include "media/filters/gpu_video_decoder.h" 35 #include "media/filters/gpu_video_decoder.h"
35 #include "media/filters/skcanvas_video_renderer.h" 36 #include "media/filters/skcanvas_video_renderer.h"
36 #include "skia/ext/platform_canvas.h" 37 #include "skia/ext/platform_canvas.h"
37 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 38 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h"
41 #include "webkit/media/crypto/key_systems.h" 42 #include "webkit/media/crypto/key_systems.h"
42 #include "webkit/media/crypto/proxy_decryptor.h" 43 #include "webkit/media/crypto/proxy_decryptor.h"
43 44
44 class RenderAudioSourceProvider; 45 class RenderAudioSourceProvider;
45 46
46 namespace WebKit { 47 namespace WebKit {
47 class WebFrame; 48 class WebFrame;
48 } 49 }
49 50
50 namespace base { 51 namespace base {
51 class MessageLoopProxy; 52 class MessageLoopProxy;
52 } 53 }
53 54
54 namespace media { 55 namespace media {
55 class ChunkDemuxer; 56 class ChunkDemuxer;
56 class FFmpegDemuxer; 57 class FFmpegDemuxer;
57 class MediaLog; 58 class MediaLog;
59 class TextTrack;
58 } 60 }
59 61
60 namespace webkit { 62 namespace webkit {
61 class WebLayerImpl; 63 class WebLayerImpl;
62 } 64 }
63 65
64 namespace webkit_media { 66 namespace webkit_media {
65 67
66 class BufferedDataSource; 68 class BufferedDataSource;
67 class MediaStreamClient; 69 class MediaStreamClient;
68 class WebAudioSourceProviderImpl; 70 class WebAudioSourceProviderImpl;
69 class WebMediaPlayerDelegate; 71 class WebMediaPlayerDelegate;
70 class WebMediaPlayerParams; 72 class WebMediaPlayerParams;
73 class WebTextTrackImpl;
71 74
72 class WebMediaPlayerImpl 75 class WebMediaPlayerImpl
73 : public WebKit::WebMediaPlayer, 76 : public WebKit::WebMediaPlayer,
74 public cc::VideoFrameProvider, 77 public cc::VideoFrameProvider,
75 public base::MessageLoop::DestructionObserver, 78 public base::MessageLoop::DestructionObserver,
76 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 79 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
77 public: 80 public:
78 // Constructs a WebMediaPlayer implementation using Chromium's media stack. 81 // Constructs a WebMediaPlayer implementation using Chromium's media stack.
79 // 82 //
80 // |delegate| may be null. 83 // |delegate| may be null.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 int system_code); 205 int system_code);
203 void OnKeyMessage(const std::string& key_system, 206 void OnKeyMessage(const std::string& key_system,
204 const std::string& session_id, 207 const std::string& session_id,
205 const std::string& message, 208 const std::string& message,
206 const std::string& default_url); 209 const std::string& default_url);
207 void OnNeedKey(const std::string& key_system, 210 void OnNeedKey(const std::string& key_system,
208 const std::string& type, 211 const std::string& type,
209 const std::string& session_id, 212 const std::string& session_id,
210 scoped_ptr<uint8[]> init_data, 213 scoped_ptr<uint8[]> init_data,
211 int init_data_size); 214 int init_data_size);
215
216 // TODO(matthewjheaney): need ruling about this return type
217 media::TextTrack* OnTextTrack(media::TextKind kind,
acolwell GONE FROM CHROMIUM 2013/05/10 02:22:08 scoped_ptr<TextTrack>
Matthew Heaney (Chromium) 2013/05/10 05:21:08 Done.
218 const std::string& label,
219 const std::string& language);
212 void SetOpaque(bool); 220 void SetOpaque(bool);
213 221
214 private: 222 private:
215 // Contains common logic used across the different types loading. 223 // Contains common logic used across the different types loading.
216 void LoadSetup(const WebKit::WebURL& url); 224 void LoadSetup(const WebKit::WebURL& url);
217 225
218 // Called after asynchronous initialization of a data source completed. 226 // Called after asynchronous initialization of a data source completed.
219 void DataSourceInitialized(const GURL& gurl, bool success); 227 void DataSourceInitialized(const GURL& gurl, bool success);
220 228
221 // Called when the data source is downloading or paused. 229 // Called when the data source is downloading or paused.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 bool pending_size_change_; 370 bool pending_size_change_;
363 371
364 // The compositor layer for displaying the video content when using composited 372 // The compositor layer for displaying the video content when using composited
365 // playback. 373 // playback.
366 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; 374 scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
367 375
368 // A pointer back to the compositor to inform it about state changes. This is 376 // A pointer back to the compositor to inform it about state changes. This is
369 // not NULL while the compositor is actively using this webmediaplayer. 377 // not NULL while the compositor is actively using this webmediaplayer.
370 cc::VideoFrameProvider::Client* video_frame_provider_client_; 378 cc::VideoFrameProvider::Client* video_frame_provider_client_;
371 379
380 // TODO(matthewjheaney): must resolve ptr type, and lifetime issues
381 //std::set<WebTextTrackImpl*> text_tracks_;
382 int text_track_index_;
383
372 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 384 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
373 }; 385 };
374 386
375 } // namespace webkit_media 387 } // namespace webkit_media
376 388
377 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 389 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698