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

Side by Side Diff: media/audio/audio_util.h

Issue 10837350: Revert 152406 - Introduce shared_memory_support media target for PPAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « media/audio/audio_output_device_unittest.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_UTIL_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_UTIL_H_
6 #define MEDIA_AUDIO_AUDIO_UTIL_H_ 6 #define MEDIA_AUDIO_AUDIO_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 MEDIA_EXPORT size_t GetAudioHardwareBufferSize(); 104 MEDIA_EXPORT size_t GetAudioHardwareBufferSize();
105 105
106 // Returns the channel layout for the specified audio input device. 106 // Returns the channel layout for the specified audio input device.
107 MEDIA_EXPORT ChannelLayout GetAudioInputHardwareChannelLayout( 107 MEDIA_EXPORT ChannelLayout GetAudioInputHardwareChannelLayout(
108 const std::string& device_id); 108 const std::string& device_id);
109 109
110 // Computes a buffer size based on the given |sample_rate|. Must be used in 110 // Computes a buffer size based on the given |sample_rate|. Must be used in
111 // conjunction with AUDIO_PCM_LINEAR. 111 // conjunction with AUDIO_PCM_LINEAR.
112 MEDIA_EXPORT size_t GetHighLatencyOutputBufferSize(int sample_rate); 112 MEDIA_EXPORT size_t GetHighLatencyOutputBufferSize(int sample_rate);
113 113
114 // Functions that handle data buffer passed between processes in the shared
115 // memory. Called on both IPC sides.
116
117 MEDIA_EXPORT uint32 TotalSharedMemorySizeInBytes(uint32 packet_size);
118 MEDIA_EXPORT uint32 PacketSizeSizeInBytes(uint32 shared_memory_created_size);
119 MEDIA_EXPORT uint32 GetActualDataSizeInBytes(base::SharedMemory* shared_memory,
120 uint32 shared_memory_size);
121 MEDIA_EXPORT void SetActualDataSizeInBytes(base::SharedMemory* shared_memory,
122 uint32 shared_memory_size,
123 uint32 actual_data_size);
124 MEDIA_EXPORT void SetUnknownDataSize(base::SharedMemory* shared_memory,
125 uint32 shared_memory_size);
126 MEDIA_EXPORT bool IsUnknownDataSize(base::SharedMemory* shared_memory,
127 uint32 shared_memory_size);
128
114 #if defined(OS_WIN) 129 #if defined(OS_WIN)
115 130
116 // Does Windows support WASAPI? We are checking in lot of places, and 131 // Does Windows support WASAPI? We are checking in lot of places, and
117 // sometimes check was written incorrectly, so move into separate function. 132 // sometimes check was written incorrectly, so move into separate function.
118 MEDIA_EXPORT bool IsWASAPISupported(); 133 MEDIA_EXPORT bool IsWASAPISupported();
119 134
120 // Returns number of buffers to be used by wave out. 135 // Returns number of buffers to be used by wave out.
121 MEDIA_EXPORT int NumberOfWaveOutBuffers(); 136 MEDIA_EXPORT int NumberOfWaveOutBuffers();
122 137
123 #endif // defined(OS_WIN) 138 #endif // defined(OS_WIN)
124 139
125 } // namespace media 140 } // namespace media
126 141
127 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ 142 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_device_unittest.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698