| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 { | 363 { |
| 364 StringBuilder builder; | 364 StringBuilder builder; |
| 365 builder.append('{'); | 365 builder.append('{'); |
| 366 maybeEmitNamedBoolean(builder, m_hasExact, "exact", exact()); | 366 maybeEmitNamedBoolean(builder, m_hasExact, "exact", exact()); |
| 367 maybeEmitNamedBoolean(builder, m_hasIdeal, "ideal", ideal()); | 367 maybeEmitNamedBoolean(builder, m_hasIdeal, "ideal", ideal()); |
| 368 builder.append('}'); | 368 builder.append('}'); |
| 369 return builder.toString(); | 369 return builder.toString(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 WebMediaTrackConstraintSet::WebMediaTrackConstraintSet() | 372 WebMediaTrackConstraintSet::WebMediaTrackConstraintSet() |
| 373 : width("width") | 373 : dummy() |
| 374 , height("height") | 374 #define CONSTRAINT_ITEM(lowercase, uppercase, datatype) \ |
| 375 , aspectRatio("aspectRatio") | 375 , lowercase(#lowercase) |
| 376 , frameRate("frameRate") | 376 |
| 377 , facingMode("facingMode") | 377 CONSTRAINT_LIST |
| 378 , volume("volume") | 378 |
| 379 , sampleRate("sampleRate") | 379 #undef CONSTRAINT_ITEM |
| 380 , sampleSize("sampleSize") | |
| 381 , echoCancellation("echoCancellation") | |
| 382 , latency("latency") | |
| 383 , channelCount("channelCount") | |
| 384 , deviceId("deviceId") | |
| 385 , groupId("groupId") | |
| 386 , mediaStreamSource("mediaStreamSource") | 380 , mediaStreamSource("mediaStreamSource") |
| 387 , renderToAssociatedSink("chromeRenderToAssociatedSink") | 381 , renderToAssociatedSink("chromeRenderToAssociatedSink") |
| 388 , hotwordEnabled("hotwordEnabled") | 382 , hotwordEnabled("hotwordEnabled") |
| 389 , googEchoCancellation("googEchoCancellation") | 383 , googEchoCancellation("googEchoCancellation") |
| 390 , googExperimentalEchoCancellation("googExperimentalEchoCancellation") | 384 , googExperimentalEchoCancellation("googExperimentalEchoCancellation") |
| 391 , googAutoGainControl("googAutoGainControl") | 385 , googAutoGainControl("googAutoGainControl") |
| 392 , googExperimentalAutoGainControl("googExperimentalAutoGainControl") | 386 , googExperimentalAutoGainControl("googExperimentalAutoGainControl") |
| 393 , googNoiseSuppression("googNoiseSuppression") | 387 , googNoiseSuppression("googNoiseSuppression") |
| 394 , googHighpassFilter("googHighpassFilter") | 388 , googHighpassFilter("googHighpassFilter") |
| 395 , googTypingNoiseDetection("googTypingNoiseDetection") | 389 , googTypingNoiseDetection("googTypingNoiseDetection") |
| (...skipping 25 matching lines...) Expand all Loading... |
| 421 , googHighStartBitrate("googHighStartBitrate") | 415 , googHighStartBitrate("googHighStartBitrate") |
| 422 , googPayloadPadding("googPayloadPadding") | 416 , googPayloadPadding("googPayloadPadding") |
| 423 , googLatencyMs("latencyMs") | 417 , googLatencyMs("latencyMs") |
| 424 , googPowerLineFrequency("googPowerLineFrequency") | 418 , googPowerLineFrequency("googPowerLineFrequency") |
| 425 { | 419 { |
| 426 } | 420 } |
| 427 | 421 |
| 428 std::vector<const BaseConstraint*> WebMediaTrackConstraintSet::allConstraints()
const | 422 std::vector<const BaseConstraint*> WebMediaTrackConstraintSet::allConstraints()
const |
| 429 { | 423 { |
| 430 const BaseConstraint* temp[] = { | 424 const BaseConstraint* temp[] = { |
| 431 &width, &height, &aspectRatio, &frameRate, &facingMode, &volume, | 425 #define CONSTRAINT_ITEM(lowercase, uppercase, datatype) &lowercase, |
| 432 &sampleRate, &sampleSize, &echoCancellation, &latency, &channelCount, | 426 CONSTRAINT_LIST |
| 433 &deviceId, &groupId, &mediaStreamSource, &renderToAssociatedSink, | 427 #undef CONSTRAINT_ITEM |
| 428 &mediaStreamSource, &renderToAssociatedSink, |
| 434 &hotwordEnabled, &googEchoCancellation, | 429 &hotwordEnabled, &googEchoCancellation, |
| 435 &googExperimentalEchoCancellation, &googAutoGainControl, | 430 &googExperimentalEchoCancellation, &googAutoGainControl, |
| 436 &googExperimentalAutoGainControl, &googNoiseSuppression, | 431 &googExperimentalAutoGainControl, &googNoiseSuppression, |
| 437 &googHighpassFilter, &googTypingNoiseDetection, | 432 &googHighpassFilter, &googTypingNoiseDetection, |
| 438 &googExperimentalNoiseSuppression, &googBeamforming, | 433 &googExperimentalNoiseSuppression, &googBeamforming, |
| 439 &googArrayGeometry, &googAudioMirroring, &googDAEchoCancellation, | 434 &googArrayGeometry, &googAudioMirroring, &googDAEchoCancellation, |
| 440 &googNoiseReduction, &offerToReceiveAudio, | 435 &googNoiseReduction, &offerToReceiveAudio, |
| 441 &offerToReceiveVideo, &voiceActivityDetection, &iceRestart, | 436 &offerToReceiveVideo, &voiceActivityDetection, &iceRestart, |
| 442 &googUseRtpMux, &enableDtlsSrtp, &enableRtpDataChannels, | 437 &googUseRtpMux, &enableDtlsSrtp, &enableRtpDataChannels, |
| 443 &enableDscp, &enableIPv6, &googEnableVideoSuspendBelowMinBitrate, | 438 &enableDscp, &enableIPv6, &googEnableVideoSuspendBelowMinBitrate, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 } | 535 } |
| 541 | 536 |
| 542 const WebString WebMediaConstraints::toString() const | 537 const WebString WebMediaConstraints::toString() const |
| 543 { | 538 { |
| 544 if (isNull()) | 539 if (isNull()) |
| 545 return WebString(""); | 540 return WebString(""); |
| 546 return m_private->toString(); | 541 return m_private->toString(); |
| 547 } | 542 } |
| 548 | 543 |
| 549 } // namespace blink | 544 } // namespace blink |
| OLD | NEW |