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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 class MediaConstraintsInterface; | 42 class MediaConstraintsInterface; |
43 | 43 |
44 class LocalAudioSource : public Notifier<AudioSourceInterface> { | 44 class LocalAudioSource : public Notifier<AudioSourceInterface> { |
45 public: | 45 public: |
46 // Creates an instance of LocalAudioSource. | 46 // Creates an instance of LocalAudioSource. |
47 static rtc::scoped_refptr<LocalAudioSource> Create( | 47 static rtc::scoped_refptr<LocalAudioSource> Create( |
48 const PeerConnectionFactoryInterface::Options& options, | 48 const PeerConnectionFactoryInterface::Options& options, |
49 const MediaConstraintsInterface* constraints); | 49 const MediaConstraintsInterface* constraints); |
50 | 50 |
51 virtual SourceState state() const { return source_state_; } | 51 SourceState state() const override { return source_state_; } |
| 52 bool remote() const override { return false; } |
| 53 |
52 virtual const cricket::AudioOptions& options() const { return options_; } | 54 virtual const cricket::AudioOptions& options() const { return options_; } |
53 | 55 |
| 56 void AddSink(AudioTrackSinkInterface* sink) override {} |
| 57 void RemoveSink(AudioTrackSinkInterface* sink) override {} |
| 58 |
54 protected: | 59 protected: |
55 LocalAudioSource() | 60 LocalAudioSource() : source_state_(kInitializing) {} |
56 : source_state_(kInitializing) { | 61 ~LocalAudioSource() override {} |
57 } | |
58 | |
59 ~LocalAudioSource() { | |
60 } | |
61 | 62 |
62 private: | 63 private: |
63 void Initialize(const PeerConnectionFactoryInterface::Options& options, | 64 void Initialize(const PeerConnectionFactoryInterface::Options& options, |
64 const MediaConstraintsInterface* constraints); | 65 const MediaConstraintsInterface* constraints); |
65 | 66 |
66 cricket::AudioOptions options_; | 67 cricket::AudioOptions options_; |
67 SourceState source_state_; | 68 SourceState source_state_; |
68 }; | 69 }; |
69 | 70 |
70 } // namespace webrtc | 71 } // namespace webrtc |
71 | 72 |
72 #endif // TALK_APP_WEBRTC_LOCALAUDIOSOURCE_H_ | 73 #endif // TALK_APP_WEBRTC_LOCALAUDIOSOURCE_H_ |
OLD | NEW |