 Chromium Code Reviews
 Chromium Code Reviews Issue 2747863003:
  Loosening the coupling between WebRTC and //third_party/protobuf  (Closed)
    
  
    Issue 2747863003:
  Loosening the coupling between WebRTC and //third_party/protobuf  (Closed) 
  | OLD | NEW | 
|---|---|
| 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 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1868 debug_state->event_msg->Clear(); | 1868 debug_state->event_msg->Clear(); | 
| 1869 | 1869 | 
| 1870 return kNoError; | 1870 return kNoError; | 
| 1871 } | 1871 } | 
| 1872 | 1872 | 
| 1873 int AudioProcessingImpl::WriteInitMessage() { | 1873 int AudioProcessingImpl::WriteInitMessage() { | 
| 1874 debug_dump_.capture.event_msg->set_type(audioproc::Event::INIT); | 1874 debug_dump_.capture.event_msg->set_type(audioproc::Event::INIT); | 
| 1875 audioproc::Init* msg = debug_dump_.capture.event_msg->mutable_init(); | 1875 audioproc::Init* msg = debug_dump_.capture.event_msg->mutable_init(); | 
| 1876 msg->set_sample_rate(formats_.api_format.input_stream().sample_rate_hz()); | 1876 msg->set_sample_rate(formats_.api_format.input_stream().sample_rate_hz()); | 
| 1877 | 1877 | 
| 1878 msg->set_num_input_channels(static_cast<google::protobuf::int32>( | 1878 msg->set_num_input_channels(static_cast<int>( | 
| 
peah-webrtc
2017/03/17 10:43:24
Is this backwards compatible? Does this not change
 | |
| 1879 formats_.api_format.input_stream().num_channels())); | 1879 formats_.api_format.input_stream().num_channels())); | 
| 1880 msg->set_num_output_channels(static_cast<google::protobuf::int32>( | 1880 msg->set_num_output_channels(static_cast<int>( | 
| 1881 formats_.api_format.output_stream().num_channels())); | 1881 formats_.api_format.output_stream().num_channels())); | 
| 1882 msg->set_num_reverse_channels(static_cast<google::protobuf::int32>( | 1882 msg->set_num_reverse_channels(static_cast<int>( | 
| 1883 formats_.api_format.reverse_input_stream().num_channels())); | 1883 formats_.api_format.reverse_input_stream().num_channels())); | 
| 1884 msg->set_reverse_sample_rate( | 1884 msg->set_reverse_sample_rate( | 
| 1885 formats_.api_format.reverse_input_stream().sample_rate_hz()); | 1885 formats_.api_format.reverse_input_stream().sample_rate_hz()); | 
| 1886 msg->set_output_sample_rate( | 1886 msg->set_output_sample_rate( | 
| 1887 formats_.api_format.output_stream().sample_rate_hz()); | 1887 formats_.api_format.output_stream().sample_rate_hz()); | 
| 1888 msg->set_reverse_output_sample_rate( | 1888 msg->set_reverse_output_sample_rate( | 
| 1889 formats_.api_format.reverse_output_stream().sample_rate_hz()); | 1889 formats_.api_format.reverse_output_stream().sample_rate_hz()); | 
| 1890 msg->set_num_reverse_output_channels( | 1890 msg->set_num_reverse_output_channels( | 
| 1891 formats_.api_format.reverse_output_stream().num_channels()); | 1891 formats_.api_format.reverse_output_stream().num_channels()); | 
| 1892 | 1892 | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1942 experiments_description += "LevelController;"; | 1942 experiments_description += "LevelController;"; | 
| 1943 } | 1943 } | 
| 1944 if (constants_.agc_clipped_level_min != kClippedLevelMin) { | 1944 if (constants_.agc_clipped_level_min != kClippedLevelMin) { | 
| 1945 experiments_description += "AgcClippingLevelExperiment;"; | 1945 experiments_description += "AgcClippingLevelExperiment;"; | 
| 1946 } | 1946 } | 
| 1947 if (capture_nonlocked_.echo_canceller3_enabled) { | 1947 if (capture_nonlocked_.echo_canceller3_enabled) { | 
| 1948 experiments_description += "EchoCanceller3;"; | 1948 experiments_description += "EchoCanceller3;"; | 
| 1949 } | 1949 } | 
| 1950 config.set_experiments_description(experiments_description); | 1950 config.set_experiments_description(experiments_description); | 
| 1951 | 1951 | 
| 1952 std::string serialized_config = config.SerializeAsString(); | 1952 ProtoString serialized_config = config.SerializeAsString(); | 
| 1953 if (!forced && | 1953 if (!forced && | 
| 1954 debug_dump_.capture.last_serialized_config == serialized_config) { | 1954 debug_dump_.capture.last_serialized_config == serialized_config) { | 
| 1955 return kNoError; | 1955 return kNoError; | 
| 1956 } | 1956 } | 
| 1957 | 1957 | 
| 1958 debug_dump_.capture.last_serialized_config = serialized_config; | 1958 debug_dump_.capture.last_serialized_config = serialized_config; | 
| 1959 | 1959 | 
| 1960 debug_dump_.capture.event_msg->set_type(audioproc::Event::CONFIG); | 1960 debug_dump_.capture.event_msg->set_type(audioproc::Event::CONFIG); | 
| 1961 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1961 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 
| 1962 | 1962 | 
| (...skipping 22 matching lines...) Expand all Loading... | |
| 1985 capture_processing_format(kSampleRate16kHz), | 1985 capture_processing_format(kSampleRate16kHz), | 
| 1986 split_rate(kSampleRate16kHz) {} | 1986 split_rate(kSampleRate16kHz) {} | 
| 1987 | 1987 | 
| 1988 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1988 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 
| 1989 | 1989 | 
| 1990 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1990 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 
| 1991 | 1991 | 
| 1992 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1992 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 
| 1993 | 1993 | 
| 1994 } // namespace webrtc | 1994 } // namespace webrtc | 
| OLD | NEW |