OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/media/audio_output_stream_impl.h" | |
6 | |
7 namespace content { | |
8 | |
9 AudioOutputStreamImpl::AudioOutputStreamImpl( | |
10 media::mojom::AudioOutputStreamRequest request, | |
11 int stream_id, | |
12 int renderer_frame_id, | |
13 AudioRendererHost* audio_renderer_host) | |
14 : binding_(this, std::move(request)), | |
15 stream_id_(stream_id), | |
16 renderer_frame_id_(renderer_frame_id), | |
17 audio_renderer_host_(audio_renderer_host) { | |
18 DCHECK_CURRENTLY_ON(BrowserThread::IO); | |
19 LOG(ERROR) << "stream_id" << stream_id_; | |
20 } | |
21 | |
22 AudioOutputStreamImpl::~AudioOutputStreamImpl() { | |
23 LOG(ERROR) << "~AudioOutputStreamImpl" << stream_id_; | |
24 // DCHECK_CURRENTLY_ON(BrowserThread::IO); | |
25 } | |
26 | |
27 void AudioOutputStreamImpl::Close() { | |
Henrik Grunell
2016/05/20 13:35:40
Do we do the same as here for all AudioOutputStrea
rchtara
2016/05/27 15:24:37
yes
| |
28 DCHECK_CURRENTLY_ON(BrowserThread::IO); | |
29 audio_renderer_host_->CloseStream(stream_id_); | |
30 audio_renderer_host_->get_audio_output_impl(renderer_frame_id_) | |
Henrik Grunell
2016/05/20 13:35:40
Same comment as in AudioOutputImpl: could the Audi
rchtara
2016/05/27 15:24:37
discussed offline about this
| |
31 ->RemoveStream(stream_id_); | |
32 LOG(ERROR) << "AudioOutputStreamImplClose" << stream_id_; | |
33 } | |
34 | |
35 // static | |
36 AudioOutputStreamImpl* AudioOutputStreamFactory::Factory( | |
37 media::mojom::AudioOutputStreamRequest request, | |
38 int stream_id, | |
39 int renderer_frame_id, | |
40 AudioRendererHost* audio_renderer_host) { | |
41 return new AudioOutputStreamImpl(std::move(request), stream_id, | |
42 renderer_frame_id, audio_renderer_host); | |
43 } | |
44 | |
45 } // namespace content | |
OLD | NEW |