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

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

Issue 1551813002: Storing raw audio sink for default audio track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding unit tests for SetRawAudioSink. 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 11 matching lines...) Expand all
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #ifndef TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ 28 #ifndef TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_
29 #define TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ 29 #define TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_
30 30
31 #include "webrtc/base/basictypes.h" 31 #include "webrtc/base/basictypes.h"
32 #include "webrtc/base/scoped_ptr.h" 32 #include "webrtc/base/scoped_ref_ptr.h"
33 33
34 namespace cricket { 34 namespace cricket {
35 35
36 class AudioRenderer; 36 class AudioRenderer;
37 class VideoCapturer; 37 class VideoCapturer;
38 class VideoRenderer; 38 class VideoRenderer;
39 struct AudioOptions; 39 struct AudioOptions;
40 struct VideoOptions; 40 struct VideoOptions;
41 41
42 } // namespace cricket 42 } // namespace cricket
(...skipping 25 matching lines...) Expand all
68 68
69 // Sets the audio playout volume of a remote audio track with |ssrc|. 69 // Sets the audio playout volume of a remote audio track with |ssrc|.
70 // |volume| is in the range of [0, 10]. 70 // |volume| is in the range of [0, 10].
71 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; 71 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0;
72 72
73 // Allows for setting a direct audio sink for an incoming audio source. 73 // Allows for setting a direct audio sink for an incoming audio source.
74 // Only one audio sink is supported per ssrc and ownership of the sink is 74 // Only one audio sink is supported per ssrc and ownership of the sink is
75 // passed to the provider. 75 // passed to the provider.
76 virtual void SetRawAudioSink( 76 virtual void SetRawAudioSink(
77 uint32_t ssrc, 77 uint32_t ssrc,
78 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) = 0; 78 rtc::scoped_refptr<webrtc::AudioSinkInterface> sink) = 0;
the sun 2016/01/08 13:14:26 Assuming we'll be replacing this with shared_ptr o
Taylor Brandstetter 2016/01/08 19:46:58 const & would indeed save some unnecessary copying
the sun 2016/01/11 10:38:27 For scoped_ptr (and current scoped_ref_ptr) it won
tommi 2016/01/12 08:58:06 Passing scoped_refptr by value will trigger an ext
79 79
80 protected: 80 protected:
81 virtual ~AudioProviderInterface() {} 81 virtual ~AudioProviderInterface() {}
82 }; 82 };
83 83
84 // This interface is called by VideoRtpSender/Receivers to change the settings 84 // This interface is called by VideoRtpSender/Receivers to change the settings
85 // of a video track connected to a certain PeerConnection. 85 // of a video track connected to a certain PeerConnection.
86 class VideoProviderInterface { 86 class VideoProviderInterface {
87 public: 87 public:
88 virtual bool SetCaptureDevice(uint32_t ssrc, 88 virtual bool SetCaptureDevice(uint32_t ssrc,
89 cricket::VideoCapturer* camera) = 0; 89 cricket::VideoCapturer* camera) = 0;
90 // Enable/disable the video playout of a remote video track with |ssrc|. 90 // Enable/disable the video playout of a remote video track with |ssrc|.
91 virtual void SetVideoPlayout(uint32_t ssrc, 91 virtual void SetVideoPlayout(uint32_t ssrc,
92 bool enable, 92 bool enable,
93 cricket::VideoRenderer* renderer) = 0; 93 cricket::VideoRenderer* renderer) = 0;
94 // Enable sending video on the local video track with |ssrc|. 94 // Enable sending video on the local video track with |ssrc|.
95 virtual void SetVideoSend(uint32_t ssrc, 95 virtual void SetVideoSend(uint32_t ssrc,
96 bool enable, 96 bool enable,
97 const cricket::VideoOptions* options) = 0; 97 const cricket::VideoOptions* options) = 0;
98 98
99 protected: 99 protected:
100 virtual ~VideoProviderInterface() {} 100 virtual ~VideoProviderInterface() {}
101 }; 101 };
102 102
103 } // namespace webrtc 103 } // namespace webrtc
104 104
105 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ 105 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/peerconnectioninterface_unittest.cc » ('j') | talk/media/webrtc/webrtcvoiceengine.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698