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

Side by Side Diff: media/audio/pulse/pulse_util.h

Issue 10952024: Adding pulseaudio input support to chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: switched to dynamic linking and addressed Andrew's comments. Created 7 years, 10 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
OLDNEW
(Empty)
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 #ifndef MEDIA_AUDIO_PULSE_PULSE_UTIL_H_
6 #define MEDIA_AUDIO_PULSE_PULSE_UTIL_H_
7
8 #include <pulse/pulseaudio.h>
9
10 #include "base/basictypes.h"
11 #include "media/audio/audio_device_name.h"
12 //#include "media/audio/pulse/pulse_wrapper.h"
13 #include "media/base/channel_layout.h"
14
15 namespace media {
16
17 class PulseWrapper;
18
19 // A helper class that acquires pa_threaded_mainloop_lock() while in scope.
20 class AutoPulseLock {
21 public:
22 AutoPulseLock(PulseWrapper* wrapper, pa_threaded_mainloop* pa_mainloop);
23 ~AutoPulseLock();
24
25 private:
26 PulseWrapper* wrapper_;
27 pa_threaded_mainloop* pa_mainloop_;
28 DISALLOW_COPY_AND_ASSIGN(AutoPulseLock);
29 };
30
31 pa_sample_format_t BitsToPASampleFormat(PulseWrapper* wrapper,
32 int bits_per_sample);
33
34 pa_channel_map ChannelLayoutToPAChannelMap(PulseWrapper* wrapper,
35 ChannelLayout channel_layout);
36
37 void WaitForOperationCompletion(PulseWrapper* wrapper,
38 pa_threaded_mainloop* pa_mainloop,
39 pa_operation* operation);
40
41 int GetHardwareLatencyInBytes(PulseWrapper* wrapper,
42 pa_stream* stream,
43 int sample_rate,
44 int bytes_per_frame);
45
46 } // namespace media
47
48 #endif // MEDIA_AUDIO_PULSE_PULSE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698