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

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

Issue 1327933002: Full impl of NnChannel::SetSendParameters and NnChannel::SetRecvParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/base/rtpdataengine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 explicit RtpDataMediaChannel(rtc::Timing* timing); 89 explicit RtpDataMediaChannel(rtc::Timing* timing);
90 // Sets Timing == NULL, so you'll need to call set_timer() before 90 // Sets Timing == NULL, so you'll need to call set_timer() before
91 // using it. This is needed by FakeMediaEngine. 91 // using it. This is needed by FakeMediaEngine.
92 RtpDataMediaChannel(); 92 RtpDataMediaChannel();
93 virtual ~RtpDataMediaChannel(); 93 virtual ~RtpDataMediaChannel();
94 94
95 void set_timing(rtc::Timing* timing) { 95 void set_timing(rtc::Timing* timing) {
96 timing_ = timing; 96 timing_ = timing;
97 } 97 }
98 98
99 virtual bool SetMaxSendBandwidth(int bps); 99 virtual bool SetSendParameters(const DataSendParameters& params);
100 virtual bool SetRecvRtpHeaderExtensions( 100 virtual bool SetRecvParameters(const DataRecvParameters& params);
101 const std::vector<RtpHeaderExtension>& extensions) { return true; }
102 virtual bool SetSendRtpHeaderExtensions(
103 const std::vector<RtpHeaderExtension>& extensions) { return true; }
104 virtual bool SetSendCodecs(const std::vector<DataCodec>& codecs);
105 virtual bool SetRecvCodecs(const std::vector<DataCodec>& codecs);
106 virtual bool AddSendStream(const StreamParams& sp); 101 virtual bool AddSendStream(const StreamParams& sp);
107 virtual bool RemoveSendStream(uint32 ssrc); 102 virtual bool RemoveSendStream(uint32 ssrc);
108 virtual bool AddRecvStream(const StreamParams& sp); 103 virtual bool AddRecvStream(const StreamParams& sp);
109 virtual bool RemoveRecvStream(uint32 ssrc); 104 virtual bool RemoveRecvStream(uint32 ssrc);
110 virtual bool SetSend(bool send) { 105 virtual bool SetSend(bool send) {
111 sending_ = send; 106 sending_ = send;
112 return true; 107 return true;
113 } 108 }
114 virtual bool SetReceive(bool receive) { 109 virtual bool SetReceive(bool receive) {
115 receiving_ = receive; 110 receiving_ = receive;
116 return true; 111 return true;
117 } 112 }
118 virtual void OnPacketReceived(rtc::Buffer* packet, 113 virtual void OnPacketReceived(rtc::Buffer* packet,
119 const rtc::PacketTime& packet_time); 114 const rtc::PacketTime& packet_time);
120 virtual void OnRtcpReceived(rtc::Buffer* packet, 115 virtual void OnRtcpReceived(rtc::Buffer* packet,
121 const rtc::PacketTime& packet_time) {} 116 const rtc::PacketTime& packet_time) {}
122 virtual void OnReadyToSend(bool ready) {} 117 virtual void OnReadyToSend(bool ready) {}
123 virtual bool SendData( 118 virtual bool SendData(
124 const SendDataParams& params, 119 const SendDataParams& params,
125 const rtc::Buffer& payload, 120 const rtc::Buffer& payload,
126 SendDataResult* result); 121 SendDataResult* result);
127 122
128 private: 123 private:
129 void Construct(rtc::Timing* timing); 124 void Construct(rtc::Timing* timing);
125 bool SetMaxSendBandwidth(int bps);
126 bool SetSendCodecs(const std::vector<DataCodec>& codecs);
127 bool SetRecvCodecs(const std::vector<DataCodec>& codecs);
130 128
131 bool sending_; 129 bool sending_;
132 bool receiving_; 130 bool receiving_;
133 rtc::Timing* timing_; 131 rtc::Timing* timing_;
134 std::vector<DataCodec> send_codecs_; 132 std::vector<DataCodec> send_codecs_;
135 std::vector<DataCodec> recv_codecs_; 133 std::vector<DataCodec> recv_codecs_;
136 std::vector<StreamParams> send_streams_; 134 std::vector<StreamParams> send_streams_;
137 std::vector<StreamParams> recv_streams_; 135 std::vector<StreamParams> recv_streams_;
138 std::map<uint32, RtpClock*> rtp_clock_by_send_ssrc_; 136 std::map<uint32, RtpClock*> rtp_clock_by_send_ssrc_;
139 rtc::scoped_ptr<rtc::RateLimiter> send_limiter_; 137 rtc::scoped_ptr<rtc::RateLimiter> send_limiter_;
140 }; 138 };
141 139
142 } // namespace cricket 140 } // namespace cricket
143 141
144 #endif // TALK_MEDIA_BASE_RTPDATAENGINE_H_ 142 #endif // TALK_MEDIA_BASE_RTPDATAENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/base/rtpdataengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698