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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp

Issue 1375773004: Revert of [Oilpan] Move MediaStream{Source|Component|Descriptor} to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 23 matching lines...) Expand all
34 #include "wtf/Locker.h" 34 #include "wtf/Locker.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 MediaStreamAudioDestinationHandler::MediaStreamAudioDestinationHandler(AudioNode & node, size_t numberOfChannels) 38 MediaStreamAudioDestinationHandler::MediaStreamAudioDestinationHandler(AudioNode & node, size_t numberOfChannels)
39 : AudioBasicInspectorHandler(NodeTypeMediaStreamAudioDestination, node, node .context()->sampleRate(), numberOfChannels) 39 : AudioBasicInspectorHandler(NodeTypeMediaStreamAudioDestination, node, node .context()->sampleRate(), numberOfChannels)
40 , m_mixBus(AudioBus::create(numberOfChannels, ProcessingSizeInFrames)) 40 , m_mixBus(AudioBus::create(numberOfChannels, ProcessingSizeInFrames))
41 { 41 {
42 m_source = MediaStreamSource::create("WebAudio-" + createCanonicalUUIDString (), MediaStreamSource::TypeAudio, "MediaStreamAudioDestinationNode", false, true , MediaStreamSource::ReadyStateLive, true); 42 m_source = MediaStreamSource::create("WebAudio-" + createCanonicalUUIDString (), MediaStreamSource::TypeAudio, "MediaStreamAudioDestinationNode", false, true , MediaStreamSource::ReadyStateLive, true);
43 MediaStreamSourceVector audioSources; 43 MediaStreamSourceVector audioSources;
44 audioSources.append(m_source.get()); 44 audioSources.append(m_source);
45 MediaStreamSourceVector videoSources; 45 MediaStreamSourceVector videoSources;
46 m_stream = MediaStream::create(node.context()->executionContext(), MediaStre amDescriptor::create(audioSources, videoSources)); 46 m_stream = MediaStream::create(node.context()->executionContext(), MediaStre amDescriptor::create(audioSources, videoSources));
47 MediaStreamCenter::instance().didCreateMediaStreamAndTracks(m_stream->descri ptor()); 47 MediaStreamCenter::instance().didCreateMediaStreamAndTracks(m_stream->descri ptor());
48 48
49 m_source->setAudioFormat(numberOfChannels, node.context()->sampleRate()); 49 m_source->setAudioFormat(numberOfChannels, node.context()->sampleRate());
50 50
51 initialize(); 51 initialize();
52 } 52 }
53 53
54 PassRefPtr<MediaStreamAudioDestinationHandler> MediaStreamAudioDestinationHandle r::create(AudioNode& node, size_t numberOfChannels) 54 PassRefPtr<MediaStreamAudioDestinationHandler> MediaStreamAudioDestinationHandle r::create(AudioNode& node, size_t numberOfChannels)
(...skipping 26 matching lines...) Expand all
81 } 81 }
82 82
83 MediaStream* MediaStreamAudioDestinationNode::stream() const 83 MediaStream* MediaStreamAudioDestinationNode::stream() const
84 { 84 {
85 return static_cast<MediaStreamAudioDestinationHandler&>(handler()).stream(); 85 return static_cast<MediaStreamAudioDestinationHandler&>(handler()).stream();
86 } 86 }
87 87
88 } // namespace blink 88 } // namespace blink
89 89
90 #endif // ENABLE(WEB_AUDIO) 90 #endif // ENABLE(WEB_AUDIO)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698