OLD | NEW |
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 10 matching lines...) Expand all Loading... |
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
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 "talk/media/base/audiorenderer.h" |
31 #include "webrtc/base/basictypes.h" | 32 #include "webrtc/base/basictypes.h" |
32 | 33 |
33 namespace cricket { | 34 namespace cricket { |
34 | 35 |
35 class AudioRenderer; | |
36 class VideoCapturer; | 36 class VideoCapturer; |
37 class VideoRenderer; | 37 class VideoRenderer; |
38 struct AudioOptions; | 38 struct AudioOptions; |
39 struct VideoOptions; | 39 struct VideoOptions; |
40 | 40 |
41 } // namespace cricket | 41 } // namespace cricket |
42 | 42 |
43 namespace webrtc { | 43 namespace webrtc { |
44 | 44 |
45 // TODO(deadbeef): Change the key from an ssrc to a "sender_id" or | 45 // TODO(deadbeef): Change the key from an ssrc to a "sender_id" or |
(...skipping 14 matching lines...) Expand all Loading... |
60 // When |enable| is true |options| should be applied to the audio track. | 60 // When |enable| is true |options| should be applied to the audio track. |
61 virtual void SetAudioSend(uint32_t ssrc, | 61 virtual void SetAudioSend(uint32_t ssrc, |
62 bool enable, | 62 bool enable, |
63 const cricket::AudioOptions& options, | 63 const cricket::AudioOptions& options, |
64 cricket::AudioRenderer* renderer) = 0; | 64 cricket::AudioRenderer* renderer) = 0; |
65 | 65 |
66 // Sets the audio playout volume of a remote audio track with |ssrc|. | 66 // Sets the audio playout volume of a remote audio track with |ssrc|. |
67 // |volume| is in the range of [0, 10]. | 67 // |volume| is in the range of [0, 10]. |
68 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; | 68 virtual void SetAudioPlayoutVolume(uint32_t ssrc, double volume) = 0; |
69 | 69 |
| 70 // Allows for setting a direct audio sink for an incoming audio source. |
| 71 // Only one audio sink is supported per ssrc. |
| 72 virtual void SetRawAudioSink(uint32_t ssrc, |
| 73 cricket::AudioRenderer::Sink* sink) = 0; |
| 74 |
70 protected: | 75 protected: |
71 virtual ~AudioProviderInterface() {} | 76 virtual ~AudioProviderInterface() {} |
72 }; | 77 }; |
73 | 78 |
74 // This interface is called by VideoRtpSender/Receivers to change the settings | 79 // This interface is called by VideoRtpSender/Receivers to change the settings |
75 // of a video track connected to a certain PeerConnection. | 80 // of a video track connected to a certain PeerConnection. |
76 class VideoProviderInterface { | 81 class VideoProviderInterface { |
77 public: | 82 public: |
78 virtual bool SetCaptureDevice(uint32_t ssrc, | 83 virtual bool SetCaptureDevice(uint32_t ssrc, |
79 cricket::VideoCapturer* camera) = 0; | 84 cricket::VideoCapturer* camera) = 0; |
80 // Enable/disable the video playout of a remote video track with |ssrc|. | 85 // Enable/disable the video playout of a remote video track with |ssrc|. |
81 virtual void SetVideoPlayout(uint32_t ssrc, | 86 virtual void SetVideoPlayout(uint32_t ssrc, |
82 bool enable, | 87 bool enable, |
83 cricket::VideoRenderer* renderer) = 0; | 88 cricket::VideoRenderer* renderer) = 0; |
84 // Enable sending video on the local video track with |ssrc|. | 89 // Enable sending video on the local video track with |ssrc|. |
85 virtual void SetVideoSend(uint32_t ssrc, | 90 virtual void SetVideoSend(uint32_t ssrc, |
86 bool enable, | 91 bool enable, |
87 const cricket::VideoOptions* options) = 0; | 92 const cricket::VideoOptions* options) = 0; |
88 | 93 |
89 protected: | 94 protected: |
90 virtual ~VideoProviderInterface() {} | 95 virtual ~VideoProviderInterface() {} |
91 }; | 96 }; |
92 | 97 |
93 } // namespace webrtc | 98 } // namespace webrtc |
94 | 99 |
95 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ | 100 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ |
OLD | NEW |