| 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_encoder_opus.h" | 5 #include "remoting/codec/audio_encoder_opus.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/time.h" | 9 #include "base/time/time.h" |
| 10 #include "media/base/audio_bus.h" | 10 #include "media/base/audio_bus.h" |
| 11 #include "media/base/multi_channel_resampler.h" | 11 #include "media/base/multi_channel_resampler.h" |
| 12 #include "third_party/opus/src/include/opus.h" | 12 #include "third_party/opus/src/include/opus.h" |
| 13 | 13 |
| 14 namespace remoting { | 14 namespace remoting { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // Output 160 kb/s bitrate. | 18 // Output 160 kb/s bitrate. |
| 19 const int kOutputBitrateBps = 160 * 1024; | 19 const int kOutputBitrateBps = 160 * 1024; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 // Return NULL if there's nothing in the packet. | 237 // Return NULL if there's nothing in the packet. |
| 238 if (encoded_packet->data_size() == 0) | 238 if (encoded_packet->data_size() == 0) |
| 239 return scoped_ptr<AudioPacket>(); | 239 return scoped_ptr<AudioPacket>(); |
| 240 | 240 |
| 241 return encoded_packet.Pass(); | 241 return encoded_packet.Pass(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace remoting | 244 } // namespace remoting |
| OLD | NEW |