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

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 unit tests and fixing some issues. 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
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) = 0;
342
343 // Remove an RtpSender from this PeerConnection.
344 // Returns true on success.
345 virtual bool RemoveTrack(RtpSenderInterface* sender) = 0;
346
334 // Returns pointer to the created DtmfSender on success. 347 // Returns pointer to the created DtmfSender on success.
335 // Otherwise returns NULL. 348 // Otherwise returns NULL.
336 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender( 349 virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
337 AudioTrackInterface* track) = 0; 350 AudioTrackInterface* track) = 0;
338 351
339 // TODO(deadbeef): Make these pure virtual once all subclasses implement them. 352 // TODO(deadbeef): Make these pure virtual once all subclasses implement them.
340 // |kind| must be "audio" or "video". 353 // |kind| must be "audio" or "video".
341 // |stream_id| is used to populate the msid attribute; if empty, one will 354 // |stream_id| is used to populate the msid attribute; if empty, one will
342 // be generated automatically. 355 // be generated automatically.
343 virtual rtc::scoped_refptr<RtpSenderInterface> CreateSender( 356 virtual rtc::scoped_refptr<RtpSenderInterface> CreateSender(
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 CreatePeerConnectionFactory( 694 CreatePeerConnectionFactory(
682 rtc::Thread* worker_thread, 695 rtc::Thread* worker_thread,
683 rtc::Thread* signaling_thread, 696 rtc::Thread* signaling_thread,
684 AudioDeviceModule* default_adm, 697 AudioDeviceModule* default_adm,
685 cricket::WebRtcVideoEncoderFactory* encoder_factory, 698 cricket::WebRtcVideoEncoderFactory* encoder_factory,
686 cricket::WebRtcVideoDecoderFactory* decoder_factory); 699 cricket::WebRtcVideoDecoderFactory* decoder_factory);
687 700
688 } // namespace webrtc 701 } // namespace webrtc
689 702
690 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 703 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698