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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 }; | 51 }; |
52 // Since RTPVideoHeader is used as a member of a union, it can't have a | 52 // Since RTPVideoHeader is used as a member of a union, it can't have a |
53 // non-trivial default constructor. | 53 // non-trivial default constructor. |
54 struct RTPVideoHeader { | 54 struct RTPVideoHeader { |
55 uint16_t width; // size | 55 uint16_t width; // size |
56 uint16_t height; | 56 uint16_t height; |
57 VideoRotation rotation; | 57 VideoRotation rotation; |
58 | 58 |
59 PlayoutDelay playout_delay; | 59 PlayoutDelay playout_delay; |
60 | 60 |
61 VideoContentType content_type; | |
62 | |
63 union { | 61 union { |
64 bool is_first_packet_in_frame; | 62 bool is_first_packet_in_frame; |
65 RTC_DEPRECATED bool isFirstPacket; // first packet in frame | 63 RTC_DEPRECATED bool isFirstPacket; // first packet in frame |
66 }; | 64 }; |
67 uint8_t simulcastIdx; // Index if the simulcast encoder creating | 65 uint8_t simulcastIdx; // Index if the simulcast encoder creating |
68 // this frame, 0 if not using simulcast. | 66 // this frame, 0 if not using simulcast. |
69 RtpVideoCodecTypes codec; | 67 RtpVideoCodecTypes codec; |
70 RTPVideoTypeHeader codecHeader; | 68 RTPVideoTypeHeader codecHeader; |
71 }; | 69 }; |
72 union RTPTypeHeader { | 70 union RTPTypeHeader { |
73 RTPAudioHeader Audio; | 71 RTPAudioHeader Audio; |
74 RTPVideoHeader Video; | 72 RTPVideoHeader Video; |
75 }; | 73 }; |
76 | 74 |
77 struct WebRtcRTPHeader { | 75 struct WebRtcRTPHeader { |
78 RTPHeader header; | 76 RTPHeader header; |
79 FrameType frameType; | 77 FrameType frameType; |
80 RTPTypeHeader type; | 78 RTPTypeHeader type; |
81 // NTP time of the capture time in local timebase in milliseconds. | 79 // NTP time of the capture time in local timebase in milliseconds. |
82 int64_t ntp_time_ms; | 80 int64_t ntp_time_ms; |
83 }; | 81 }; |
84 | 82 |
85 class RTPFragmentationHeader { | 83 class RTPFragmentationHeader { |
86 public: | 84 public: |
87 RTPFragmentationHeader() | 85 RTPFragmentationHeader() |
88 : fragmentationVectorSize(0), | 86 : fragmentationVectorSize(0), |
89 fragmentationOffset(NULL), | 87 fragmentationOffset(NULL), |
90 fragmentationLength(NULL), | 88 fragmentationLength(NULL), |
91 fragmentationTimeDiff(NULL), | 89 fragmentationTimeDiff(NULL), |
92 fragmentationPlType(NULL) {} | 90 fragmentationPlType(NULL) {}; |
93 | 91 |
94 ~RTPFragmentationHeader() { | 92 ~RTPFragmentationHeader() { |
95 delete[] fragmentationOffset; | 93 delete[] fragmentationOffset; |
96 delete[] fragmentationLength; | 94 delete[] fragmentationLength; |
97 delete[] fragmentationTimeDiff; | 95 delete[] fragmentationTimeDiff; |
98 delete[] fragmentationPlType; | 96 delete[] fragmentationPlType; |
99 } | 97 } |
100 | 98 |
101 void CopyFrom(const RTPFragmentationHeader& src) { | 99 void CopyFrom(const RTPFragmentationHeader& src) { |
102 if (this == &src) { | 100 if (this == &src) { |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 static constexpr int kNotAProbe = -1; | 568 static constexpr int kNotAProbe = -1; |
571 int send_bitrate_bps = -1; | 569 int send_bitrate_bps = -1; |
572 int probe_cluster_id = kNotAProbe; | 570 int probe_cluster_id = kNotAProbe; |
573 int probe_cluster_min_probes = -1; | 571 int probe_cluster_min_probes = -1; |
574 int probe_cluster_min_bytes = -1; | 572 int probe_cluster_min_bytes = -1; |
575 }; | 573 }; |
576 | 574 |
577 } // namespace webrtc | 575 } // namespace webrtc |
578 | 576 |
579 #endif // WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ | 577 #endif // WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ |
OLD | NEW |