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

Side by Side Diff: media/base/pipeline_impl.h

Issue 1873513003: Add video-rendering to mojo media pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 8 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_PIPELINE_IMPL_H_ 5 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_
6 #define MEDIA_BASE_PIPELINE_IMPL_H_ 6 #define MEDIA_BASE_PIPELINE_IMPL_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool HasWeakPtrsForTesting() const; 83 bool HasWeakPtrsForTesting() const;
84 84
85 // Pipeline implementation. 85 // Pipeline implementation.
86 void Start(Demuxer* demuxer, 86 void Start(Demuxer* demuxer,
87 scoped_ptr<Renderer> renderer, 87 scoped_ptr<Renderer> renderer,
88 const base::Closure& ended_cb, 88 const base::Closure& ended_cb,
89 const PipelineStatusCB& error_cb, 89 const PipelineStatusCB& error_cb,
90 const PipelineStatusCB& seek_cb, 90 const PipelineStatusCB& seek_cb,
91 const PipelineMetadataCB& metadata_cb, 91 const PipelineMetadataCB& metadata_cb,
92 const BufferingStateCB& buffering_state_cb, 92 const BufferingStateCB& buffering_state_cb,
93 const NaturalSizeChangedCB& natural_size_changed_cb,
93 const base::Closure& duration_change_cb, 94 const base::Closure& duration_change_cb,
94 const AddTextTrackCB& add_text_track_cb, 95 const AddTextTrackCB& add_text_track_cb,
95 const base::Closure& waiting_for_decryption_key_cb) override; 96 const base::Closure& waiting_for_decryption_key_cb) override;
96 void Stop(const base::Closure& stop_cb) override; 97 void Stop(const base::Closure& stop_cb) override;
97 void Seek(base::TimeDelta time, const PipelineStatusCB& seek_cb) override; 98 void Seek(base::TimeDelta time, const PipelineStatusCB& seek_cb) override;
98 bool IsRunning() const override; 99 bool IsRunning() const override;
99 double GetPlaybackRate() const override; 100 double GetPlaybackRate() const override;
100 void SetPlaybackRate(double playback_rate) override; 101 void SetPlaybackRate(double playback_rate) override;
101 void Suspend(const PipelineStatusCB& suspend_cb) override; 102 void Suspend(const PipelineStatusCB& suspend_cb) override;
102 void Resume(scoped_ptr<Renderer> renderer, 103 void Resume(scoped_ptr<Renderer> renderer,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void DoSeek(base::TimeDelta seek_timestamp, const PipelineStatusCB& done_cb); 226 void DoSeek(base::TimeDelta seek_timestamp, const PipelineStatusCB& done_cb);
226 227
227 // Initiates an asynchronous pause-flush-stop call sequence executing 228 // Initiates an asynchronous pause-flush-stop call sequence executing
228 // |done_cb| when completed. 229 // |done_cb| when completed.
229 void DoStop(const PipelineStatusCB& done_cb); 230 void DoStop(const PipelineStatusCB& done_cb);
230 void OnStopCompleted(PipelineStatus status); 231 void OnStopCompleted(PipelineStatus status);
231 232
232 void ReportMetadata(); 233 void ReportMetadata();
233 234
234 void BufferingStateChanged(BufferingState new_buffering_state); 235 void BufferingStateChanged(BufferingState new_buffering_state);
236 void OnNaturalSizeChanged(const gfx::Size& size);
235 237
236 // Task runner used to execute pipeline tasks. 238 // Task runner used to execute pipeline tasks.
237 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 239 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
238 240
239 // MediaLog to which to log events. 241 // MediaLog to which to log events.
240 scoped_refptr<MediaLog> media_log_; 242 scoped_refptr<MediaLog> media_log_;
241 243
242 // Lock used to serialize access for the following data members. 244 // Lock used to serialize access for the following data members.
243 mutable base::Lock lock_; 245 mutable base::Lock lock_;
244 246
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 base::Closure stop_cb_; 298 base::Closure stop_cb_;
297 299
298 // Temporary callback used for Suspend(). 300 // Temporary callback used for Suspend().
299 PipelineStatusCB suspend_cb_; 301 PipelineStatusCB suspend_cb_;
300 302
301 // Permanent callbacks passed in via Start(). 303 // Permanent callbacks passed in via Start().
302 base::Closure ended_cb_; 304 base::Closure ended_cb_;
303 PipelineStatusCB error_cb_; 305 PipelineStatusCB error_cb_;
304 PipelineMetadataCB metadata_cb_; 306 PipelineMetadataCB metadata_cb_;
305 BufferingStateCB buffering_state_cb_; 307 BufferingStateCB buffering_state_cb_;
308 NaturalSizeChangedCB natural_size_changed_cb_;
306 base::Closure duration_change_cb_; 309 base::Closure duration_change_cb_;
307 AddTextTrackCB add_text_track_cb_; 310 AddTextTrackCB add_text_track_cb_;
308 base::Closure waiting_for_decryption_key_cb_; 311 base::Closure waiting_for_decryption_key_cb_;
309 312
310 // Holds the initialized demuxer. Used for seeking. Owned by client. 313 // Holds the initialized demuxer. Used for seeking. Owned by client.
311 Demuxer* demuxer_; 314 Demuxer* demuxer_;
312 315
313 // Holds the initialized renderers. Used for setting the volume, 316 // Holds the initialized renderers. Used for setting the volume,
314 // playback rate, and determining when playback has finished. 317 // playback rate, and determining when playback has finished.
315 scoped_ptr<Renderer> renderer_; 318 scoped_ptr<Renderer> renderer_;
(...skipping 21 matching lines...) Expand all
337 // Declared last so that weak pointers will be invalidated before all other 340 // Declared last so that weak pointers will be invalidated before all other
338 // member variables. 341 // member variables.
339 base::WeakPtrFactory<PipelineImpl> weak_factory_; 342 base::WeakPtrFactory<PipelineImpl> weak_factory_;
340 343
341 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); 344 DISALLOW_COPY_AND_ASSIGN(PipelineImpl);
342 }; 345 };
343 346
344 } // namespace media 347 } // namespace media
345 348
346 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ 349 #endif // MEDIA_BASE_PIPELINE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698