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

Side by Side Diff: webrtc/media/base/mediachannel.h

Issue 2024153002: Add RtpHeaderExtension to avoid client breakage (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nits Created 4 years, 6 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 | « webrtc/media/base/fakemediaengine.h ('k') | webrtc/pc/mediasession.h » ('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 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 private: 314 private:
315 template <typename T> 315 template <typename T>
316 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { 316 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) {
317 if (o) { 317 if (o) {
318 *s = o; 318 *s = o;
319 } 319 }
320 } 320 }
321 }; 321 };
322 322
323 // TODO(isheriff): Remove this once client usage is fixed to use RtpExtension.
324 struct RtpHeaderExtension {
325 RtpHeaderExtension() : id(0) {}
326 RtpHeaderExtension(const std::string& uri, int id) : uri(uri), id(id) {}
327
328 std::string ToString() const {
329 std::ostringstream ost;
330 ost << "{";
331 ost << "uri: " << uri;
332 ost << ", id: " << id;
333 ost << "}";
334 return ost.str();
335 }
336
337 std::string uri;
338 int id;
339 };
340
323 class MediaChannel : public sigslot::has_slots<> { 341 class MediaChannel : public sigslot::has_slots<> {
324 public: 342 public:
325 class NetworkInterface { 343 class NetworkInterface {
326 public: 344 public:
327 enum SocketType { ST_RTP, ST_RTCP }; 345 enum SocketType { ST_RTP, ST_RTCP };
328 virtual bool SendPacket(rtc::CopyOnWriteBuffer* packet, 346 virtual bool SendPacket(rtc::CopyOnWriteBuffer* packet,
329 const rtc::PacketOptions& options) = 0; 347 const rtc::PacketOptions& options) = 0;
330 virtual bool SendRtcp(rtc::CopyOnWriteBuffer* packet, 348 virtual bool SendRtcp(rtc::CopyOnWriteBuffer* packet,
331 const rtc::PacketOptions& options) = 0; 349 const rtc::PacketOptions& options) = 0;
332 virtual int SetOption(SocketType type, rtc::Socket::Option opt, 350 virtual int SetOption(SocketType type, rtc::Socket::Option opt,
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 // Signal when the media channel is ready to send the stream. Arguments are: 1122 // Signal when the media channel is ready to send the stream. Arguments are:
1105 // writable(bool) 1123 // writable(bool)
1106 sigslot::signal1<bool> SignalReadyToSend; 1124 sigslot::signal1<bool> SignalReadyToSend;
1107 // Signal for notifying that the remote side has closed the DataChannel. 1125 // Signal for notifying that the remote side has closed the DataChannel.
1108 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 1126 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
1109 }; 1127 };
1110 1128
1111 } // namespace cricket 1129 } // namespace cricket
1112 1130
1113 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 1131 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/fakemediaengine.h ('k') | webrtc/pc/mediasession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698