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