OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // This class implements the audio source used by the remote audio track. | 49 // This class implements the audio source used by the remote audio track. |
50 class RemoteAudioSource : public Notifier<AudioSourceInterface> { | 50 class RemoteAudioSource : public Notifier<AudioSourceInterface> { |
51 public: | 51 public: |
52 // Creates an instance of RemoteAudioSource. | 52 // Creates an instance of RemoteAudioSource. |
53 static rtc::scoped_refptr<RemoteAudioSource> Create( | 53 static rtc::scoped_refptr<RemoteAudioSource> Create( |
54 uint32_t ssrc, | 54 uint32_t ssrc, |
55 AudioProviderInterface* provider); | 55 AudioProviderInterface* provider); |
56 | 56 |
57 // MediaSourceInterface implementation. | 57 // MediaSourceInterface implementation. |
58 MediaSourceInterface::SourceState state() const override; | 58 MediaSourceInterface::SourceState state() const override; |
| 59 bool remote() const override; |
59 | 60 |
60 void AddSink(AudioTrackSinkInterface* sink); | 61 void AddSink(AudioTrackSinkInterface* sink); |
61 void RemoveSink(AudioTrackSinkInterface* sink); | 62 void RemoveSink(AudioTrackSinkInterface* sink); |
62 | 63 |
63 protected: | 64 protected: |
64 RemoteAudioSource(); | 65 RemoteAudioSource(); |
65 ~RemoteAudioSource() override; | 66 ~RemoteAudioSource() override; |
66 | 67 |
67 // Post construction initialize where we can do things like save a reference | 68 // Post construction initialize where we can do things like save a reference |
68 // to ourselves (need to be fully constructed). | 69 // to ourselves (need to be fully constructed). |
(...skipping 17 matching lines...) Expand all Loading... |
86 AudioObserverList audio_observers_; | 87 AudioObserverList audio_observers_; |
87 rtc::CriticalSection sink_lock_; | 88 rtc::CriticalSection sink_lock_; |
88 std::list<AudioTrackSinkInterface*> sinks_; | 89 std::list<AudioTrackSinkInterface*> sinks_; |
89 rtc::Thread* const main_thread_; | 90 rtc::Thread* const main_thread_; |
90 SourceState state_; | 91 SourceState state_; |
91 }; | 92 }; |
92 | 93 |
93 } // namespace webrtc | 94 } // namespace webrtc |
94 | 95 |
95 #endif // TALK_APP_WEBRTC_REMOTEAUDIOSOURCE_H_ | 96 #endif // TALK_APP_WEBRTC_REMOTEAUDIOSOURCE_H_ |
OLD | NEW |