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

Side by Side Diff: webrtc/common_types.h

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Fix uninitialized variables memcheck errors 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
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.
sprang_webrtc 2017/05/31 11:12:54 I think you can expand this comment; it's not obvi
ilnik 2017/05/31 15:17:45 Done.
593 int64_t timingFramesDelayMs;
594 size_t minFrameSizeToForceTimingFrameBytes;
sprang_webrtc 2017/05/31 11:12:54 Thinking some more on this, not sure bytes is the
sprang_webrtc 2017/05/31 11:12:55 Maybe we can make these a named struct, since they
ilnik 2017/05/31 15:17:45 Nice idea. Done.
ilnik 2017/05/31 15:17:45 Done.
595
591 bool operator==(const VideoCodec& other) const = delete; 596 bool operator==(const VideoCodec& other) const = delete;
592 bool operator!=(const VideoCodec& other) const = delete; 597 bool operator!=(const VideoCodec& other) const = delete;
593 598
594 // Accessors for codec specific information. 599 // Accessors for codec specific information.
595 // There is a const version of each that returns a reference, 600 // There is a const version of each that returns a reference,
596 // and a non-const version that returns a pointer, in order 601 // and a non-const version that returns a pointer, in order
597 // to allow modification of the parameters. 602 // to allow modification of the parameters.
598 VideoCodecVP8* VP8(); 603 VideoCodecVP8* VP8();
599 const VideoCodecVP8& VP8() const; 604 const VideoCodecVP8& VP8() const;
600 VideoCodecVP9* VP9(); 605 VideoCodecVP9* VP9();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 bool voiceActivity; 755 bool voiceActivity;
751 uint8_t audioLevel; 756 uint8_t audioLevel;
752 757
753 // For Coordination of Video Orientation. See 758 // For Coordination of Video Orientation. See
754 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ 759 // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/
755 // ts_126114v120700p.pdf 760 // ts_126114v120700p.pdf
756 bool hasVideoRotation; 761 bool hasVideoRotation;
757 VideoRotation videoRotation; 762 VideoRotation videoRotation;
758 763
759 // TODO(ilnik): Refactor this and one above to be rtc::Optional() and remove 764 // TODO(ilnik): Refactor this and one above to be rtc::Optional() and remove
760 // a corresponding bool flag. 765 // a corresponding bool flag.
sprang_webrtc 2017/05/31 11:12:54 So we now have three of these bool + value. Time t
ilnik 2017/05/31 15:17:45 Maybe, there are some complications about that. Wi
761 bool hasVideoContentType; 766 bool hasVideoContentType;
762 VideoContentType videoContentType; 767 VideoContentType videoContentType;
763 768
769 bool hasVideoTiming;
770 VideoTiming videoTiming;
771
764 PlayoutDelay playout_delay = {-1, -1}; 772 PlayoutDelay playout_delay = {-1, -1};
765 773
766 // For identification of a stream when ssrc is not signaled. See 774 // For identification of a stream when ssrc is not signaled. See
767 // https://tools.ietf.org/html/draft-ietf-avtext-rid-09 775 // https://tools.ietf.org/html/draft-ietf-avtext-rid-09
768 // TODO(danilchap): Update url from draft to release version. 776 // TODO(danilchap): Update url from draft to release version.
769 StreamId stream_id; 777 StreamId stream_id;
770 StreamId repaired_stream_id; 778 StreamId repaired_stream_id;
771 }; 779 };
772 780
773 struct RTPHeader { 781 struct RTPHeader {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 enum class RtcpMode { kOff, kCompound, kReducedSize }; 894 enum class RtcpMode { kOff, kCompound, kReducedSize };
887 895
888 enum NetworkState { 896 enum NetworkState {
889 kNetworkUp, 897 kNetworkUp,
890 kNetworkDown, 898 kNetworkDown,
891 }; 899 };
892 900
893 } // namespace webrtc 901 } // namespace webrtc
894 902
895 #endif // WEBRTC_COMMON_TYPES_H_ 903 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698