Upstream version 11.39.244.0
[platform/framework/web/crosswalk.git] / src / media / audio / audio_output_dispatcher.cc
1 // Copyright (c) 2012 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 "media/audio/audio_output_dispatcher.h"
6
7 #include "base/single_thread_task_runner.h"
8
9 namespace media {
10
11 AudioOutputDispatcher::AudioOutputDispatcher(
12     AudioManager* audio_manager,
13     const AudioParameters& params,
14     const std::string& device_id)
15     : audio_manager_(audio_manager),
16       task_runner_(audio_manager->GetTaskRunner()),
17       params_(params),
18       device_id_(device_id) {
19   // We expect to be instantiated on the audio thread.  Otherwise the
20   // |task_runner_| member will point to the wrong message loop!
21   DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread());
22 }
23
24 AudioOutputDispatcher::~AudioOutputDispatcher() {
25   DCHECK(task_runner_->BelongsToCurrentThread());
26 }
27
28 #if defined(OS_TIZEN)
29 void AudioOutputDispatcher::SetMediaStreamProperties(
30     const std::string& app_id,
31     const std::string& app_class) {
32   app_id_ = app_id;
33   app_class_ = app_class;
34 }
35 #endif
36
37 }  // namespace media