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

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

Issue 1873513003: Add video-rendering to mojo media pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor cleanup 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) 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/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/buffering_state.h" 10 #include "media/base/buffering_state.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // The following permanent callbacks will be executed as follows up until 47 // The following permanent callbacks will be executed as follows up until
48 // Stop() has completed: 48 // Stop() has completed:
49 // |ended_cb| will be executed whenever the media reaches the end. 49 // |ended_cb| will be executed whenever the media reaches the end.
50 // |error_cb| will be executed whenever an error occurs but hasn't been 50 // |error_cb| will be executed whenever an error occurs but hasn't been
51 // reported already through another callback. 51 // reported already through another callback.
52 // |metadata_cb| will be executed when the content duration, container video 52 // |metadata_cb| will be executed when the content duration, container video
53 // size, start time, and whether the content has audio and/or 53 // size, start time, and whether the content has audio and/or
54 // video in supported formats are known. 54 // video in supported formats are known.
55 // |buffering_state_cb| will be executed whenever there are changes in the 55 // |buffering_state_cb| will be executed whenever there are changes in the
56 // overall buffering state of the pipeline. 56 // overall buffering state of the pipeline.
57 // |natural_size_changed_cb| will be executed whenever video natural size
58 // changes.
xhwang 2016/04/12 19:40:37 Will this be called for the first frame? I feel ca
DaleCurtis 2016/04/12 20:52:42 The VideoFrameCompositor wants this called for the
57 // |duration_change_cb| optional callback that will be executed whenever the 59 // |duration_change_cb| optional callback that will be executed whenever the
58 // presentation duration changes. 60 // presentation duration changes.
59 // |add_text_track_cb| will be executed whenever a text track is added. 61 // |add_text_track_cb| will be executed whenever a text track is added.
60 // |waiting_for_decryption_key_cb| will be executed whenever the key needed 62 // |waiting_for_decryption_key_cb| will be executed whenever the key needed
61 // to decrypt the stream is not available. 63 // to decrypt the stream is not available.
62 // It is an error to call this method after the pipeline has already started. 64 // It is an error to call this method after the pipeline has already started.
63 virtual void Start(Demuxer* demuxer, 65 virtual void Start(Demuxer* demuxer,
64 scoped_ptr<Renderer> renderer, 66 scoped_ptr<Renderer> renderer,
65 const base::Closure& ended_cb, 67 const base::Closure& ended_cb,
66 const PipelineStatusCB& error_cb, 68 const PipelineStatusCB& error_cb,
67 const PipelineStatusCB& seek_cb, 69 const PipelineStatusCB& seek_cb,
68 const PipelineMetadataCB& metadata_cb, 70 const PipelineMetadataCB& metadata_cb,
69 const BufferingStateCB& buffering_state_cb, 71 const BufferingStateCB& buffering_state_cb,
72 const NaturalSizeChangedCB& natural_size_changed_cb,
70 const base::Closure& duration_change_cb, 73 const base::Closure& duration_change_cb,
71 const AddTextTrackCB& add_text_track_cb, 74 const AddTextTrackCB& add_text_track_cb,
72 const base::Closure& waiting_for_decryption_key_cb) = 0; 75 const base::Closure& waiting_for_decryption_key_cb) = 0;
73 76
74 // Asynchronously stops the pipeline, executing |stop_cb| when the pipeline 77 // Asynchronously stops the pipeline, executing |stop_cb| when the pipeline
75 // teardown has completed. 78 // teardown has completed.
76 // 79 //
77 // Stop() must complete before destroying the pipeline. It it permissible to 80 // Stop() must complete before destroying the pipeline. It it permissible to
78 // call Stop() at any point during the lifetime of the pipeline. 81 // call Stop() at any point during the lifetime of the pipeline.
79 // 82 //
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Gets the current pipeline statistics. 156 // Gets the current pipeline statistics.
154 virtual PipelineStatistics GetStatistics() const = 0; 157 virtual PipelineStatistics GetStatistics() const = 0;
155 158
156 virtual void SetCdm(CdmContext* cdm_context, 159 virtual void SetCdm(CdmContext* cdm_context,
157 const CdmAttachedCB& cdm_attached_cb) = 0; 160 const CdmAttachedCB& cdm_attached_cb) = 0;
158 }; 161 };
159 162
160 } // namespace media 163 } // namespace media
161 164
162 #endif // MEDIA_BASE_PIPELINE_H_ 165 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698