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

Side by Side Diff: webrtc/common_types.h

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Implement Holmer@ comments Created 3 years, 6 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 | « webrtc/api/video/video_timing.h ('k') | webrtc/common_types.cc » ('j') | no next file with comments »
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
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
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. This way, timing
597 // frames will not be sent too often usually. Yet large frames will always
598 // have timing information for debug purposes because they are more likely to
599 // cause extra delays.
600 struct TimingFrameTriggerThresholds {
601 int64_t delay_ms;
602 uint16_t outlier_ratio_percent;
603 } timing_frame_thresholds;
604
591 bool operator==(const VideoCodec& other) const = delete; 605 bool operator==(const VideoCodec& other) const = delete;
592 bool operator!=(const VideoCodec& other) const = delete; 606 bool operator!=(const VideoCodec& other) const = delete;
593 607
594 // Accessors for codec specific information. 608 // Accessors for codec specific information.
595 // There is a const version of each that returns a reference, 609 // There is a const version of each that returns a reference,
596 // and a non-const version that returns a pointer, in order 610 // and a non-const version that returns a pointer, in order
597 // to allow modification of the parameters. 611 // to allow modification of the parameters.
598 VideoCodecVP8* VP8(); 612 VideoCodecVP8* VP8();
599 const VideoCodecVP8& VP8() const; 613 const VideoCodecVP8& VP8() const;
600 VideoCodecVP9* VP9(); 614 VideoCodecVP9* VP9();
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ 770 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/
757 // ts_126114v120700p.pdf 771 // ts_126114v120700p.pdf
758 bool hasVideoRotation; 772 bool hasVideoRotation;
759 VideoRotation videoRotation; 773 VideoRotation videoRotation;
760 774
761 // TODO(ilnik): Refactor this and one above to be rtc::Optional() and remove 775 // TODO(ilnik): Refactor this and one above to be rtc::Optional() and remove
762 // a corresponding bool flag. 776 // a corresponding bool flag.
763 bool hasVideoContentType; 777 bool hasVideoContentType;
764 VideoContentType videoContentType; 778 VideoContentType videoContentType;
765 779
780 bool has_video_timing;
781 VideoTiming video_timing;
782
766 PlayoutDelay playout_delay = {-1, -1}; 783 PlayoutDelay playout_delay = {-1, -1};
767 784
768 // For identification of a stream when ssrc is not signaled. See 785 // For identification of a stream when ssrc is not signaled. See
769 // https://tools.ietf.org/html/draft-ietf-avtext-rid-09 786 // https://tools.ietf.org/html/draft-ietf-avtext-rid-09
770 // TODO(danilchap): Update url from draft to release version. 787 // TODO(danilchap): Update url from draft to release version.
771 StreamId stream_id; 788 StreamId stream_id;
772 StreamId repaired_stream_id; 789 StreamId repaired_stream_id;
773 }; 790 };
774 791
775 struct RTPHeader { 792 struct RTPHeader {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 enum class RtcpMode { kOff, kCompound, kReducedSize }; 905 enum class RtcpMode { kOff, kCompound, kReducedSize };
889 906
890 enum NetworkState { 907 enum NetworkState {
891 kNetworkUp, 908 kNetworkUp,
892 kNetworkDown, 909 kNetworkDown,
893 }; 910 };
894 911
895 } // namespace webrtc 912 } // namespace webrtc
896 913
897 #endif // WEBRTC_COMMON_TYPES_H_ 914 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « webrtc/api/video/video_timing.h ('k') | webrtc/common_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698