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

Side by Side Diff: Source/modules/webaudio/MediaElementAudioSourceNode.cpp

Issue 456273002: MediaElementAudioSourceNode::dispose() should call HTMLMediaElement::setAudioSourceNode(0) in oilpa… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 initialize(); 62 initialize();
63 } 63 }
64 64
65 MediaElementAudioSourceNode::~MediaElementAudioSourceNode() 65 MediaElementAudioSourceNode::~MediaElementAudioSourceNode()
66 { 66 {
67 ASSERT(!isInitialized()); 67 ASSERT(!isInitialized());
68 } 68 }
69 69
70 void MediaElementAudioSourceNode::dispose() 70 void MediaElementAudioSourceNode::dispose()
71 { 71 {
72 #if !ENABLE(OILPAN)
73 m_mediaElement->setAudioSourceNode(0); 72 m_mediaElement->setAudioSourceNode(0);
74 #endif
75 uninitialize(); 73 uninitialize();
76 AudioSourceNode::dispose(); 74 AudioSourceNode::dispose();
77 } 75 }
78 76
79 void MediaElementAudioSourceNode::setFormat(size_t numberOfChannels, float sourc eSampleRate) 77 void MediaElementAudioSourceNode::setFormat(size_t numberOfChannels, float sourc eSampleRate)
80 { 78 {
81 if (numberOfChannels != m_sourceNumberOfChannels || sourceSampleRate != m_so urceSampleRate) { 79 if (numberOfChannels != m_sourceNumberOfChannels || sourceSampleRate != m_so urceSampleRate) {
82 if (!numberOfChannels || numberOfChannels > AudioContext::maxNumberOfCha nnels() || sourceSampleRate < minSampleRate || sourceSampleRate > maxSampleRate) { 80 if (!numberOfChannels || numberOfChannels > AudioContext::maxNumberOfCha nnels() || sourceSampleRate < minSampleRate || sourceSampleRate > maxSampleRate) {
83 // process() will generate silence for these uninitialized values. 81 // process() will generate silence for these uninitialized values.
84 WTF_LOG(Media, "MediaElementAudioSourceNode::setFormat(%u, %f) - unh andled format change", static_cast<unsigned>(numberOfChannels), sourceSampleRate ); 82 WTF_LOG(Media, "MediaElementAudioSourceNode::setFormat(%u, %f) - unh andled format change", static_cast<unsigned>(numberOfChannels), sourceSampleRate );
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void MediaElementAudioSourceNode::trace(Visitor* visitor) 162 void MediaElementAudioSourceNode::trace(Visitor* visitor)
165 { 163 {
166 visitor->trace(m_mediaElement); 164 visitor->trace(m_mediaElement);
167 AudioSourceNode::trace(visitor); 165 AudioSourceNode::trace(visitor);
168 AudioSourceProviderClient::trace(visitor); 166 AudioSourceProviderClient::trace(visitor);
169 } 167 }
170 168
171 } // namespace blink 169 } // namespace blink
172 170
173 #endif // ENABLE(WEB_AUDIO) 171 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698