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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp

Issue 2037573004: Add video width and height to getSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Ericsson AB. All rights reserved. 3 * Copyright (C) 2011 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 m_constraints = constraints; 181 m_constraints = constraints;
182 } 182 }
183 183
184 void MediaStreamTrack::getSettings(MediaTrackSettings& settings) 184 void MediaStreamTrack::getSettings(MediaTrackSettings& settings)
185 { 185 {
186 WebMediaStreamTrack::Settings platformSettings; 186 WebMediaStreamTrack::Settings platformSettings;
187 m_component->getSettings(platformSettings); 187 m_component->getSettings(platformSettings);
188 if (platformSettings.hasFrameRate()) { 188 if (platformSettings.hasFrameRate()) {
189 settings.setFrameRate(platformSettings.frameRate); 189 settings.setFrameRate(platformSettings.frameRate);
190 } 190 }
191 if (platformSettings.hasWidth()) {
192 settings.setWidth(platformSettings.width);
193 }
194 if (platformSettings.hasHeight()) {
195 settings.setHeight(platformSettings.height);
196 }
191 settings.setDeviceId(platformSettings.deviceId); 197 settings.setDeviceId(platformSettings.deviceId);
192 } 198 }
193 199
194 bool MediaStreamTrack::ended() const 200 bool MediaStreamTrack::ended() const
195 { 201 {
196 return m_stopped || (m_readyState == MediaStreamSource::ReadyStateEnded); 202 return m_stopped || (m_readyState == MediaStreamSource::ReadyStateEnded);
197 } 203 }
198 204
199 void MediaStreamTrack::sourceChangedState() 205 void MediaStreamTrack::sourceChangedState()
200 { 206 {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 287
282 DEFINE_TRACE(MediaStreamTrack) 288 DEFINE_TRACE(MediaStreamTrack)
283 { 289 {
284 visitor->trace(m_registeredMediaStreams); 290 visitor->trace(m_registeredMediaStreams);
285 visitor->trace(m_component); 291 visitor->trace(m_component);
286 EventTargetWithInlineData::trace(visitor); 292 EventTargetWithInlineData::trace(visitor);
287 ActiveDOMObject::trace(visitor); 293 ActiveDOMObject::trace(visitor);
288 } 294 }
289 295
290 } // namespace blink 296 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698