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

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: incorporated aaron's comments 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;
acolwell GONE FROM CHROMIUM 2013/05/17 16:32:08 nit: I don't think you need this since you are inc
Matthew Heaney (Chromium) 2013/05/18 01:35:48 Done.
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int system_code); 206 int system_code);
204 void OnKeyMessage(const std::string& key_system, 207 void OnKeyMessage(const std::string& key_system,
205 const std::string& session_id, 208 const std::string& session_id,
206 const std::string& message, 209 const std::string& message,
207 const std::string& default_url); 210 const std::string& default_url);
208 void OnNeedKey(const std::string& key_system, 211 void OnNeedKey(const std::string& key_system,
209 const std::string& type, 212 const std::string& type,
210 const std::string& session_id, 213 const std::string& session_id,
211 scoped_ptr<uint8[]> init_data, 214 scoped_ptr<uint8[]> init_data,
212 int init_data_size); 215 int init_data_size);
216 scoped_ptr<media::TextTrack> OnTextTrack(media::TextKind kind,
217 const std::string& label,
218 const std::string& language);
213 void SetOpaque(bool); 219 void SetOpaque(bool);
214 220
215 private: 221 private:
216 // Contains common logic used across the different types loading. 222 // Contains common logic used across the different types loading.
217 void LoadSetup(const WebKit::WebURL& url); 223 void LoadSetup(const WebKit::WebURL& url);
218 224
219 // Called after asynchronous initialization of a data source completed. 225 // Called after asynchronous initialization of a data source completed.
220 void DataSourceInitialized(const GURL& gurl, bool success); 226 void DataSourceInitialized(const GURL& gurl, bool success);
221 227
222 // Called when the data source is downloading or paused. 228 // Called when the data source is downloading or paused.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 bool pending_size_change_; 369 bool pending_size_change_;
364 370
365 // The compositor layer for displaying the video content when using composited 371 // The compositor layer for displaying the video content when using composited
366 // playback. 372 // playback.
367 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; 373 scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
368 374
369 // A pointer back to the compositor to inform it about state changes. This is 375 // A pointer back to the compositor to inform it about state changes. This is
370 // not NULL while the compositor is actively using this webmediaplayer. 376 // not NULL while the compositor is actively using this webmediaplayer.
371 cc::VideoFrameProvider::Client* video_frame_provider_client_; 377 cc::VideoFrameProvider::Client* video_frame_provider_client_;
372 378
379 // Text track objects get a unique index value when they're created.
380 int text_track_index_;
381
373 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 382 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
374 }; 383 };
375 384
376 } // namespace webkit_media 385 } // namespace webkit_media
377 386
378 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 387 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698