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

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

Issue 9195001: Remove --simple-data-source and convert WebMediaPlayerImpl::Initialize() to a void function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/media/webmediaplayer_impl.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PipelineImpl which is the actual media player pipeline, it glues 6 // It contains PipelineImpl 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 // PipelineImpl would creates multiple threads and access some public methods 8 // PipelineImpl 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 class WebMediaPlayerProxy; 79 class WebMediaPlayerProxy;
80 80
81 class WebMediaPlayerImpl 81 class WebMediaPlayerImpl
82 : public WebKit::WebMediaPlayer, 82 : public WebKit::WebMediaPlayer,
83 public MessageLoop::DestructionObserver, 83 public MessageLoop::DestructionObserver,
84 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 84 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
85 public: 85 public:
86 // Construct a WebMediaPlayerImpl with reference to the client, and media 86 // Construct a WebMediaPlayerImpl with reference to the client, and media
87 // filter collection. By providing the filter collection the implementor can 87 // filter collection. By providing the filter collection the implementor can
88 // provide more specific media filters that does resource loading and 88 // provide more specific media filters that does resource loading and
89 // rendering. |collection| should contain filter factories for: 89 // rendering.
Ami GONE FROM CHROMIUM 2012/01/12 03:10:35 Why remove this chunk of comment? At least parts
scherkus (not reviewing) 2012/01/12 03:32:20 Most of it is inaccurate -- I'll selectively add b
90 // 1. Data source
91 // 2. Audio renderer
92 // 3. Video renderer (optional)
93 //
94 // There are some default filters provided by this method:
95 // 1. FFmpeg demuxer
96 // 2. FFmpeg audio decoder
97 // 3. FFmpeg video decoder
98 // 4. Video renderer
99 // 5. Null audio renderer
100 // The video renderer provided by this class is using the graphics context
101 // provided by WebKit to perform renderering. The simple data source does
102 // resource loading by loading the whole resource object into memory. Null
103 // audio renderer is a fake audio device that plays silence. Provider of the
104 // |collection| can override the default filters by adding extra filters to
105 // |collection| before calling this method.
106 // This object takes ownership of the |audio_source_provider|.
107 // 90 //
108 // Callers must call |Initialize()| before they can use the object. 91 // Callers must call |Initialize()| before they can use the object.
109 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, 92 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client,
110 base::WeakPtr<WebMediaPlayerDelegate> delegate, 93 base::WeakPtr<WebMediaPlayerDelegate> delegate,
111 media::FilterCollection* collection, 94 media::FilterCollection* collection,
112 WebKit::WebAudioSourceProvider* audio_source_provider, 95 WebKit::WebAudioSourceProvider* audio_source_provider,
113 media::MessageLoopFactory* message_loop_factory, 96 media::MessageLoopFactory* message_loop_factory,
114 MediaStreamClient* media_stream_client, 97 MediaStreamClient* media_stream_client,
115 media::MediaLog* media_log); 98 media::MediaLog* media_log);
116 virtual ~WebMediaPlayerImpl(); 99 virtual ~WebMediaPlayerImpl();
117 100
118 // Finalizes initialization of the object. 101 // Finalizes initialization of the object using the given WebFrame.
119 bool Initialize(WebKit::WebFrame* frame, bool use_simple_data_source); 102 //
103 // TODO(scherkus): fold this into the constructor http://crbug.com/109958
104 void Initialize(WebKit::WebFrame* frame);
120 105
121 virtual void load(const WebKit::WebURL& url); 106 virtual void load(const WebKit::WebURL& url);
122 virtual void cancelLoad(); 107 virtual void cancelLoad();
123 108
124 // Playback controls. 109 // Playback controls.
125 virtual void play(); 110 virtual void play();
126 virtual void pause(); 111 virtual void pause();
127 virtual bool supportsFullscreen() const; 112 virtual bool supportsFullscreen() const;
128 virtual bool supportsSave() const; 113 virtual bool supportsSave() const;
129 virtual void seek(float seconds); 114 virtual void seek(float seconds);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 bool incremented_externally_allocated_memory_; 260 bool incremented_externally_allocated_memory_;
276 261
277 WebKit::WebAudioSourceProvider* audio_source_provider_; 262 WebKit::WebAudioSourceProvider* audio_source_provider_;
278 263
279 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 264 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
280 }; 265 };
281 266
282 } // namespace webkit_media 267 } // namespace webkit_media
283 268
284 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 269 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698