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