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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 ExtraData* extraData() const { return m_extraData.get(); } | 75 ExtraData* extraData() const { return m_extraData.get(); } |
76 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData
; } | 76 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData
; } |
77 | 77 |
78 private: | 78 private: |
79 MediaStreamComponent(const String& id, MediaStreamDescriptor*, PassRefPtr<Me
diaStreamSource>); | 79 MediaStreamComponent(const String& id, MediaStreamDescriptor*, PassRefPtr<Me
diaStreamSource>); |
80 | 80 |
81 #if ENABLE(WEB_AUDIO) | 81 #if ENABLE(WEB_AUDIO) |
82 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() | 82 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() |
83 // calls into chromium to get a rendered audio stream. | 83 // calls into chromium to get a rendered audio stream. |
84 | 84 |
85 class AudioSourceProviderImpl : public AudioSourceProvider { | 85 class AudioSourceProviderImpl FINAL: public AudioSourceProvider { |
86 public: | 86 public: |
87 AudioSourceProviderImpl() | 87 AudioSourceProviderImpl() |
88 : m_webAudioSourceProvider(0) | 88 : m_webAudioSourceProvider(0) |
89 { | 89 { |
90 } | 90 } |
91 | 91 |
92 virtual ~AudioSourceProviderImpl() { } | 92 virtual ~AudioSourceProviderImpl() { } |
93 | 93 |
94 // Wraps the given blink::WebAudioSourceProvider to WebCore::AudioSource
Provider. | 94 // Wraps the given blink::WebAudioSourceProvider to WebCore::AudioSource
Provider. |
95 void wrap(blink::WebAudioSourceProvider*); | 95 void wrap(blink::WebAudioSourceProvider*); |
96 | 96 |
97 // WebCore::AudioSourceProvider | 97 // WebCore::AudioSourceProvider |
98 virtual void provideInput(WebCore::AudioBus*, size_t framesToProcess); | 98 virtual void provideInput(WebCore::AudioBus*, size_t framesToProcess) OV
ERRIDE; |
99 | 99 |
100 private: | 100 private: |
101 blink::WebAudioSourceProvider* m_webAudioSourceProvider; | 101 blink::WebAudioSourceProvider* m_webAudioSourceProvider; |
102 Mutex m_provideInputLock; | 102 Mutex m_provideInputLock; |
103 }; | 103 }; |
104 | 104 |
105 AudioSourceProviderImpl m_sourceProvider; | 105 AudioSourceProviderImpl m_sourceProvider; |
106 #endif // ENABLE(WEB_AUDIO) | 106 #endif // ENABLE(WEB_AUDIO) |
107 | 107 |
108 MediaStreamDescriptor* m_stream; | 108 MediaStreamDescriptor* m_stream; |
109 RefPtr<MediaStreamSource> m_source; | 109 RefPtr<MediaStreamSource> m_source; |
110 String m_id; | 110 String m_id; |
111 bool m_enabled; | 111 bool m_enabled; |
112 RefPtr<ExtraData> m_extraData; | 112 RefPtr<ExtraData> m_extraData; |
113 }; | 113 }; |
114 | 114 |
115 typedef Vector<RefPtr<MediaStreamComponent> > MediaStreamComponentVector; | 115 typedef Vector<RefPtr<MediaStreamComponent> > MediaStreamComponentVector; |
116 | 116 |
117 } // namespace WebCore | 117 } // namespace WebCore |
118 | 118 |
119 #endif // MediaStreamComponent_h | 119 #endif // MediaStreamComponent_h |
OLD | NEW |