| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #define MediaStreamAudioSourceNode_h | 26 #define MediaStreamAudioSourceNode_h |
| 27 | 27 |
| 28 #include "modules/mediastream/MediaStream.h" | 28 #include "modules/mediastream/MediaStream.h" |
| 29 #include "modules/webaudio/AudioSourceNode.h" | 29 #include "modules/webaudio/AudioSourceNode.h" |
| 30 #include "platform/audio/AudioSourceProvider.h" | 30 #include "platform/audio/AudioSourceProvider.h" |
| 31 #include "platform/audio/AudioSourceProviderClient.h" | 31 #include "platform/audio/AudioSourceProviderClient.h" |
| 32 #include "wtf/OwnPtr.h" | 32 #include "wtf/OwnPtr.h" |
| 33 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
| 34 #include "wtf/Threading.h" | 34 #include "wtf/Threading.h" |
| 35 | 35 |
| 36 #if ENABLE(WEB_AUDIO) | |
| 37 | |
| 38 namespace blink { | 36 namespace blink { |
| 39 | 37 |
| 40 class AbstractAudioContext; | 38 class AbstractAudioContext; |
| 41 | 39 |
| 42 class MediaStreamAudioSourceHandler final : public AudioHandler { | 40 class MediaStreamAudioSourceHandler final : public AudioHandler { |
| 43 public: | 41 public: |
| 44 static PassRefPtr<MediaStreamAudioSourceHandler> create(AudioNode&, MediaStr
eam&, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>); | 42 static PassRefPtr<MediaStreamAudioSourceHandler> create(AudioNode&, MediaStr
eam&, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>); |
| 45 ~MediaStreamAudioSourceHandler() override; | 43 ~MediaStreamAudioSourceHandler() override; |
| 46 | 44 |
| 47 MediaStream* mediaStream() { return m_mediaStream.get(); } | 45 MediaStream* mediaStream() { return m_mediaStream.get(); } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 81 |
| 84 // AudioSourceProviderClient functions: | 82 // AudioSourceProviderClient functions: |
| 85 void setFormat(size_t numberOfChannels, float sampleRate) override; | 83 void setFormat(size_t numberOfChannels, float sampleRate) override; |
| 86 | 84 |
| 87 private: | 85 private: |
| 88 MediaStreamAudioSourceNode(AbstractAudioContext&, MediaStream&, MediaStreamT
rack*, PassOwnPtr<AudioSourceProvider>); | 86 MediaStreamAudioSourceNode(AbstractAudioContext&, MediaStream&, MediaStreamT
rack*, PassOwnPtr<AudioSourceProvider>); |
| 89 }; | 87 }; |
| 90 | 88 |
| 91 } // namespace blink | 89 } // namespace blink |
| 92 | 90 |
| 93 #endif // ENABLE(WEB_AUDIO) | |
| 94 | |
| 95 #endif // MediaStreamAudioSourceNode_h | 91 #endif // MediaStreamAudioSourceNode_h |
| OLD | NEW |