Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: webrtc/common_types.h

Issue 1353263005: Adding support for simulcast and spatial layers into VideoQualityTest (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: whoops, compile errors Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/config.h » ('j') | webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 kVideoNV12 = 11, 552 kVideoNV12 = 11,
553 kVideoNV21 = 12, 553 kVideoNV21 = 12,
554 kVideoBGRA = 13, 554 kVideoBGRA = 13,
555 kVideoUnknown = 99 555 kVideoUnknown = 99
556 }; 556 };
557 557
558 // Video codec 558 // Video codec
559 enum { kConfigParameterSize = 128}; 559 enum { kConfigParameterSize = 128};
560 enum { kPayloadNameSize = 32}; 560 enum { kPayloadNameSize = 32};
561 enum { kMaxSimulcastStreams = 4}; 561 enum { kMaxSimulcastStreams = 4};
562 enum { kMaxSpatialLayers = 5};
562 enum { kMaxTemporalStreams = 4}; 563 enum { kMaxTemporalStreams = 4};
sprang_webrtc 2015/09/29 14:19:33 Can we make these all static const int? These don'
pbos-webrtc 2015/09/29 14:38:46 I think that'll potentially cause linker errors (u
ivica 2015/09/29 15:14:51 Probably better just to keep them as compile-time
563 564
564 enum VideoCodecComplexity 565 enum VideoCodecComplexity
565 { 566 {
566 kComplexityNormal = 0, 567 kComplexityNormal = 0,
567 kComplexityHigh = 1, 568 kComplexityHigh = 1,
568 kComplexityHigher = 2, 569 kComplexityHigher = 2,
569 kComplexityMax = 3 570 kComplexityMax = 3
570 }; 571 };
571 572
572 enum VideoCodecProfile 573 enum VideoCodecProfile
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 targetBitrate == other.targetBitrate && 682 targetBitrate == other.targetBitrate &&
682 minBitrate == other.minBitrate && 683 minBitrate == other.minBitrate &&
683 qpMax == other.qpMax; 684 qpMax == other.qpMax;
684 } 685 }
685 686
686 bool operator!=(const SimulcastStream& other) const { 687 bool operator!=(const SimulcastStream& other) const {
687 return !(*this == other); 688 return !(*this == other);
688 } 689 }
689 }; 690 };
690 691
692 struct SpatialLayer {
693 int scaling_factor_num;
694 int scaling_factor_den;
695 int target_bitrate_bps;
696 // TODO(ivica): Add max_quantizer and min_quantizer?
697 // int min_quantizer;
698 // int max_quantizer;
sprang_webrtc 2015/09/29 14:19:33 If you don't include them in this CL, but you thin
ivica 2015/09/29 15:14:51 Removed commented out code.
699 };
700
691 enum VideoCodecMode { 701 enum VideoCodecMode {
692 kRealtimeVideo, 702 kRealtimeVideo,
693 kScreensharing 703 kScreensharing
694 }; 704 };
695 705
696 // Common video codec properties 706 // Common video codec properties
697 struct VideoCodec { 707 struct VideoCodec {
698 VideoCodecType codecType; 708 VideoCodecType codecType;
699 char plName[kPayloadNameSize]; 709 char plName[kPayloadNameSize];
700 unsigned char plType; 710 unsigned char plType;
701 711
702 unsigned short width; 712 unsigned short width;
703 unsigned short height; 713 unsigned short height;
704 714
705 unsigned int startBitrate; // kilobits/sec. 715 unsigned int startBitrate; // kilobits/sec.
706 unsigned int maxBitrate; // kilobits/sec. 716 unsigned int maxBitrate; // kilobits/sec.
707 unsigned int minBitrate; // kilobits/sec. 717 unsigned int minBitrate; // kilobits/sec.
708 unsigned int targetBitrate; // kilobits/sec. 718 unsigned int targetBitrate; // kilobits/sec.
709 719
710 unsigned char maxFramerate; 720 unsigned char maxFramerate;
711 721
712 VideoCodecUnion codecSpecific; 722 VideoCodecUnion codecSpecific;
713 723
714 unsigned int qpMax; 724 unsigned int qpMax;
715 unsigned char numberOfSimulcastStreams; 725 unsigned char numberOfSimulcastStreams;
716 SimulcastStream simulcastStream[kMaxSimulcastStreams]; 726 SimulcastStream simulcastStream[kMaxSimulcastStreams];
727 SpatialLayer spatialLayers[kMaxSpatialLayers];
717 728
718 VideoCodecMode mode; 729 VideoCodecMode mode;
719 730
720 // When using an external encoder/decoder this allows to pass 731 // When using an external encoder/decoder this allows to pass
721 // extra options without requiring webrtc to be aware of them. 732 // extra options without requiring webrtc to be aware of them.
722 Config* extra_options; 733 Config* extra_options;
723 734
724 bool operator==(const VideoCodec& other) const { 735 bool operator==(const VideoCodec& other) const {
725 bool ret = codecType == other.codecType && 736 bool ret = codecType == other.codecType &&
726 (STR_CASE_CMP(plName, other.plName) == 0) && 737 (STR_CASE_CMP(plName, other.plName) == 0) &&
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 class StreamDataCountersCallback { 911 class StreamDataCountersCallback {
901 public: 912 public:
902 virtual ~StreamDataCountersCallback() {} 913 virtual ~StreamDataCountersCallback() {}
903 914
904 virtual void DataCountersUpdated(const StreamDataCounters& counters, 915 virtual void DataCountersUpdated(const StreamDataCounters& counters,
905 uint32_t ssrc) = 0; 916 uint32_t ssrc) = 0;
906 }; 917 };
907 } // namespace webrtc 918 } // namespace webrtc
908 919
909 #endif // WEBRTC_COMMON_TYPES_H_ 920 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/config.h » ('j') | webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698