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

Side by Side Diff: talk/media/base/fakemediaengine.h

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing updated_options 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 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return recv_extensions_; 62 return recv_extensions_;
63 } 63 }
64 const std::vector<RtpHeaderExtension>& send_extensions() { 64 const std::vector<RtpHeaderExtension>& send_extensions() {
65 return send_extensions_; 65 return send_extensions_;
66 } 66 }
67 bool sending() const { return sending_; } 67 bool sending() const { return sending_; }
68 bool playout() const { return playout_; } 68 bool playout() const { return playout_; }
69 const std::list<std::string>& rtp_packets() const { return rtp_packets_; } 69 const std::list<std::string>& rtp_packets() const { return rtp_packets_; }
70 const std::list<std::string>& rtcp_packets() const { return rtcp_packets_; } 70 const std::list<std::string>& rtcp_packets() const { return rtcp_packets_; }
71 71
72 bool SendRtp(const void* data, int len) { 72 bool SendRtp(const void* data, int len, const rtc::PacketOptions& options) {
73 if (!sending_) { 73 if (!sending_) {
74 return false; 74 return false;
75 } 75 }
76 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, 76 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len,
77 kMaxRtpPacketLen); 77 kMaxRtpPacketLen);
78 return Base::SendPacket(&packet); 78 return Base::SendPacket(&packet, options);
79 } 79 }
80 bool SendRtcp(const void* data, int len) { 80 bool SendRtcp(const void* data, int len) {
81 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len, 81 rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len,
82 kMaxRtpPacketLen); 82 kMaxRtpPacketLen);
83 return Base::SendRtcp(&packet); 83 return Base::SendRtcp(&packet, rtc::PacketOptions());
84 } 84 }
85 85
86 bool CheckRtp(const void* data, int len) { 86 bool CheckRtp(const void* data, int len) {
87 bool success = !rtp_packets_.empty(); 87 bool success = !rtp_packets_.empty();
88 if (success) { 88 if (success) {
89 std::string packet = rtp_packets_.front(); 89 std::string packet = rtp_packets_.front();
90 rtp_packets_.pop_front(); 90 rtp_packets_.pop_front();
91 success = (packet == std::string(static_cast<const char*>(data), len)); 91 success = (packet == std::string(static_cast<const char*>(data), len));
92 } 92 }
93 return success; 93 return success;
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 979
980 private: 980 private:
981 std::vector<FakeDataMediaChannel*> channels_; 981 std::vector<FakeDataMediaChannel*> channels_;
982 std::vector<DataCodec> data_codecs_; 982 std::vector<DataCodec> data_codecs_;
983 DataChannelType last_channel_type_; 983 DataChannelType last_channel_type_;
984 }; 984 };
985 985
986 } // namespace cricket 986 } // namespace cricket
987 987
988 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ 988 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698