OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Trigger all cached callbacks from AddTrack. AddTrack is successful | 141 // Trigger all cached callbacks from AddTrack. AddTrack is successful |
142 // if the capture delegate has started and the constraints provided in | 142 // if the capture delegate has started and the constraints provided in |
143 // AddTrack match the format that was used to start the device. | 143 // AddTrack match the format that was used to start the device. |
144 // Note that it must be ok to delete the MediaStreamVideoSource object | 144 // Note that it must be ok to delete the MediaStreamVideoSource object |
145 // in the context of the callback. If gUM fail, the implementation will | 145 // in the context of the callback. If gUM fail, the implementation will |
146 // simply drop the references to the blink source and track which will lead | 146 // simply drop the references to the blink source and track which will lead |
147 // to that this object is deleted. | 147 // to that this object is deleted. |
148 void FinalizeAddTrack(); | 148 void FinalizeAddTrack(); |
149 | 149 |
150 State state_; | 150 State state_; |
151 bool muted_state_; | |
152 | 151 |
153 media::VideoCaptureFormat current_format_; | 152 media::VideoCaptureFormat current_format_; |
154 | 153 |
155 struct RequestedConstraints { | 154 struct RequestedConstraints { |
156 RequestedConstraints(MediaStreamVideoTrack* track, | 155 RequestedConstraints(MediaStreamVideoTrack* track, |
157 const VideoCaptureDeliverFrameCB& frame_callback, | 156 const VideoCaptureDeliverFrameCB& frame_callback, |
158 const blink::WebMediaConstraints& constraints, | 157 const blink::WebMediaConstraints& constraints, |
159 const ConstraintsCallback& callback); | 158 const ConstraintsCallback& callback); |
160 ~RequestedConstraints(); | 159 ~RequestedConstraints(); |
161 | 160 |
(...skipping 14 matching lines...) Expand all Loading... |
176 | 175 |
177 // NOTE: Weak pointers must be invalidated before all other member variables. | 176 // NOTE: Weak pointers must be invalidated before all other member variables. |
178 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; | 177 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; |
179 | 178 |
180 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); | 179 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); |
181 }; | 180 }; |
182 | 181 |
183 } // namespace content | 182 } // namespace content |
184 | 183 |
185 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 184 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
OLD | NEW |