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

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

Issue 1083683003: Speculative revert by sheriff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed an unrelated commit that had accidentally slipped in. Created 5 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
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/pipeline.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) 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 #ifndef MEDIA_BASE_PIPELINE_H_ 5 #ifndef MEDIA_BASE_PIPELINE_H_
6 #define MEDIA_BASE_PIPELINE_H_ 6 #define MEDIA_BASE_PIPELINE_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // The following permanent callbacks will be executed as follows up until 93 // The following permanent callbacks will be executed as follows up until
94 // Stop() has completed: 94 // Stop() has completed:
95 // |ended_cb| will be executed whenever the media reaches the end. 95 // |ended_cb| will be executed whenever the media reaches the end.
96 // |error_cb| will be executed whenever an error occurs but hasn't been 96 // |error_cb| will be executed whenever an error occurs but hasn't been
97 // reported already through another callback. 97 // reported already through another callback.
98 // |metadata_cb| will be executed when the content duration, container video 98 // |metadata_cb| will be executed when the content duration, container video
99 // size, start time, and whether the content has audio and/or 99 // size, start time, and whether the content has audio and/or
100 // video in supported formats are known. 100 // video in supported formats are known.
101 // |buffering_state_cb| will be executed whenever there are changes in the 101 // |buffering_state_cb| will be executed whenever there are changes in the
102 // overall buffering state of the pipeline. 102 // overall buffering state of the pipeline.
103 // |paint_cb| will be executed whenever there is a VideoFrame to be painted.
104 // It's safe to call this callback from any thread.
103 // |duration_change_cb| optional callback that will be executed whenever the 105 // |duration_change_cb| optional callback that will be executed whenever the
104 // presentation duration changes. 106 // presentation duration changes.
105 // |add_text_track_cb| will be executed whenever a text track is added. 107 // |add_text_track_cb| will be executed whenever a text track is added.
106 // |waiting_for_decryption_key_cb| will be executed whenever the key needed 108 // |waiting_for_decryption_key_cb| will be executed whenever the key needed
107 // to decrypt the stream is not available. 109 // to decrypt the stream is not available.
108 // It is an error to call this method after the pipeline has already started. 110 // It is an error to call this method after the pipeline has already started.
109 void Start(Demuxer* demuxer, 111 void Start(Demuxer* demuxer,
110 scoped_ptr<Renderer> renderer, 112 scoped_ptr<Renderer> renderer,
111 const base::Closure& ended_cb, 113 const base::Closure& ended_cb,
112 const PipelineStatusCB& error_cb, 114 const PipelineStatusCB& error_cb,
113 const PipelineStatusCB& seek_cb, 115 const PipelineStatusCB& seek_cb,
114 const PipelineMetadataCB& metadata_cb, 116 const PipelineMetadataCB& metadata_cb,
115 const BufferingStateCB& buffering_state_cb, 117 const BufferingStateCB& buffering_state_cb,
118 const PaintCB& paint_cb,
116 const base::Closure& duration_change_cb, 119 const base::Closure& duration_change_cb,
117 const AddTextTrackCB& add_text_track_cb, 120 const AddTextTrackCB& add_text_track_cb,
118 const base::Closure& waiting_for_decryption_key_cb); 121 const base::Closure& waiting_for_decryption_key_cb);
119 122
120 // Asynchronously stops the pipeline, executing |stop_cb| when the pipeline 123 // Asynchronously stops the pipeline, executing |stop_cb| when the pipeline
121 // teardown has completed. 124 // teardown has completed.
122 // 125 //
123 // Stop() must complete before destroying the pipeline. It it permissible to 126 // Stop() must complete before destroying the pipeline. It it permissible to
124 // call Stop() at any point during the lifetime of the pipeline. 127 // call Stop() at any point during the lifetime of the pipeline.
125 // 128 //
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 PipelineStatusCB seek_cb_; 353 PipelineStatusCB seek_cb_;
351 354
352 // Temporary callback used for Stop(). 355 // Temporary callback used for Stop().
353 base::Closure stop_cb_; 356 base::Closure stop_cb_;
354 357
355 // Permanent callbacks passed in via Start(). 358 // Permanent callbacks passed in via Start().
356 base::Closure ended_cb_; 359 base::Closure ended_cb_;
357 PipelineStatusCB error_cb_; 360 PipelineStatusCB error_cb_;
358 PipelineMetadataCB metadata_cb_; 361 PipelineMetadataCB metadata_cb_;
359 BufferingStateCB buffering_state_cb_; 362 BufferingStateCB buffering_state_cb_;
363 PaintCB paint_cb_;
360 base::Closure duration_change_cb_; 364 base::Closure duration_change_cb_;
361 AddTextTrackCB add_text_track_cb_; 365 AddTextTrackCB add_text_track_cb_;
362 base::Closure waiting_for_decryption_key_cb_; 366 base::Closure waiting_for_decryption_key_cb_;
363 367
364 // Holds the initialized demuxer. Used for seeking. Owned by client. 368 // Holds the initialized demuxer. Used for seeking. Owned by client.
365 Demuxer* demuxer_; 369 Demuxer* demuxer_;
366 370
367 // Holds the initialized renderers. Used for setting the volume, 371 // Holds the initialized renderers. Used for setting the volume,
368 // playback rate, and determining when playback has finished. 372 // playback rate, and determining when playback has finished.
369 scoped_ptr<Renderer> renderer_; 373 scoped_ptr<Renderer> renderer_;
(...skipping 12 matching lines...) Expand all
382 386
383 // NOTE: Weak pointers must be invalidated before all other member variables. 387 // NOTE: Weak pointers must be invalidated before all other member variables.
384 base::WeakPtrFactory<Pipeline> weak_factory_; 388 base::WeakPtrFactory<Pipeline> weak_factory_;
385 389
386 DISALLOW_COPY_AND_ASSIGN(Pipeline); 390 DISALLOW_COPY_AND_ASSIGN(Pipeline);
387 }; 391 };
388 392
389 } // namespace media 393 } // namespace media
390 394
391 #endif // MEDIA_BASE_PIPELINE_H_ 395 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698