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

Side by Side Diff: webrtc/modules/audio_coding/codecs/audio_format_conversion.cc

Issue 3011943002: Move optional.h to webrtc/api/ (Closed)
Patch Set: Created 3 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" 11 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h"
12 12
13 #include <string.h> 13 #include <string.h>
14 14
15 #include "webrtc/api/array_view.h" 15 #include "webrtc/api/array_view.h"
16 #include "webrtc/api/optional.h"
16 #include "webrtc/rtc_base/checks.h" 17 #include "webrtc/rtc_base/checks.h"
17 #include "webrtc/rtc_base/optional.h"
18 #include "webrtc/rtc_base/safe_conversions.h" 18 #include "webrtc/rtc_base/safe_conversions.h"
19 #include "webrtc/rtc_base/sanitizer.h" 19 #include "webrtc/rtc_base/sanitizer.h"
20 20
21 namespace webrtc { 21 namespace webrtc {
22 22
23 namespace { 23 namespace {
24 24
25 CodecInst MakeCodecInst(int payload_type, 25 CodecInst MakeCodecInst(int payload_type,
26 const char* name, 26 const char* name,
27 int sample_rate, 27 int sample_rate,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return 1; // Default to mono. 79 return 1; // Default to mono.
80 }(); 80 }();
81 return MakeCodecInst(payload_type, "opus", 48000, num_channels); 81 return MakeCodecInst(payload_type, "opus", 48000, num_channels);
82 } else { 82 } else {
83 return MakeCodecInst(payload_type, audio_format.name.c_str(), 83 return MakeCodecInst(payload_type, audio_format.name.c_str(),
84 audio_format.clockrate_hz, audio_format.num_channels); 84 audio_format.clockrate_hz, audio_format.num_channels);
85 } 85 }
86 } 86 }
87 87
88 } // namespace webrtc 88 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698