| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 struct SpatialLayer { | 586 struct SpatialLayer { |
| 587 int scaling_factor_num; | 587 int scaling_factor_num; |
| 588 int scaling_factor_den; | 588 int scaling_factor_den; |
| 589 int target_bitrate_bps; | 589 int target_bitrate_bps; |
| 590 // TODO(ivica): Add max_quantizer and min_quantizer? | 590 // TODO(ivica): Add max_quantizer and min_quantizer? |
| 591 }; | 591 }; |
| 592 | 592 |
| 593 enum VideoCodecMode { kRealtimeVideo, kScreensharing }; | 593 enum VideoCodecMode { kRealtimeVideo, kScreensharing }; |
| 594 | 594 |
| 595 // Common video codec properties | 595 // Common video codec properties |
| 596 struct VideoCodec { | 596 class VideoCodec { |
| 597 public: |
| 598 VideoCodec(); |
| 599 |
| 600 // Public variables. TODO(hta): Make them private with accessors. |
| 597 VideoCodecType codecType; | 601 VideoCodecType codecType; |
| 598 char plName[kPayloadNameSize]; | 602 char plName[kPayloadNameSize]; |
| 599 unsigned char plType; | 603 unsigned char plType; |
| 600 | 604 |
| 601 unsigned short width; | 605 unsigned short width; |
| 602 unsigned short height; | 606 unsigned short height; |
| 603 | 607 |
| 604 unsigned int startBitrate; // kilobits/sec. | 608 unsigned int startBitrate; // kilobits/sec. |
| 605 unsigned int maxBitrate; // kilobits/sec. | 609 unsigned int maxBitrate; // kilobits/sec. |
| 606 unsigned int minBitrate; // kilobits/sec. | 610 unsigned int minBitrate; // kilobits/sec. |
| 607 unsigned int targetBitrate; // kilobits/sec. | 611 unsigned int targetBitrate; // kilobits/sec. |
| 608 | 612 |
| 609 unsigned char maxFramerate; | 613 unsigned char maxFramerate; |
| 610 | 614 |
| 611 VideoCodecUnion codecSpecific; | |
| 612 | |
| 613 unsigned int qpMax; | 615 unsigned int qpMax; |
| 614 unsigned char numberOfSimulcastStreams; | 616 unsigned char numberOfSimulcastStreams; |
| 615 SimulcastStream simulcastStream[kMaxSimulcastStreams]; | 617 SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
| 616 SpatialLayer spatialLayers[kMaxSpatialLayers]; | 618 SpatialLayer spatialLayers[kMaxSpatialLayers]; |
| 617 | 619 |
| 618 VideoCodecMode mode; | 620 VideoCodecMode mode; |
| 619 bool expect_encode_from_texture; | 621 bool expect_encode_from_texture; |
| 620 | 622 |
| 621 bool operator==(const VideoCodec& other) const = delete; | 623 bool operator==(const VideoCodec& other) const = delete; |
| 622 bool operator!=(const VideoCodec& other) const = delete; | 624 bool operator!=(const VideoCodec& other) const = delete; |
| 625 |
| 626 // Accessors for codec specific information. |
| 627 // There is a const version of each that returns a reference, |
| 628 // and a non-const version that returns a pointer, in order |
| 629 // to allow modification of the parameters. |
| 630 VideoCodecVP8* VP8(); |
| 631 const VideoCodecVP8& VP8() const; |
| 632 VideoCodecVP9* VP9(); |
| 633 const VideoCodecVP9& VP9() const; |
| 634 VideoCodecH264* H264(); |
| 635 const VideoCodecH264& H264() const; |
| 636 |
| 637 // This variable will be declared private and renamed to codec_specific_ |
| 638 // once Chromium is not accessing it. |
| 639 // TODO(hta): Consider replacing the union with a pointer type. |
| 640 // This will allow removing the VideoCodec* types from this file. |
| 641 VideoCodecUnion codecSpecific; |
| 623 }; | 642 }; |
| 624 | 643 |
| 625 // Bandwidth over-use detector options. These are used to drive | 644 // Bandwidth over-use detector options. These are used to drive |
| 626 // experimentation with bandwidth estimation parameters. | 645 // experimentation with bandwidth estimation parameters. |
| 627 // See modules/remote_bitrate_estimator/overuse_detector.h | 646 // See modules/remote_bitrate_estimator/overuse_detector.h |
| 628 struct OverUseDetectorOptions { | 647 struct OverUseDetectorOptions { |
| 629 OverUseDetectorOptions() | 648 OverUseDetectorOptions() |
| 630 : initial_slope(8.0 / 512.0), | 649 : initial_slope(8.0 / 512.0), |
| 631 initial_offset(0), | 650 initial_offset(0), |
| 632 initial_e(), | 651 initial_e(), |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 840 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
| 822 | 841 |
| 823 enum NetworkState { | 842 enum NetworkState { |
| 824 kNetworkUp, | 843 kNetworkUp, |
| 825 kNetworkDown, | 844 kNetworkDown, |
| 826 }; | 845 }; |
| 827 | 846 |
| 828 } // namespace webrtc | 847 } // namespace webrtc |
| 829 | 848 |
| 830 #endif // WEBRTC_COMMON_TYPES_H_ | 849 #endif // WEBRTC_COMMON_TYPES_H_ |
| OLD | NEW |