| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  *  Copyright 2014 The WebRTC project authors. All Rights Reserved. |   2  *  Copyright 2014 The WebRTC project authors. All Rights Reserved. | 
|   3  * |   3  * | 
|   4  *  Use of this source code is governed by a BSD-style license |   4  *  Use of this source code is governed by a BSD-style license | 
|   5  *  that can be found in the LICENSE file in the root of the source |   5  *  that can be found in the LICENSE file in the root of the source | 
|   6  *  tree. An additional intellectual property rights grant can be found |   6  *  tree. An additional intellectual property rights grant can be found | 
|   7  *  in the file PATENTS.  All contributing project authors may |   7  *  in the file PATENTS.  All contributing project authors may | 
|   8  *  be found in the AUTHORS file in the root of the source tree. |   8  *  be found in the AUTHORS file in the root of the source tree. | 
|   9  */ |   9  */ | 
|  10  |  10  | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
|  36       uint32_t ssrc, |  36       uint32_t ssrc, | 
|  37       AudioProviderInterface* provider); |  37       AudioProviderInterface* provider); | 
|  38  |  38  | 
|  39   // MediaSourceInterface implementation. |  39   // MediaSourceInterface implementation. | 
|  40   MediaSourceInterface::SourceState state() const override; |  40   MediaSourceInterface::SourceState state() const override; | 
|  41   bool remote() const override; |  41   bool remote() const override; | 
|  42  |  42  | 
|  43   void AddSink(AudioTrackSinkInterface* sink) override; |  43   void AddSink(AudioTrackSinkInterface* sink) override; | 
|  44   void RemoveSink(AudioTrackSinkInterface* sink) override; |  44   void RemoveSink(AudioTrackSinkInterface* sink) override; | 
|  45  |  45  | 
 |  46   void RegisterAudioObserver(AudioObserver* observer) override; | 
 |  47   void UnregisterAudioObserver(AudioObserver* observer) override; | 
 |  48  | 
|  46  protected: |  49  protected: | 
|  47   RemoteAudioSource(); |  50   RemoteAudioSource(); | 
|  48   ~RemoteAudioSource() override; |  51   ~RemoteAudioSource() override; | 
|  49  |  52  | 
|  50   // Post construction initialize where we can do things like save a reference |  53   // Post construction initialize where we can do things like save a reference | 
|  51   // to ourselves (need to be fully constructed). |  54   // to ourselves (need to be fully constructed). | 
|  52   void Initialize(uint32_t ssrc, AudioProviderInterface* provider); |  55   void Initialize(uint32_t ssrc, AudioProviderInterface* provider); | 
|  53  |  56  | 
|  54  private: |  57  private: | 
|  55   typedef std::list<AudioObserver*> AudioObserverList; |  58   typedef std::list<AudioObserver*> AudioObserverList; | 
|  56  |  59  | 
|  57   // AudioSourceInterface implementation. |  60   // AudioSourceInterface implementation. | 
|  58   void SetVolume(double volume) override; |  61   void SetVolume(double volume) override; | 
|  59   void RegisterAudioObserver(AudioObserver* observer) override; |  | 
|  60   void UnregisterAudioObserver(AudioObserver* observer) override; |  | 
|  61  |  62  | 
|  62   class Sink; |  63   class Sink; | 
|  63   void OnData(const AudioSinkInterface::Data& audio); |  64   void OnData(const AudioSinkInterface::Data& audio); | 
|  64   void OnAudioProviderGone(); |  65   void OnAudioProviderGone(); | 
|  65  |  66  | 
|  66   class MessageHandler; |  67   class MessageHandler; | 
|  67   void OnMessage(rtc::Message* msg); |  68   void OnMessage(rtc::Message* msg); | 
|  68  |  69  | 
|  69   AudioObserverList audio_observers_; |  70   AudioObserverList audio_observers_; | 
|  70   rtc::CriticalSection sink_lock_; |  71   rtc::CriticalSection sink_lock_; | 
|  71   std::list<AudioTrackSinkInterface*> sinks_; |  72   std::list<AudioTrackSinkInterface*> sinks_; | 
|  72   rtc::Thread* const main_thread_; |  73   rtc::Thread* const main_thread_; | 
|  73   SourceState state_; |  74   SourceState state_; | 
|  74 }; |  75 }; | 
|  75  |  76  | 
|  76 }  // namespace webrtc |  77 }  // namespace webrtc | 
|  77  |  78  | 
|  78 #endif  // WEBRTC_API_REMOTEAUDIOSOURCE_H_ |  79 #endif  // WEBRTC_API_REMOTEAUDIOSOURCE_H_ | 
| OLD | NEW |