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 |
11 #ifndef WEBRTC_COMMON_TYPES_H_ | 11 #ifndef WEBRTC_COMMON_TYPES_H_ |
12 #define WEBRTC_COMMON_TYPES_H_ | 12 #define WEBRTC_COMMON_TYPES_H_ |
13 | 13 |
14 #include <stddef.h> | 14 #include <stddef.h> |
15 #include <string.h> | 15 #include <string.h> |
16 | 16 |
17 #include <ostream> | 17 #include <ostream> |
18 #include <string> | 18 #include <string> |
19 #include <vector> | 19 #include <vector> |
20 | 20 |
21 #include "webrtc/api/video/video_content_type.h" | 21 #include "webrtc/api/video/video_content_type.h" |
22 #include "webrtc/api/video/video_rotation.h" | 22 #include "webrtc/api/video/video_rotation.h" |
23 #include "webrtc/api/video/video_timing.h" | |
23 #include "webrtc/base/array_view.h" | 24 #include "webrtc/base/array_view.h" |
24 #include "webrtc/base/checks.h" | 25 #include "webrtc/base/checks.h" |
25 #include "webrtc/base/optional.h" | 26 #include "webrtc/base/optional.h" |
26 #include "webrtc/typedefs.h" | 27 #include "webrtc/typedefs.h" |
27 | 28 |
28 #if defined(_MSC_VER) | 29 #if defined(_MSC_VER) |
29 // Disable "new behavior: elements of array will be default initialized" | 30 // Disable "new behavior: elements of array will be default initialized" |
30 // warning. Affects OverUseDetectorOptions. | 31 // warning. Affects OverUseDetectorOptions. |
31 #pragma warning(disable : 4351) | 32 #pragma warning(disable : 4351) |
32 #endif | 33 #endif |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
581 uint32_t maxFramerate; | 582 uint32_t maxFramerate; |
582 | 583 |
583 unsigned int qpMax; | 584 unsigned int qpMax; |
584 unsigned char numberOfSimulcastStreams; | 585 unsigned char numberOfSimulcastStreams; |
585 SimulcastStream simulcastStream[kMaxSimulcastStreams]; | 586 SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
586 SpatialLayer spatialLayers[kMaxSpatialLayers]; | 587 SpatialLayer spatialLayers[kMaxSpatialLayers]; |
587 | 588 |
588 VideoCodecMode mode; | 589 VideoCodecMode mode; |
589 bool expect_encode_from_texture; | 590 bool expect_encode_from_texture; |
590 | 591 |
592 // Timing frames configuration. There is delay of delay_ms between two | |
593 // consequent timing frames, excluding outliers. Frame is always made a | |
594 // timing frame if it's at least outlier_ratio in percent of "ideal" average | |
595 // frame given bitrate and framerate, i.e. if it's bigger than | |
596 // |outlier_ratio / 100.0 * bitrate_bps / fps| in bits. | |
holmer
2017/06/19 07:48:26
Can you comment on why we have logic like this? Be
ilnik
2017/06/19 08:41:51
Done.
| |
597 struct TimingFrameTriggerThresholds { | |
598 int64_t delay_ms; | |
599 uint16_t outlier_ratio_percent; | |
600 } timingFrameTriggerThresholds; | |
holmer
2017/06/19 07:48:26
timing_frame_thresholds
ilnik
2017/06/19 08:41:51
Done.
| |
601 | |
591 bool operator==(const VideoCodec& other) const = delete; | 602 bool operator==(const VideoCodec& other) const = delete; |
592 bool operator!=(const VideoCodec& other) const = delete; | 603 bool operator!=(const VideoCodec& other) const = delete; |
593 | 604 |
594 // Accessors for codec specific information. | 605 // Accessors for codec specific information. |
595 // There is a const version of each that returns a reference, | 606 // There is a const version of each that returns a reference, |
596 // and a non-const version that returns a pointer, in order | 607 // and a non-const version that returns a pointer, in order |
597 // to allow modification of the parameters. | 608 // to allow modification of the parameters. |
598 VideoCodecVP8* VP8(); | 609 VideoCodecVP8* VP8(); |
599 const VideoCodecVP8& VP8() const; | 610 const VideoCodecVP8& VP8() const; |
600 VideoCodecVP9* VP9(); | 611 VideoCodecVP9* VP9(); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
756 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ | 767 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ |
757 // ts_126114v120700p.pdf | 768 // ts_126114v120700p.pdf |
758 bool hasVideoRotation; | 769 bool hasVideoRotation; |
759 VideoRotation videoRotation; | 770 VideoRotation videoRotation; |
760 | 771 |
761 // TODO(ilnik): Refactor this and one above to be rtc::Optional() and remove | 772 // TODO(ilnik): Refactor this and one above to be rtc::Optional() and remove |
762 // a corresponding bool flag. | 773 // a corresponding bool flag. |
763 bool hasVideoContentType; | 774 bool hasVideoContentType; |
764 VideoContentType videoContentType; | 775 VideoContentType videoContentType; |
765 | 776 |
777 bool hasVideoTiming; | |
778 VideoTiming videoTiming; | |
holmer
2017/06/19 07:48:26
No camelCase. I see why you used it, but since we
ilnik
2017/06/19 08:41:51
Done.
| |
779 | |
766 PlayoutDelay playout_delay = {-1, -1}; | 780 PlayoutDelay playout_delay = {-1, -1}; |
767 | 781 |
768 // For identification of a stream when ssrc is not signaled. See | 782 // For identification of a stream when ssrc is not signaled. See |
769 // https://tools.ietf.org/html/draft-ietf-avtext-rid-09 | 783 // https://tools.ietf.org/html/draft-ietf-avtext-rid-09 |
770 // TODO(danilchap): Update url from draft to release version. | 784 // TODO(danilchap): Update url from draft to release version. |
771 StreamId stream_id; | 785 StreamId stream_id; |
772 StreamId repaired_stream_id; | 786 StreamId repaired_stream_id; |
773 }; | 787 }; |
774 | 788 |
775 struct RTPHeader { | 789 struct RTPHeader { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
888 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 902 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
889 | 903 |
890 enum NetworkState { | 904 enum NetworkState { |
891 kNetworkUp, | 905 kNetworkUp, |
892 kNetworkDown, | 906 kNetworkDown, |
893 }; | 907 }; |
894 | 908 |
895 } // namespace webrtc | 909 } // namespace webrtc |
896 | 910 |
897 #endif // WEBRTC_COMMON_TYPES_H_ | 911 #endif // WEBRTC_COMMON_TYPES_H_ |
OLD | NEW |