Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h

Issue 1865583002: Implement BaseAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
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 namespace blink { 36 namespace blink {
37 37
38 class AbstractAudioContext; 38 class BaseAudioContext;
39 39
40 class MediaStreamAudioSourceHandler final : public AudioHandler { 40 class MediaStreamAudioSourceHandler final : public AudioHandler {
41 public: 41 public:
42 static PassRefPtr<MediaStreamAudioSourceHandler> create(AudioNode&, MediaStr eam&, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>); 42 static PassRefPtr<MediaStreamAudioSourceHandler> create(AudioNode&, MediaStr eam&, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>);
43 ~MediaStreamAudioSourceHandler() override; 43 ~MediaStreamAudioSourceHandler() override;
44 44
45 MediaStream* getMediaStream() { return m_mediaStream.get(); } 45 MediaStream* getMediaStream() { return m_mediaStream.get(); }
46 46
47 // AudioHandler 47 // AudioHandler
48 void process(size_t framesToProcess) override; 48 void process(size_t framesToProcess) override;
(...skipping 17 matching lines...) Expand all
66 66
67 Mutex m_processLock; 67 Mutex m_processLock;
68 68
69 unsigned m_sourceNumberOfChannels; 69 unsigned m_sourceNumberOfChannels;
70 }; 70 };
71 71
72 class MediaStreamAudioSourceNode final : public AudioSourceNode, public AudioSou rceProviderClient { 72 class MediaStreamAudioSourceNode final : public AudioSourceNode, public AudioSou rceProviderClient {
73 DEFINE_WRAPPERTYPEINFO(); 73 DEFINE_WRAPPERTYPEINFO();
74 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamAudioSourceNode); 74 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamAudioSourceNode);
75 public: 75 public:
76 static MediaStreamAudioSourceNode* create(AbstractAudioContext&, MediaStream &, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>); 76 static MediaStreamAudioSourceNode* create(BaseAudioContext&, MediaStream&, M ediaStreamTrack*, PassOwnPtr<AudioSourceProvider>);
77 DECLARE_VIRTUAL_TRACE(); 77 DECLARE_VIRTUAL_TRACE();
78 MediaStreamAudioSourceHandler& mediaStreamAudioSourceHandler() const; 78 MediaStreamAudioSourceHandler& mediaStreamAudioSourceHandler() const;
79 79
80 MediaStream* getMediaStream() const; 80 MediaStream* getMediaStream() const;
81 81
82 // AudioSourceProviderClient functions: 82 // AudioSourceProviderClient functions:
83 void setFormat(size_t numberOfChannels, float sampleRate) override; 83 void setFormat(size_t numberOfChannels, float sampleRate) override;
84 84
85 private: 85 private:
86 MediaStreamAudioSourceNode(AbstractAudioContext&, MediaStream&, MediaStreamT rack*, PassOwnPtr<AudioSourceProvider>); 86 MediaStreamAudioSourceNode(BaseAudioContext&, MediaStream&, MediaStreamTrack *, PassOwnPtr<AudioSourceProvider>);
87 }; 87 };
88 88
89 } // namespace blink 89 } // namespace blink
90 90
91 #endif // MediaStreamAudioSourceNode_h 91 #endif // MediaStreamAudioSourceNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698