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

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

Issue 1214463003: Split "Online" and "Offline" AudioContext processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring to ToT Created 5 years, 5 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 | Annotate | Revision Log
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 19 matching lines...) Expand all
30 #include "modules/mediastream/MediaStream.h" 30 #include "modules/mediastream/MediaStream.h"
31 #include "modules/webaudio/AudioSourceNode.h" 31 #include "modules/webaudio/AudioSourceNode.h"
32 #include "platform/audio/AudioSourceProvider.h" 32 #include "platform/audio/AudioSourceProvider.h"
33 #include "platform/audio/AudioSourceProviderClient.h" 33 #include "platform/audio/AudioSourceProviderClient.h"
34 #include "wtf/OwnPtr.h" 34 #include "wtf/OwnPtr.h"
35 #include "wtf/PassRefPtr.h" 35 #include "wtf/PassRefPtr.h"
36 #include "wtf/Threading.h" 36 #include "wtf/Threading.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class AudioContext; 40 class AbstractAudioContext;
41 41
42 class MediaStreamAudioSourceHandler final : public AudioHandler { 42 class MediaStreamAudioSourceHandler final : public AudioHandler {
43 public: 43 public:
44 static PassRefPtr<MediaStreamAudioSourceHandler> create(AudioNode&, MediaStr eam&, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>); 44 static PassRefPtr<MediaStreamAudioSourceHandler> create(AudioNode&, MediaStr eam&, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>);
45 ~MediaStreamAudioSourceHandler() override; 45 ~MediaStreamAudioSourceHandler() override;
46 46
47 MediaStream* mediaStream() { return m_mediaStream.get(); } 47 MediaStream* mediaStream() { return m_mediaStream.get(); }
48 48
49 // AudioHandler 49 // AudioHandler
50 void process(size_t framesToProcess) override; 50 void process(size_t framesToProcess) override;
(...skipping 17 matching lines...) Expand all
68 68
69 Mutex m_processLock; 69 Mutex m_processLock;
70 70
71 unsigned m_sourceNumberOfChannels; 71 unsigned m_sourceNumberOfChannels;
72 }; 72 };
73 73
74 class MediaStreamAudioSourceNode final : public AudioSourceNode, public AudioSou rceProviderClient { 74 class MediaStreamAudioSourceNode final : public AudioSourceNode, public AudioSou rceProviderClient {
75 DEFINE_WRAPPERTYPEINFO(); 75 DEFINE_WRAPPERTYPEINFO();
76 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamAudioSourceNode); 76 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamAudioSourceNode);
77 public: 77 public:
78 static MediaStreamAudioSourceNode* create(AudioContext&, MediaStream&, Media StreamTrack*, PassOwnPtr<AudioSourceProvider>); 78 static MediaStreamAudioSourceNode* create(AbstractAudioContext&, MediaStream &, MediaStreamTrack*, PassOwnPtr<AudioSourceProvider>);
79 DECLARE_VIRTUAL_TRACE(); 79 DECLARE_VIRTUAL_TRACE();
80 MediaStreamAudioSourceHandler& mediaStreamAudioSourceHandler() const; 80 MediaStreamAudioSourceHandler& mediaStreamAudioSourceHandler() const;
81 81
82 MediaStream* mediaStream() const; 82 MediaStream* mediaStream() const;
83 83
84 // AudioSourceProviderClient functions: 84 // AudioSourceProviderClient functions:
85 void setFormat(size_t numberOfChannels, float sampleRate) override; 85 void setFormat(size_t numberOfChannels, float sampleRate) override;
86 86
87 private: 87 private:
88 MediaStreamAudioSourceNode(AudioContext&, MediaStream&, MediaStreamTrack*, P assOwnPtr<AudioSourceProvider>); 88 MediaStreamAudioSourceNode(AbstractAudioContext&, MediaStream&, MediaStreamT rack*, PassOwnPtr<AudioSourceProvider>);
89 }; 89 };
90 90
91 } // namespace blink 91 } // namespace blink
92 92
93 #endif // ENABLE(WEB_AUDIO) 93 #endif // ENABLE(WEB_AUDIO)
94 94
95 #endif // MediaStreamAudioSourceNode_h 95 #endif // MediaStreamAudioSourceNode_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp ('k') | Source/modules/webaudio/MediaStreamAudioSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698