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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 namespace webrtc { | 31 namespace webrtc { |
32 | 32 |
33 struct RTPAudioHeader { | 33 struct RTPAudioHeader { |
34 uint8_t numEnergy; // number of valid entries in arrOfEnergy | 34 uint8_t numEnergy; // number of valid entries in arrOfEnergy |
35 uint8_t arrOfEnergy[kRtpCsrcSize]; // one energy byte (0-9) per channel | 35 uint8_t arrOfEnergy[kRtpCsrcSize]; // one energy byte (0-9) per channel |
36 bool isCNG; // is this CNG | 36 bool isCNG; // is this CNG |
37 size_t channel; // number of channels 2 = stereo | 37 size_t channel; // number of channels 2 = stereo |
38 }; | 38 }; |
39 | 39 |
| 40 enum RtpVideoCodecTypes { |
| 41 kRtpVideoNone, |
| 42 kRtpVideoGeneric, |
| 43 kRtpVideoStereo, |
| 44 kRtpVideoVp8, |
| 45 kRtpVideoVp9, |
| 46 kRtpVideoH264 |
| 47 }; |
| 48 |
| 49 struct RTPVideoStereoInfo { |
| 50 RtpVideoCodecTypes stereoCodecType; |
| 51 uint8_t frameIndex; |
| 52 uint8_t frameCount; |
| 53 uint64_t pictureIndex; |
| 54 }; |
| 55 |
40 union RTPVideoTypeHeader { | 56 union RTPVideoTypeHeader { |
41 RTPVideoHeaderVP8 VP8; | 57 RTPVideoHeaderVP8 VP8; |
42 RTPVideoHeaderVP9 VP9; | 58 RTPVideoHeaderVP9 VP9; |
43 RTPVideoHeaderH264 H264; | 59 RTPVideoHeaderH264 H264; |
44 }; | 60 }; |
45 | |
46 enum RtpVideoCodecTypes { | |
47 kRtpVideoNone, | |
48 kRtpVideoGeneric, | |
49 kRtpVideoVp8, | |
50 kRtpVideoVp9, | |
51 kRtpVideoH264 | |
52 }; | |
53 // Since RTPVideoHeader is used as a member of a union, it can't have a | 61 // Since RTPVideoHeader is used as a member of a union, it can't have a |
54 // non-trivial default constructor. | 62 // non-trivial default constructor. |
55 struct RTPVideoHeader { | 63 struct RTPVideoHeader { |
56 uint16_t width; // size | 64 uint16_t width; // size |
57 uint16_t height; | 65 uint16_t height; |
58 VideoRotation rotation; | 66 VideoRotation rotation; |
59 | 67 |
60 PlayoutDelay playout_delay; | 68 PlayoutDelay playout_delay; |
61 | 69 |
62 VideoContentType content_type; | 70 VideoContentType content_type; |
63 | 71 |
64 VideoSendTiming video_timing; | 72 VideoSendTiming video_timing; |
65 | 73 |
66 bool is_first_packet_in_frame; | 74 bool is_first_packet_in_frame; |
67 uint8_t simulcastIdx; // Index if the simulcast encoder creating | 75 uint8_t simulcastIdx; // Index if the simulcast encoder creating |
68 // this frame, 0 if not using simulcast. | 76 // this frame, 0 if not using simulcast. |
69 RtpVideoCodecTypes codec; | 77 RtpVideoCodecTypes codec; |
70 RTPVideoTypeHeader codecHeader; | 78 RTPVideoTypeHeader codecHeader; |
| 79 RTPVideoStereoInfo stereoInfo; |
71 }; | 80 }; |
| 81 |
72 union RTPTypeHeader { | 82 union RTPTypeHeader { |
73 RTPAudioHeader Audio; | 83 RTPAudioHeader Audio; |
74 RTPVideoHeader Video; | 84 RTPVideoHeader Video; |
75 }; | 85 }; |
76 | 86 |
77 struct WebRtcRTPHeader { | 87 struct WebRtcRTPHeader { |
78 RTPHeader header; | 88 RTPHeader header; |
79 FrameType frameType; | 89 FrameType frameType; |
80 RTPTypeHeader type; | 90 RTPTypeHeader type; |
81 // NTP time of the capture time in local timebase in milliseconds. | 91 // NTP time of the capture time in local timebase in milliseconds. |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 static constexpr int kNotAProbe = -1; | 648 static constexpr int kNotAProbe = -1; |
639 int send_bitrate_bps = -1; | 649 int send_bitrate_bps = -1; |
640 int probe_cluster_id = kNotAProbe; | 650 int probe_cluster_id = kNotAProbe; |
641 int probe_cluster_min_probes = -1; | 651 int probe_cluster_min_probes = -1; |
642 int probe_cluster_min_bytes = -1; | 652 int probe_cluster_min_bytes = -1; |
643 }; | 653 }; |
644 | 654 |
645 } // namespace webrtc | 655 } // namespace webrtc |
646 | 656 |
647 #endif // MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ | 657 #endif // MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ |
OLD | NEW |