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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 kVideoNV12 = 11, | 541 kVideoNV12 = 11, |
542 kVideoNV21 = 12, | 542 kVideoNV21 = 12, |
543 kVideoBGRA = 13, | 543 kVideoBGRA = 13, |
544 kVideoUnknown = 99 | 544 kVideoUnknown = 99 |
545 }; | 545 }; |
546 | 546 |
547 // Video codec | 547 // Video codec |
548 enum { kConfigParameterSize = 128}; | 548 enum { kConfigParameterSize = 128}; |
549 enum { kPayloadNameSize = 32}; | 549 enum { kPayloadNameSize = 32}; |
550 enum { kMaxSimulcastStreams = 4}; | 550 enum { kMaxSimulcastStreams = 4}; |
551 enum { kMaxSpatialLayers = 5}; | |
552 enum { kMaxTemporalStreams = 4}; | 551 enum { kMaxTemporalStreams = 4}; |
553 | 552 |
554 enum VideoCodecComplexity | 553 enum VideoCodecComplexity |
555 { | 554 { |
556 kComplexityNormal = 0, | 555 kComplexityNormal = 0, |
557 kComplexityHigh = 1, | 556 kComplexityHigh = 1, |
558 kComplexityHigher = 2, | 557 kComplexityHigher = 2, |
559 kComplexityMax = 3 | 558 kComplexityMax = 3 |
560 }; | 559 }; |
561 | 560 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 targetBitrate == other.targetBitrate && | 670 targetBitrate == other.targetBitrate && |
672 minBitrate == other.minBitrate && | 671 minBitrate == other.minBitrate && |
673 qpMax == other.qpMax; | 672 qpMax == other.qpMax; |
674 } | 673 } |
675 | 674 |
676 bool operator!=(const SimulcastStream& other) const { | 675 bool operator!=(const SimulcastStream& other) const { |
677 return !(*this == other); | 676 return !(*this == other); |
678 } | 677 } |
679 }; | 678 }; |
680 | 679 |
681 struct SpatialLayer { | |
682 int scaling_factor_num; | |
683 int scaling_factor_den; | |
684 int target_bitrate_bps; | |
685 // TODO(ivica): Add max_quantizer and min_quantizer? | |
686 }; | |
687 | |
688 enum VideoCodecMode { | 680 enum VideoCodecMode { |
689 kRealtimeVideo, | 681 kRealtimeVideo, |
690 kScreensharing | 682 kScreensharing |
691 }; | 683 }; |
692 | 684 |
693 // Common video codec properties | 685 // Common video codec properties |
694 struct VideoCodec { | 686 struct VideoCodec { |
695 VideoCodecType codecType; | 687 VideoCodecType codecType; |
696 char plName[kPayloadNameSize]; | 688 char plName[kPayloadNameSize]; |
697 unsigned char plType; | 689 unsigned char plType; |
698 | 690 |
699 unsigned short width; | 691 unsigned short width; |
700 unsigned short height; | 692 unsigned short height; |
701 | 693 |
702 unsigned int startBitrate; // kilobits/sec. | 694 unsigned int startBitrate; // kilobits/sec. |
703 unsigned int maxBitrate; // kilobits/sec. | 695 unsigned int maxBitrate; // kilobits/sec. |
704 unsigned int minBitrate; // kilobits/sec. | 696 unsigned int minBitrate; // kilobits/sec. |
705 unsigned int targetBitrate; // kilobits/sec. | 697 unsigned int targetBitrate; // kilobits/sec. |
706 | 698 |
707 unsigned char maxFramerate; | 699 unsigned char maxFramerate; |
708 | 700 |
709 VideoCodecUnion codecSpecific; | 701 VideoCodecUnion codecSpecific; |
710 | 702 |
711 unsigned int qpMax; | 703 unsigned int qpMax; |
712 unsigned char numberOfSimulcastStreams; | 704 unsigned char numberOfSimulcastStreams; |
713 SimulcastStream simulcastStream[kMaxSimulcastStreams]; | 705 SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
714 SpatialLayer spatialLayers[kMaxSpatialLayers]; | |
715 | 706 |
716 VideoCodecMode mode; | 707 VideoCodecMode mode; |
717 | 708 |
718 // When using an external encoder/decoder this allows to pass | 709 // When using an external encoder/decoder this allows to pass |
719 // extra options without requiring webrtc to be aware of them. | 710 // extra options without requiring webrtc to be aware of them. |
720 Config* extra_options; | 711 Config* extra_options; |
721 | 712 |
722 bool operator==(const VideoCodec& other) const { | 713 bool operator==(const VideoCodec& other) const { |
723 bool ret = codecType == other.codecType && | 714 bool ret = codecType == other.codecType && |
724 (STR_CASE_CMP(plName, other.plName) == 0) && | 715 (STR_CASE_CMP(plName, other.plName) == 0) && |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 uint32_t ssrc) = 0; | 894 uint32_t ssrc) = 0; |
904 }; | 895 }; |
905 | 896 |
906 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size | 897 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size |
907 // RTCP mode is described by RFC 5506. | 898 // RTCP mode is described by RFC 5506. |
908 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 899 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
909 | 900 |
910 } // namespace webrtc | 901 } // namespace webrtc |
911 | 902 |
912 #endif // WEBRTC_COMMON_TYPES_H_ | 903 #endif // WEBRTC_COMMON_TYPES_H_ |
OLD | NEW |