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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
46 // "receiver_id" string, which will be the MSID in the short term and MID in | 46 // "receiver_id" string, which will be the MSID in the short term and MID in |
47 // the long term. | 47 // the long term. |
48 | 48 |
49 // TODO(deadbeef): These interfaces are effectively just a way for the | 49 // TODO(deadbeef): These interfaces are effectively just a way for the |
50 // RtpSenders/Receivers to get to the BaseChannels. These interfaces should be | 50 // RtpSenders/Receivers to get to the BaseChannels. These interfaces should be |
51 // refactored away eventually, as the classes converge. | 51 // refactored away eventually, as the classes converge. |
52 | 52 |
53 // This interface is called by AudioTrackHandler classes in mediastreamhandler.h | 53 // This interface is called by AudioRtpSender/Receivers to change the settings |
54 // to change the settings of an audio track connected to certain PeerConnection. | 54 // of an audio track connected to certain PeerConnection. |
55 class AudioProviderInterface { | 55 class AudioProviderInterface { |
56 public: | 56 public: |
57 // Enable/disable the audio playout of a remote audio track with |ssrc|. | 57 // Enable/disable the audio playout of a remote audio track with |ssrc|. |
58 virtual void SetAudioPlayout(uint32_t ssrc, bool enable) = 0; | 58 virtual void SetAudioPlayout(uint32_t ssrc, bool enable) = 0; |
59 // Enable/disable sending audio on the local audio track with |ssrc|. | 59 // Enable/disable sending audio on the local audio track with |ssrc|. |
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 protected: | 70 protected: |
71 virtual ~AudioProviderInterface() {} | 71 virtual ~AudioProviderInterface() {} |
72 }; | 72 }; |
73 | 73 |
74 // This interface is called by VideoTrackHandler classes in mediastreamhandler.h | 74 // This interface is called by VideoRtpSender/Receivers to change the settings |
75 // to change the settings of a video track connected to a certain | 75 // of a video track connected to a certain PeerConnection. |
76 // PeerConnection. | |
77 class VideoProviderInterface { | 76 class VideoProviderInterface { |
78 public: | 77 public: |
79 virtual bool SetCaptureDevice(uint32_t ssrc, | 78 virtual bool SetCaptureDevice(uint32_t ssrc, |
80 cricket::VideoCapturer* camera) = 0; | 79 cricket::VideoCapturer* camera) = 0; |
81 // Enable/disable the video playout of a remote video track with |ssrc|. | 80 // Enable/disable the video playout of a remote video track with |ssrc|. |
82 virtual void SetVideoPlayout(uint32_t ssrc, | 81 virtual void SetVideoPlayout(uint32_t ssrc, |
83 bool enable, | 82 bool enable, |
84 cricket::VideoRenderer* renderer) = 0; | 83 cricket::VideoRenderer* renderer) = 0; |
85 // Enable sending video on the local video track with |ssrc|. | 84 // Enable sending video on the local video track with |ssrc|. |
86 virtual void SetVideoSend(uint32_t ssrc, | 85 virtual void SetVideoSend(uint32_t ssrc, |
87 bool enable, | 86 bool enable, |
88 const cricket::VideoOptions* options) = 0; | 87 const cricket::VideoOptions* options) = 0; |
89 | 88 |
90 protected: | 89 protected: |
91 virtual ~VideoProviderInterface() {} | 90 virtual ~VideoProviderInterface() {} |
92 }; | 91 }; |
93 | 92 |
94 } // namespace webrtc | 93 } // namespace webrtc |
95 | 94 |
96 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ | 95 #endif // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_ |
OLD | NEW |