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

Side by Side Diff: talk/app/webrtc/peerconnectioninterface.h

Issue 1563403002: Adding AddTrack/RemoveTrack to native PeerConnection API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding default implementation for new methods. 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
« no previous file with comments | « talk/app/webrtc/peerconnection.cc ('k') | talk/app/webrtc/peerconnectioninterface_unittest.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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // Add a new MediaStream to be sent on this PeerConnection. 324 // Add a new MediaStream to be sent on this PeerConnection.
325 // Note that a SessionDescription negotiation is needed before the 325 // Note that a SessionDescription negotiation is needed before the
326 // remote peer can receive the stream. 326 // remote peer can receive the stream.
327 virtual bool AddStream(MediaStreamInterface* stream) = 0; 327 virtual bool AddStream(MediaStreamInterface* stream) = 0;
328 328
329 // Remove a MediaStream from this PeerConnection. 329 // Remove a MediaStream from this PeerConnection.
330 // Note that a SessionDescription negotiation is need before the 330 // Note that a SessionDescription negotiation is need before the
331 // remote peer is notified. 331 // remote peer is notified.
332 virtual void RemoveStream(MediaStreamInterface* stream) = 0; 332 virtual void RemoveStream(MediaStreamInterface* stream) = 0;
333 333
334 // TODO(deadbeef): Make the following two methods pure virtual once
335 // implemented by all subclasses of PeerConnectionInterface.
336 // Add a new MediaStreamTrack to be sent on this PeerConnection.
337 // |streams| indicates which stream labels the track should be associated
338 // with.
339 virtual rtc::scoped_refptr<RtpSenderInterface> AddTrack(
340 MediaStreamTrackInterface* track,
341 std::vector<MediaStreamInterface*> streams) {
342 return nullptr;
343 }
344
345 // Remove an RtpSender from this PeerConnection.
346 // Returns true on success.
347 virtual bool RemoveTrack(RtpSenderInterface* sender) {
348 return false;
349 }
350
334 // Returns pointer to the created DtmfSender on success. 351 // Returns pointer to the created DtmfSender on success.
335 // Otherwise returns NULL. 352 // Otherwise returns NULL.
336 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( 353 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
337 AudioTrackInterface* track) = 0; 354 AudioTrackInterface* track) = 0;
338 355
339 // TODO(deadbeef): Make these pure virtual once all subclasses implement them. 356 // TODO(deadbeef): Make these pure virtual once all subclasses implement them.
340 // |kind| must be "audio" or "video". 357 // |kind| must be "audio" or "video".
341 // |stream_id| is used to populate the msid attribute; if empty, one will 358 // |stream_id| is used to populate the msid attribute; if empty, one will
342 // be generated automatically. 359 // be generated automatically.
343 virtual rtc::scoped_refptr<RtpSenderInterface> CreateSender( 360 virtual rtc::scoped_refptr<RtpSenderInterface> CreateSender(
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 CreatePeerConnectionFactory( 698 CreatePeerConnectionFactory(
682 rtc::Thread* worker_thread, 699 rtc::Thread* worker_thread,
683 rtc::Thread* signaling_thread, 700 rtc::Thread* signaling_thread,
684 AudioDeviceModule* default_adm, 701 AudioDeviceModule* default_adm,
685 cricket::WebRtcVideoEncoderFactory* encoder_factory, 702 cricket::WebRtcVideoEncoderFactory* encoder_factory,
686 cricket::WebRtcVideoDecoderFactory* decoder_factory); 703 cricket::WebRtcVideoDecoderFactory* decoder_factory);
687 704
688 } // namespace webrtc 705 } // namespace webrtc
689 706
690 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 707 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnection.cc ('k') | talk/app/webrtc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698