OLD | NEW |
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 #include "remoting/codec/audio_decoder_opus.h" | 5 #include "remoting/codec/audio_decoder_opus.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/time.h" | 9 #include "base/time/time.h" |
10 #include "remoting/proto/audio.pb.h" | 10 #include "remoting/proto/audio.pb.h" |
11 #include "third_party/opus/src/include/opus.h" | 11 #include "third_party/opus/src/include/opus.h" |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Maximum size of an Opus frame in milliseconds. | 17 // Maximum size of an Opus frame in milliseconds. |
18 const int kMaxFrameSizeMs = 120; | 18 const int kMaxFrameSizeMs = 120; |
19 | 19 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (!buffer_pos) { | 131 if (!buffer_pos) { |
132 return scoped_ptr<AudioPacket>(); | 132 return scoped_ptr<AudioPacket>(); |
133 } | 133 } |
134 | 134 |
135 decoded_data->resize(buffer_pos); | 135 decoded_data->resize(buffer_pos); |
136 | 136 |
137 return decoded_packet.Pass(); | 137 return decoded_packet.Pass(); |
138 } | 138 } |
139 | 139 |
140 } // namespace remoting | 140 } // namespace remoting |
OLD | NEW |