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

Side by Side Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api.h

Issue 1376673004: Add a PacketOptions struct to webrtc::Transport. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment added Created 5 years, 2 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 18 matching lines...) Expand all
29 : count_(0), 29 : count_(0),
30 packet_loss_(0), 30 packet_loss_(0),
31 rtp_payload_registry_(NULL), 31 rtp_payload_registry_(NULL),
32 rtp_receiver_(NULL), 32 rtp_receiver_(NULL),
33 rtp_rtcp_module_(NULL) {} 33 rtp_rtcp_module_(NULL) {}
34 void SetSendModule(RtpRtcp* rtp_rtcp_module, 34 void SetSendModule(RtpRtcp* rtp_rtcp_module,
35 RTPPayloadRegistry* payload_registry, 35 RTPPayloadRegistry* payload_registry,
36 RtpReceiver* receiver, 36 RtpReceiver* receiver,
37 ReceiveStatistics* receive_statistics); 37 ReceiveStatistics* receive_statistics);
38 void DropEveryNthPacket(int n); 38 void DropEveryNthPacket(int n);
39 bool SendRtp(const uint8_t* data, size_t len) override; 39 bool SendRtp(const uint8_t* data,
40 size_t len,
41 const PacketOptions& options) override;
40 bool SendRtcp(const uint8_t* data, size_t len) override; 42 bool SendRtcp(const uint8_t* data, size_t len) override;
41 43
42 private: 44 private:
43 int count_; 45 int count_;
44 int packet_loss_; 46 int packet_loss_;
45 ReceiveStatistics* receive_statistics_; 47 ReceiveStatistics* receive_statistics_;
46 RTPPayloadRegistry* rtp_payload_registry_; 48 RTPPayloadRegistry* rtp_payload_registry_;
47 RtpReceiver* rtp_receiver_; 49 RtpReceiver* rtp_receiver_;
48 RtpRtcp* rtp_rtcp_module_; 50 RtpRtcp* rtp_rtcp_module_;
49 }; 51 };
50 52
51 class TestRtpReceiver : public NullRtpData { 53 class TestRtpReceiver : public NullRtpData {
52 public: 54 public:
53 int32_t OnReceivedPayloadData( 55 int32_t OnReceivedPayloadData(
54 const uint8_t* payload_data, 56 const uint8_t* payload_data,
55 const size_t payload_size, 57 const size_t payload_size,
56 const webrtc::WebRtcRTPHeader* rtp_header) override; 58 const webrtc::WebRtcRTPHeader* rtp_header) override;
57 59
58 const uint8_t* payload_data() const { return payload_data_; } 60 const uint8_t* payload_data() const { return payload_data_; }
59 size_t payload_size() const { return payload_size_; } 61 size_t payload_size() const { return payload_size_; }
60 webrtc::WebRtcRTPHeader rtp_header() const { return rtp_header_; } 62 webrtc::WebRtcRTPHeader rtp_header() const { return rtp_header_; }
61 63
62 private: 64 private:
63 uint8_t payload_data_[1500]; 65 uint8_t payload_data_[1500];
64 size_t payload_size_; 66 size_t payload_size_;
65 webrtc::WebRtcRTPHeader rtp_header_; 67 webrtc::WebRtcRTPHeader rtp_header_;
66 }; 68 };
67 69
68 } // namespace webrtc 70 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698