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

Side by Side Diff: webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 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
(...skipping 17 matching lines...) Expand all
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;
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
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
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
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_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_receiver.h ('k') | webrtc/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698