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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 2786363002: Revert of Loosening the coupling between WebRTC and //third_party/protobuf (Closed)
Patch Set: Created 3 years, 8 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 debug_state->event_msg->Clear(); 1872 debug_state->event_msg->Clear();
1873 1873
1874 return kNoError; 1874 return kNoError;
1875 } 1875 }
1876 1876
1877 int AudioProcessingImpl::WriteInitMessage() { 1877 int AudioProcessingImpl::WriteInitMessage() {
1878 debug_dump_.capture.event_msg->set_type(audioproc::Event::INIT); 1878 debug_dump_.capture.event_msg->set_type(audioproc::Event::INIT);
1879 audioproc::Init* msg = debug_dump_.capture.event_msg->mutable_init(); 1879 audioproc::Init* msg = debug_dump_.capture.event_msg->mutable_init();
1880 msg->set_sample_rate(formats_.api_format.input_stream().sample_rate_hz()); 1880 msg->set_sample_rate(formats_.api_format.input_stream().sample_rate_hz());
1881 1881
1882 msg->set_num_input_channels(static_cast<int32_t>( 1882 msg->set_num_input_channels(static_cast<google::protobuf::int32>(
1883 formats_.api_format.input_stream().num_channels())); 1883 formats_.api_format.input_stream().num_channels()));
1884 msg->set_num_output_channels(static_cast<int32_t>( 1884 msg->set_num_output_channels(static_cast<google::protobuf::int32>(
1885 formats_.api_format.output_stream().num_channels())); 1885 formats_.api_format.output_stream().num_channels()));
1886 msg->set_num_reverse_channels(static_cast<int32_t>( 1886 msg->set_num_reverse_channels(static_cast<google::protobuf::int32>(
1887 formats_.api_format.reverse_input_stream().num_channels())); 1887 formats_.api_format.reverse_input_stream().num_channels()));
1888 msg->set_reverse_sample_rate( 1888 msg->set_reverse_sample_rate(
1889 formats_.api_format.reverse_input_stream().sample_rate_hz()); 1889 formats_.api_format.reverse_input_stream().sample_rate_hz());
1890 msg->set_output_sample_rate( 1890 msg->set_output_sample_rate(
1891 formats_.api_format.output_stream().sample_rate_hz()); 1891 formats_.api_format.output_stream().sample_rate_hz());
1892 msg->set_reverse_output_sample_rate( 1892 msg->set_reverse_output_sample_rate(
1893 formats_.api_format.reverse_output_stream().sample_rate_hz()); 1893 formats_.api_format.reverse_output_stream().sample_rate_hz());
1894 msg->set_num_reverse_output_channels( 1894 msg->set_num_reverse_output_channels(
1895 formats_.api_format.reverse_output_stream().num_channels()); 1895 formats_.api_format.reverse_output_stream().num_channels());
1896 1896
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 experiments_description += "LevelController;"; 1946 experiments_description += "LevelController;";
1947 } 1947 }
1948 if (constants_.agc_clipped_level_min != kClippedLevelMin) { 1948 if (constants_.agc_clipped_level_min != kClippedLevelMin) {
1949 experiments_description += "AgcClippingLevelExperiment;"; 1949 experiments_description += "AgcClippingLevelExperiment;";
1950 } 1950 }
1951 if (capture_nonlocked_.echo_canceller3_enabled) { 1951 if (capture_nonlocked_.echo_canceller3_enabled) {
1952 experiments_description += "EchoCanceller3;"; 1952 experiments_description += "EchoCanceller3;";
1953 } 1953 }
1954 config.set_experiments_description(experiments_description); 1954 config.set_experiments_description(experiments_description);
1955 1955
1956 ProtoString serialized_config = config.SerializeAsString(); 1956 std::string serialized_config = config.SerializeAsString();
1957 if (!forced && 1957 if (!forced &&
1958 debug_dump_.capture.last_serialized_config == serialized_config) { 1958 debug_dump_.capture.last_serialized_config == serialized_config) {
1959 return kNoError; 1959 return kNoError;
1960 } 1960 }
1961 1961
1962 debug_dump_.capture.last_serialized_config = serialized_config; 1962 debug_dump_.capture.last_serialized_config = serialized_config;
1963 1963
1964 debug_dump_.capture.event_msg->set_type(audioproc::Event::CONFIG); 1964 debug_dump_.capture.event_msg->set_type(audioproc::Event::CONFIG);
1965 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); 1965 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config);
1966 1966
(...skipping 22 matching lines...) Expand all
1989 capture_processing_format(kSampleRate16kHz), 1989 capture_processing_format(kSampleRate16kHz),
1990 split_rate(kSampleRate16kHz) {} 1990 split_rate(kSampleRate16kHz) {}
1991 1991
1992 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; 1992 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default;
1993 1993
1994 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; 1994 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default;
1995 1995
1996 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; 1996 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default;
1997 1997
1998 } // namespace webrtc 1998 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.h ('k') | webrtc/modules/audio_processing/audio_processing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698