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

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

Issue 2431653003: Add constructor for MediaStreamAudioSourceNode (Closed)
Patch Set: Created 4 years, 2 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 19 matching lines...) Expand all
30 #include "modules/webaudio/AudioSourceNode.h" 30 #include "modules/webaudio/AudioSourceNode.h"
31 #include "platform/audio/AudioSourceProvider.h" 31 #include "platform/audio/AudioSourceProvider.h"
32 #include "platform/audio/AudioSourceProviderClient.h" 32 #include "platform/audio/AudioSourceProviderClient.h"
33 #include "wtf/PassRefPtr.h" 33 #include "wtf/PassRefPtr.h"
34 #include "wtf/Threading.h" 34 #include "wtf/Threading.h"
35 #include <memory> 35 #include <memory>
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class BaseAudioContext; 39 class BaseAudioContext;
40 class MediaStreamAudioSourceOptions;
40 41
41 class MediaStreamAudioSourceHandler final : public AudioHandler { 42 class MediaStreamAudioSourceHandler final : public AudioHandler {
42 public: 43 public:
43 static PassRefPtr<MediaStreamAudioSourceHandler> create( 44 static PassRefPtr<MediaStreamAudioSourceHandler> create(
44 AudioNode&, 45 AudioNode&,
45 MediaStream&, 46 MediaStream&,
46 MediaStreamTrack*, 47 MediaStreamTrack*,
47 std::unique_ptr<AudioSourceProvider>); 48 std::unique_ptr<AudioSourceProvider>);
48 ~MediaStreamAudioSourceHandler() override; 49 ~MediaStreamAudioSourceHandler() override;
49 50
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 82
82 class MediaStreamAudioSourceNode final : public AudioSourceNode, 83 class MediaStreamAudioSourceNode final : public AudioSourceNode,
83 public AudioSourceProviderClient { 84 public AudioSourceProviderClient {
84 DEFINE_WRAPPERTYPEINFO(); 85 DEFINE_WRAPPERTYPEINFO();
85 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamAudioSourceNode); 86 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamAudioSourceNode);
86 87
87 public: 88 public:
88 static MediaStreamAudioSourceNode* create(BaseAudioContext&, 89 static MediaStreamAudioSourceNode* create(BaseAudioContext&,
89 MediaStream&, 90 MediaStream&,
90 ExceptionState&); 91 ExceptionState&);
92 static MediaStreamAudioSourceNode* create(
93 BaseAudioContext*,
94 const MediaStreamAudioSourceOptions&,
95 ExceptionState&);
96
91 DECLARE_VIRTUAL_TRACE(); 97 DECLARE_VIRTUAL_TRACE();
92 MediaStreamAudioSourceHandler& mediaStreamAudioSourceHandler() const; 98 MediaStreamAudioSourceHandler& mediaStreamAudioSourceHandler() const;
93 99
94 MediaStream* getMediaStream() const; 100 MediaStream* getMediaStream() const;
95 101
96 // AudioSourceProviderClient functions: 102 // AudioSourceProviderClient functions:
97 void setFormat(size_t numberOfChannels, float sampleRate) override; 103 void setFormat(size_t numberOfChannels, float sampleRate) override;
98 104
99 private: 105 private:
100 MediaStreamAudioSourceNode(BaseAudioContext&, 106 MediaStreamAudioSourceNode(BaseAudioContext&,
101 MediaStream&, 107 MediaStream&,
102 MediaStreamTrack*, 108 MediaStreamTrack*,
103 std::unique_ptr<AudioSourceProvider>); 109 std::unique_ptr<AudioSourceProvider>);
104 }; 110 };
105 111
106 } // namespace blink 112 } // namespace blink
107 113
108 #endif // MediaStreamAudioSourceNode_h 114 #endif // MediaStreamAudioSourceNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698