OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 SERVICES_MEDIA_FRAMEWORK_LPCM_UTIL_H_ | 5 #ifndef SERVICES_MEDIA_FRAMEWORK_LPCM_UTIL_H_ |
6 #define SERVICES_MEDIA_FRAMEWORK_LPCM_UTIL_H_ | 6 #define SERVICES_MEDIA_FRAMEWORK_LPCM_UTIL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "services/media/framework/stream_type.h" | 10 #include "services/media/framework/stream_type.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual void Copy(const void* in, void* out, size_t frame_count) const = 0; | 26 virtual void Copy(const void* in, void* out, size_t frame_count) const = 0; |
27 | 27 |
28 // Mixes samples. | 28 // Mixes samples. |
29 virtual void Mix(const void* in, void* out, size_t frame_count) const = 0; | 29 virtual void Mix(const void* in, void* out, size_t frame_count) const = 0; |
30 | 30 |
31 // Interleaves non-interleaved samples. This assumes ffmpeg non-interleaved | 31 // Interleaves non-interleaved samples. This assumes ffmpeg non-interleaved |
32 // ("planar") layout, in which the buffer (in) is divided evenly into a | 32 // ("planar") layout, in which the buffer (in) is divided evenly into a |
33 // channel buffer per channel. The samples for each channel are contiguous | 33 // channel buffer per channel. The samples for each channel are contiguous |
34 // in the respective channel buffer with possible empty space at the end | 34 // in the respective channel buffer with possible empty space at the end |
35 // (hence the in_type_count and the frame_count). | 35 // (hence the in_type_count and the frame_count). |
36 virtual void Interleave( | 36 virtual void Interleave(const void* in, |
37 const void* in, | 37 size_t in_byte_count, |
38 size_t in_byte_count, | 38 void* out, |
39 void* out, | 39 size_t frame_count) const = 0; |
40 size_t frame_count) const = 0; | |
41 }; | 40 }; |
42 | 41 |
43 } // namespace media | 42 } // namespace media |
44 } // namespace mojo | 43 } // namespace mojo |
45 | 44 |
46 #endif // SERVICES_MEDIA_FRAMEWORK_LPCM_UTIL_H_ | 45 #endif // SERVICES_MEDIA_FRAMEWORK_LPCM_UTIL_H_ |
OLD | NEW |