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 17 matching lines...) Expand all Loading... | |
28 class TransportFeedback; | 28 class TransportFeedback; |
29 } | 29 } |
30 | 30 |
31 const int kVideoPayloadTypeFrequency = 90000; | 31 const int kVideoPayloadTypeFrequency = 90000; |
32 | 32 |
33 // Minimum RTP header size in bytes. | 33 // Minimum RTP header size in bytes. |
34 const uint8_t kRtpHeaderSize = 12; | 34 const uint8_t kRtpHeaderSize = 12; |
35 | 35 |
36 struct AudioPayload { | 36 struct AudioPayload { |
37 uint32_t frequency; | 37 uint32_t frequency; |
38 uint8_t channels; | 38 size_t channels; |
the sun
2016/01/07 12:27:59
On 64-bit machines member alignment rules will cau
Peter Kasting
2016/01/07 13:14:41
It looks like other places (e.g. the param list of
the sun
2016/01/07 13:21:06
I don't see why the order of parameters necessaril
Peter Kasting
2016/01/07 22:28:39
I think that makes sense, but it's a bit of refact
| |
39 uint32_t rate; | 39 uint32_t rate; |
40 }; | 40 }; |
41 | 41 |
42 struct VideoPayload { | 42 struct VideoPayload { |
43 RtpVideoCodecTypes videoCodecType; | 43 RtpVideoCodecTypes videoCodecType; |
44 uint32_t maxRate; | 44 uint32_t maxRate; |
45 }; | 45 }; |
46 | 46 |
47 union PayloadUnion { | 47 union PayloadUnion { |
48 AudioPayload Audio; | 48 AudioPayload Audio; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 virtual ~RtpFeedback() {} | 203 virtual ~RtpFeedback() {} |
204 | 204 |
205 // Receiving payload change or SSRC change. (return success!) | 205 // Receiving payload change or SSRC change. (return success!) |
206 /* | 206 /* |
207 * channels - number of channels in codec (1 = mono, 2 = stereo) | 207 * channels - number of channels in codec (1 = mono, 2 = stereo) |
208 */ | 208 */ |
209 virtual int32_t OnInitializeDecoder( | 209 virtual int32_t OnInitializeDecoder( |
210 const int8_t payloadType, | 210 const int8_t payloadType, |
211 const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 211 const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
212 const int frequency, | 212 const int frequency, |
213 const uint8_t channels, | 213 const size_t channels, |
214 const uint32_t rate) = 0; | 214 const uint32_t rate) = 0; |
215 | 215 |
216 virtual void OnIncomingSSRCChanged(const uint32_t ssrc) = 0; | 216 virtual void OnIncomingSSRCChanged(const uint32_t ssrc) = 0; |
217 | 217 |
218 virtual void OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) = 0; | 218 virtual void OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) = 0; |
219 }; | 219 }; |
220 | 220 |
221 class RtpAudioFeedback { | 221 class RtpAudioFeedback { |
222 public: | 222 public: |
223 virtual void OnPlayTelephoneEvent(const uint8_t event, | 223 virtual void OnPlayTelephoneEvent(const uint8_t event, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
326 }; | 326 }; |
327 | 327 |
328 // Null object version of RtpFeedback. | 328 // Null object version of RtpFeedback. |
329 class NullRtpFeedback : public RtpFeedback { | 329 class NullRtpFeedback : public RtpFeedback { |
330 public: | 330 public: |
331 virtual ~NullRtpFeedback() {} | 331 virtual ~NullRtpFeedback() {} |
332 | 332 |
333 int32_t OnInitializeDecoder(const int8_t payloadType, | 333 int32_t OnInitializeDecoder(const int8_t payloadType, |
334 const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 334 const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
335 const int frequency, | 335 const int frequency, |
336 const uint8_t channels, | 336 const size_t channels, |
337 const uint32_t rate) override { | 337 const uint32_t rate) override { |
338 return 0; | 338 return 0; |
339 } | 339 } |
340 | 340 |
341 void OnIncomingSSRCChanged(const uint32_t ssrc) override {} | 341 void OnIncomingSSRCChanged(const uint32_t ssrc) override {} |
342 void OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) override {} | 342 void OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) override {} |
343 }; | 343 }; |
344 | 344 |
345 // Null object version of RtpData. | 345 // Null object version of RtpData. |
346 class NullRtpData : public RtpData { | 346 class NullRtpData : public RtpData { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 class TransportSequenceNumberAllocator { | 407 class TransportSequenceNumberAllocator { |
408 public: | 408 public: |
409 TransportSequenceNumberAllocator() {} | 409 TransportSequenceNumberAllocator() {} |
410 virtual ~TransportSequenceNumberAllocator() {} | 410 virtual ~TransportSequenceNumberAllocator() {} |
411 | 411 |
412 virtual uint16_t AllocateSequenceNumber() = 0; | 412 virtual uint16_t AllocateSequenceNumber() = 0; |
413 }; | 413 }; |
414 | 414 |
415 } // namespace webrtc | 415 } // namespace webrtc |
416 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 416 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
OLD | NEW |