OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() | 97 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() |
98 // calls into chromium to get a rendered audio stream. | 98 // calls into chromium to get a rendered audio stream. |
99 | 99 |
100 class PLATFORM_EXPORT AudioSourceProviderImpl final | 100 class PLATFORM_EXPORT AudioSourceProviderImpl final |
101 : public AudioSourceProvider { | 101 : public AudioSourceProvider { |
102 public: | 102 public: |
103 AudioSourceProviderImpl() : m_webAudioSourceProvider(0) {} | 103 AudioSourceProviderImpl() : m_webAudioSourceProvider(0) {} |
104 | 104 |
105 ~AudioSourceProviderImpl() override {} | 105 ~AudioSourceProviderImpl() override {} |
106 | 106 |
107 // Wraps the given blink::WebAudioSourceProvider to blink::AudioSourceProvid
er. | 107 // Wraps the given blink::WebAudioSourceProvider to |
| 108 // blink::AudioSourceProvider. |
108 void wrap(WebAudioSourceProvider*); | 109 void wrap(WebAudioSourceProvider*); |
109 | 110 |
110 // blink::AudioSourceProvider | 111 // blink::AudioSourceProvider |
111 void provideInput(AudioBus*, size_t framesToProcess) override; | 112 void provideInput(AudioBus*, size_t framesToProcess) override; |
112 | 113 |
113 private: | 114 private: |
114 WebAudioSourceProvider* m_webAudioSourceProvider; | 115 WebAudioSourceProvider* m_webAudioSourceProvider; |
115 Mutex m_provideInputLock; | 116 Mutex m_provideInputLock; |
116 }; | 117 }; |
117 | 118 |
118 AudioSourceProviderImpl m_sourceProvider; | 119 AudioSourceProviderImpl m_sourceProvider; |
119 Member<MediaStreamSource> m_source; | 120 Member<MediaStreamSource> m_source; |
120 String m_id; | 121 String m_id; |
121 bool m_enabled; | 122 bool m_enabled; |
122 bool m_muted; | 123 bool m_muted; |
123 std::unique_ptr<TrackData> m_trackData; | 124 std::unique_ptr<TrackData> m_trackData; |
124 }; | 125 }; |
125 | 126 |
126 typedef HeapVector<Member<MediaStreamComponent>> MediaStreamComponentVector; | 127 typedef HeapVector<Member<MediaStreamComponent>> MediaStreamComponentVector; |
127 | 128 |
128 } // namespace blink | 129 } // namespace blink |
129 | 130 |
130 #endif // MediaStreamComponent_h | 131 #endif // MediaStreamComponent_h |
OLD | NEW |