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}; | |
551 enum { kMaxTemporalStreams = 4}; | 552 enum { kMaxTemporalStreams = 4}; |
552 | 553 |
553 enum VideoCodecComplexity | 554 enum VideoCodecComplexity |
554 { | 555 { |
555 kComplexityNormal = 0, | 556 kComplexityNormal = 0, |
556 kComplexityHigh = 1, | 557 kComplexityHigh = 1, |
557 kComplexityHigher = 2, | 558 kComplexityHigher = 2, |
558 kComplexityMax = 3 | 559 kComplexityMax = 3 |
559 }; | 560 }; |
560 | 561 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
670 targetBitrate == other.targetBitrate && | 671 targetBitrate == other.targetBitrate && |
671 minBitrate == other.minBitrate && | 672 minBitrate == other.minBitrate && |
672 qpMax == other.qpMax; | 673 qpMax == other.qpMax; |
673 } | 674 } |
674 | 675 |
675 bool operator!=(const SimulcastStream& other) const { | 676 bool operator!=(const SimulcastStream& other) const { |
676 return !(*this == other); | 677 return !(*this == other); |
677 } | 678 } |
678 }; | 679 }; |
679 | 680 |
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 | |
680 enum VideoCodecMode { | 688 enum VideoCodecMode { |
681 kRealtimeVideo, | 689 kRealtimeVideo, |
682 kScreensharing | 690 kScreensharing |
683 }; | 691 }; |
684 | 692 |
685 // Common video codec properties | 693 // Common video codec properties |
686 struct VideoCodec { | 694 struct VideoCodec { |
687 VideoCodecType codecType; | 695 VideoCodecType codecType; |
688 char plName[kPayloadNameSize]; | 696 char plName[kPayloadNameSize]; |
689 unsigned char plType; | 697 unsigned char plType; |
690 | 698 |
691 unsigned short width; | 699 unsigned short width; |
692 unsigned short height; | 700 unsigned short height; |
693 | 701 |
694 unsigned int startBitrate; // kilobits/sec. | 702 unsigned int startBitrate; // kilobits/sec. |
695 unsigned int maxBitrate; // kilobits/sec. | 703 unsigned int maxBitrate; // kilobits/sec. |
696 unsigned int minBitrate; // kilobits/sec. | 704 unsigned int minBitrate; // kilobits/sec. |
697 unsigned int targetBitrate; // kilobits/sec. | 705 unsigned int targetBitrate; // kilobits/sec. |
698 | 706 |
699 unsigned char maxFramerate; | 707 unsigned char maxFramerate; |
700 | 708 |
701 VideoCodecUnion codecSpecific; | 709 VideoCodecUnion codecSpecific; |
702 | 710 |
703 unsigned int qpMax; | 711 unsigned int qpMax; |
704 unsigned char numberOfSimulcastStreams; | 712 unsigned char numberOfSimulcastStreams; |
705 SimulcastStream simulcastStream[kMaxSimulcastStreams]; | 713 SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
714 SpatialLayer spatialLayers[kMaxSpatialLayers]; | |
mflodman
2015/10/06 11:27:27
I know this is following the previous style, but I
ivica
2015/10/06 13:37:24
It turns out there is a bunch of memcpy calls that
mflodman
2015/10/07 11:23:43
Then let's keep it for now and we'll take care of
| |
706 | 715 |
707 VideoCodecMode mode; | 716 VideoCodecMode mode; |
708 | 717 |
709 // When using an external encoder/decoder this allows to pass | 718 // When using an external encoder/decoder this allows to pass |
710 // extra options without requiring webrtc to be aware of them. | 719 // extra options without requiring webrtc to be aware of them. |
711 Config* extra_options; | 720 Config* extra_options; |
712 | 721 |
713 bool operator==(const VideoCodec& other) const { | 722 bool operator==(const VideoCodec& other) const { |
714 bool ret = codecType == other.codecType && | 723 bool ret = codecType == other.codecType && |
715 (STR_CASE_CMP(plName, other.plName) == 0) && | 724 (STR_CASE_CMP(plName, other.plName) == 0) && |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
894 uint32_t ssrc) = 0; | 903 uint32_t ssrc) = 0; |
895 }; | 904 }; |
896 | 905 |
897 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size | 906 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size |
898 // RTCP mode is described by RFC 5506. | 907 // RTCP mode is described by RFC 5506. |
899 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 908 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
900 | 909 |
901 } // namespace webrtc | 910 } // namespace webrtc |
902 | 911 |
903 #endif // WEBRTC_COMMON_TYPES_H_ | 912 #endif // WEBRTC_COMMON_TYPES_H_ |
OLD | NEW |