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 |
54 protected: | 56 protected: |
55 LocalAudioSource() | 57 LocalAudioSource() : source_state_(kInitializing) {} |
56 : source_state_(kInitializing) { | 58 ~LocalAudioSource() override {} |
57 } | |
58 | |
59 ~LocalAudioSource() { | |
60 } | |
61 | 59 |
62 private: | 60 private: |
63 void Initialize(const PeerConnectionFactoryInterface::Options& options, | 61 void Initialize(const PeerConnectionFactoryInterface::Options& options, |
64 const MediaConstraintsInterface* constraints); | 62 const MediaConstraintsInterface* constraints); |
65 | 63 |
66 cricket::AudioOptions options_; | 64 cricket::AudioOptions options_; |
67 SourceState source_state_; | 65 SourceState source_state_; |
68 }; | 66 }; |
69 | 67 |
70 } // namespace webrtc | 68 } // namespace webrtc |
71 | 69 |
72 #endif // TALK_APP_WEBRTC_LOCALAUDIOSOURCE_H_ | 70 #endif // TALK_APP_WEBRTC_LOCALAUDIOSOURCE_H_ |
OLD | NEW |