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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
675 int target_bitrate_bps; | 675 int target_bitrate_bps; |
676 // TODO(ivica): Add max_quantizer and min_quantizer? | 676 // TODO(ivica): Add max_quantizer and min_quantizer? |
677 }; | 677 }; |
678 | 678 |
679 enum VideoCodecMode { | 679 enum VideoCodecMode { |
680 kRealtimeVideo, | 680 kRealtimeVideo, |
681 kScreensharing | 681 kScreensharing |
682 }; | 682 }; |
683 | 683 |
684 // Common video codec properties | 684 // Common video codec properties |
685 struct VideoCodec { | 685 class VideoCodec { |
686 public: | |
687 VideoCodec(); | |
688 | |
689 // Public variables. TODO(hta): Make them private with accessors. | |
tommi
2016/05/23 17:05:09
nit: TODO on a line of its own
hta-webrtc
2016/05/23 17:19:33
Done.
| |
686 VideoCodecType codecType; | 690 VideoCodecType codecType; |
687 char plName[kPayloadNameSize]; | 691 char plName[kPayloadNameSize]; |
688 unsigned char plType; | 692 unsigned char plType; |
689 | 693 |
690 unsigned short width; | 694 unsigned short width; |
691 unsigned short height; | 695 unsigned short height; |
692 | 696 |
693 unsigned int startBitrate; // kilobits/sec. | 697 unsigned int startBitrate; // kilobits/sec. |
694 unsigned int maxBitrate; // kilobits/sec. | 698 unsigned int maxBitrate; // kilobits/sec. |
695 unsigned int minBitrate; // kilobits/sec. | 699 unsigned int minBitrate; // kilobits/sec. |
696 unsigned int targetBitrate; // kilobits/sec. | 700 unsigned int targetBitrate; // kilobits/sec. |
697 | 701 |
698 unsigned char maxFramerate; | 702 unsigned char maxFramerate; |
699 | 703 |
700 VideoCodecUnion codecSpecific; | |
701 | |
702 unsigned int qpMax; | 704 unsigned int qpMax; |
703 unsigned char numberOfSimulcastStreams; | 705 unsigned char numberOfSimulcastStreams; |
704 SimulcastStream simulcastStream[kMaxSimulcastStreams]; | 706 SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
705 SpatialLayer spatialLayers[kMaxSpatialLayers]; | 707 SpatialLayer spatialLayers[kMaxSpatialLayers]; |
706 | 708 |
707 VideoCodecMode mode; | 709 VideoCodecMode mode; |
708 | 710 |
709 bool operator==(const VideoCodec& other) const = delete; | 711 bool operator==(const VideoCodec& other) const = delete; |
710 bool operator!=(const VideoCodec& other) const = delete; | 712 bool operator!=(const VideoCodec& other) const = delete; |
713 | |
714 // Accessors for codec specific information. | |
715 // There is a const version of each that returns a reference, | |
716 // and a non-const version that returns a pointer, in order | |
717 // to allow modification of the parameters. | |
718 VideoCodecVP8* VP8(); | |
719 const VideoCodecVP8& VP8() const; | |
720 VideoCodecVP9* VP9(); | |
721 const VideoCodecVP9& VP9() const; | |
722 VideoCodecH264* H264(); | |
723 const VideoCodecH264& H264() const; | |
724 | |
725 private: | |
726 // TODO(hta): Consider replacing the union with a pointer type. | |
727 // This will allow removing the VideoCodec* types from this file. | |
728 VideoCodecUnion codec_specific_; | |
711 }; | 729 }; |
712 | 730 |
713 // Bandwidth over-use detector options. These are used to drive | 731 // Bandwidth over-use detector options. These are used to drive |
714 // experimentation with bandwidth estimation parameters. | 732 // experimentation with bandwidth estimation parameters. |
715 // See modules/remote_bitrate_estimator/overuse_detector.h | 733 // See modules/remote_bitrate_estimator/overuse_detector.h |
716 struct OverUseDetectorOptions { | 734 struct OverUseDetectorOptions { |
717 OverUseDetectorOptions() | 735 OverUseDetectorOptions() |
718 : initial_slope(8.0/512.0), | 736 : initial_slope(8.0/512.0), |
719 initial_offset(0), | 737 initial_offset(0), |
720 initial_e(), | 738 initial_e(), |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
893 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 911 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
894 | 912 |
895 enum NetworkState { | 913 enum NetworkState { |
896 kNetworkUp, | 914 kNetworkUp, |
897 kNetworkDown, | 915 kNetworkDown, |
898 }; | 916 }; |
899 | 917 |
900 } // namespace webrtc | 918 } // namespace webrtc |
901 | 919 |
902 #endif // WEBRTC_COMMON_TYPES_H_ | 920 #endif // WEBRTC_COMMON_TYPES_H_ |
OLD | NEW |