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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() | 77 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() |
78 // calls into chromium to get a rendered audio stream. | 78 // calls into chromium to get a rendered audio stream. |
79 | 79 |
80 class PLATFORM_EXPORT AudioSourceProviderImpl final: public AudioSourceProvi
der { | 80 class PLATFORM_EXPORT AudioSourceProviderImpl final: public AudioSourceProvi
der { |
81 public: | 81 public: |
82 AudioSourceProviderImpl() | 82 AudioSourceProviderImpl() |
83 : m_webAudioSourceProvider(0) | 83 : m_webAudioSourceProvider(0) |
84 { | 84 { |
85 } | 85 } |
86 | 86 |
87 virtual ~AudioSourceProviderImpl() { } | 87 ~AudioSourceProviderImpl() override {} |
88 | 88 |
89 // Wraps the given blink::WebAudioSourceProvider to blink::AudioSourcePr
ovider. | 89 // Wraps the given blink::WebAudioSourceProvider to blink::AudioSourcePr
ovider. |
90 void wrap(WebAudioSourceProvider*); | 90 void wrap(WebAudioSourceProvider*); |
91 | 91 |
92 // blink::AudioSourceProvider | 92 // blink::AudioSourceProvider |
93 virtual void provideInput(AudioBus*, size_t framesToProcess) override; | 93 void provideInput(AudioBus*, size_t framesToProcess) override; |
94 | 94 |
95 private: | 95 private: |
96 WebAudioSourceProvider* m_webAudioSourceProvider; | 96 WebAudioSourceProvider* m_webAudioSourceProvider; |
97 Mutex m_provideInputLock; | 97 Mutex m_provideInputLock; |
98 }; | 98 }; |
99 | 99 |
100 AudioSourceProviderImpl m_sourceProvider; | 100 AudioSourceProviderImpl m_sourceProvider; |
101 #endif // ENABLE(WEB_AUDIO) | 101 #endif // ENABLE(WEB_AUDIO) |
102 | 102 |
103 RefPtr<MediaStreamSource> m_source; | 103 RefPtr<MediaStreamSource> m_source; |
104 String m_id; | 104 String m_id; |
105 bool m_enabled; | 105 bool m_enabled; |
106 bool m_muted; | 106 bool m_muted; |
107 OwnPtr<ExtraData> m_extraData; | 107 OwnPtr<ExtraData> m_extraData; |
108 }; | 108 }; |
109 | 109 |
110 typedef Vector<RefPtr<MediaStreamComponent>> MediaStreamComponentVector; | 110 typedef Vector<RefPtr<MediaStreamComponent>> MediaStreamComponentVector; |
111 | 111 |
112 } // namespace blink | 112 } // namespace blink |
113 | 113 |
114 #endif // MediaStreamComponent_h | 114 #endif // MediaStreamComponent_h |
OLD | NEW |