| 6 |
| #include <algorithm> |
| 7 |
| 8 | #include <google/protobuf/io/coded_stream.h> |
| 9 | #include <google/protobuf/extension_set.h> |
| 10 | #include <google/protobuf/wire_format_lite.h> |
| 11 | #include <google/protobuf/io/zero_copy_stream_impl_lite.h> |
| 12 | // @@protoc_insertion_point(includes) |
| 13 | #include <google/protobuf/port_def.inc> |
| 14 |
| 15 | PROTOBUF_PRAGMA_INIT_SEG |
| 16 |
| 17 | namespace _pb = ::PROTOBUF_NAMESPACE_ID; |
| 18 | namespace _pbi = _pb::internal; |
| 19 |
| 20 | namespace webrtc { |
| 21 | namespace audioproc { |
| 22 | PROTOBUF_CONSTEXPR Init::Init( |
| 23 | ::_pbi::ConstantInitialized) |
| 24 | : sample_rate_(0) |
| 25 | , device_sample_rate_(0) |
| 26 | , num_input_channels_(0) |
| 27 | , num_output_channels_(0) |
| 28 | , num_reverse_channels_(0) |
| 29 | , reverse_sample_rate_(0) |
| 30 | , output_sample_rate_(0) |
| 31 | , reverse_output_sample_rate_(0) |
| 32 | , timestamp_ms_(int64_t{0}) |
| 33 | , num_reverse_output_channels_(0){} |
| 34 | struct InitDefaultTypeInternal { |
| 35 | PROTOBUF_CONSTEXPR InitDefaultTypeInternal() |
| 36 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 37 | ~InitDefaultTypeInternal() {} |
| 38 | union { |
| 39 | Init _instance; |
| 40 | }; |
| 41 | }; |
| 42 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InitDefaultTypeInternal _Init_default_instance_; |
| 43 | PROTOBUF_CONSTEXPR ReverseStream::ReverseStream( |
| 44 | ::_pbi::ConstantInitialized) |
| 45 | : channel_() |
| 46 | , data_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){} |
| 47 | struct ReverseStreamDefaultTypeInternal { |
| 48 | PROTOBUF_CONSTEXPR ReverseStreamDefaultTypeInternal() |
| 49 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 50 | ~ReverseStreamDefaultTypeInternal() {} |
| 51 | union { |
| 52 | ReverseStream _instance; |
| 53 | }; |
| 54 | }; |
| 55 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReverseStreamDefaultTypeInternal _ReverseStream_default_instance_; |
| 56 | PROTOBUF_CONSTEXPR Stream::Stream( |
| 57 | ::_pbi::ConstantInitialized) |
| 58 | : input_channel_() |
| 59 | , output_channel_() |
| 60 | , input_data_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) |
| 61 | , output_data_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) |
| 62 | , delay_(0) |
| 63 | , drift_(0) |
| 64 | , applied_input_volume_(0) |
| 65 | , keypress_(false){} |
| 66 | struct StreamDefaultTypeInternal { |
| 67 | PROTOBUF_CONSTEXPR StreamDefaultTypeInternal() |
| 68 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 69 | ~StreamDefaultTypeInternal() {} |
| 70 | union { |
| 71 | Stream _instance; |
| 72 | }; |
| 73 | }; |
| 74 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StreamDefaultTypeInternal _Stream_default_instance_; |
| 75 | PROTOBUF_CONSTEXPR Config::Config( |
| 76 | ::_pbi::ConstantInitialized) |
| 77 | : experiments_description_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) |
| 78 | , aec_enabled_(false) |
| 79 | , aec_delay_agnostic_enabled_(false) |
| 80 | , aec_drift_compensation_enabled_(false) |
| 81 | , aec_extended_filter_enabled_(false) |
| 82 | , aec_suppression_level_(0) |
| 83 | , aecm_routing_mode_(0) |
| 84 | , aecm_enabled_(false) |
| 85 | , aecm_comfort_noise_enabled_(false) |
| 86 | , agc_enabled_(false) |
| 87 | , agc_limiter_enabled_(false) |
| 88 | , agc_mode_(0) |
| 89 | , noise_robust_agc_enabled_(false) |
| 90 | , hpf_enabled_(false) |
| 91 | , ns_enabled_(false) |
| 92 | , transient_suppression_enabled_(false) |
| 93 | , ns_level_(0) |
| 94 | , pre_amplifier_enabled_(false) |
| 95 | , pre_amplifier_fixed_gain_factor_(0){} |
| 96 | struct ConfigDefaultTypeInternal { |
| 97 | PROTOBUF_CONSTEXPR ConfigDefaultTypeInternal() |
| 98 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 99 | ~ConfigDefaultTypeInternal() {} |
| 100 | union { |
| 101 | Config _instance; |
| 102 | }; |
| 103 | }; |
| 104 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConfigDefaultTypeInternal _Config_default_instance_; |
| 105 | PROTOBUF_CONSTEXPR PlayoutAudioDeviceInfo::PlayoutAudioDeviceInfo( |
| 106 | ::_pbi::ConstantInitialized) |
| 107 | : id_(0) |
| 108 | , max_volume_(0){} |
| 109 | struct PlayoutAudioDeviceInfoDefaultTypeInternal { |
| 110 | PROTOBUF_CONSTEXPR PlayoutAudioDeviceInfoDefaultTypeInternal() |
| 111 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 112 | ~PlayoutAudioDeviceInfoDefaultTypeInternal() {} |
| 113 | union { |
| 114 | PlayoutAudioDeviceInfo _instance; |
| 115 | }; |
| 116 | }; |
| 117 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlayoutAudioDeviceInfoDefaultTypeInternal _PlayoutAudioDeviceInfo_default_instance_; |
| 118 | PROTOBUF_CONSTEXPR RuntimeSetting::RuntimeSetting( |
| 119 | ::_pbi::ConstantInitialized) |
| 120 | : playout_audio_device_change_(nullptr) |
| 121 | , capture_pre_gain_(0) |
| 122 | , custom_render_processing_setting_(0) |
| 123 | , capture_fixed_post_gain_(0) |
| 124 | , playout_volume_change_(0) |
| 125 | , capture_output_used_(false) |
| 126 | , capture_post_gain_(0){} |
| 127 | struct RuntimeSettingDefaultTypeInternal { |
| 128 | PROTOBUF_CONSTEXPR RuntimeSettingDefaultTypeInternal() |
| 129 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 130 | ~RuntimeSettingDefaultTypeInternal() {} |
| 131 | union { |
| 132 | RuntimeSetting _instance; |
| 133 | }; |
| 134 | }; |
| 135 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RuntimeSettingDefaultTypeInternal _RuntimeSetting_default_instance_; |
| 136 | PROTOBUF_CONSTEXPR Event::Event( |
| 137 | ::_pbi::ConstantInitialized) |
| 138 | : init_(nullptr) |
| 139 | , reverse_stream_(nullptr) |
| 140 | , stream_(nullptr) |
| 141 | , config_(nullptr) |
| 142 | , runtime_setting_(nullptr) |
| 143 | , type_(0) |
| 144 | {} |
| 145 | struct EventDefaultTypeInternal { |
| 146 | PROTOBUF_CONSTEXPR EventDefaultTypeInternal() |
| 147 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 148 | ~EventDefaultTypeInternal() {} |
| 149 | union { |
| 150 | Event _instance; |
| 151 | }; |
| 152 | }; |
| 153 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EventDefaultTypeInternal _Event_default_instance_; |
| 154 | } // namespace audioproc |
| 155 | } // namespace webrtc |
| 156 | namespace webrtc { |
| 157 | namespace audioproc { |
| 158 | bool Event_Type_IsValid(int value) { |
| 159 | switch (value) { |
| 160 | case 0: |
| 161 | case 1: |
| 162 | case 2: |
| 163 | case 3: |
| 164 | case 4: |
| 165 | case 5: |
| 166 | return true; |
| 167 | default: |
| 168 | return false; |
| 169 | } |
| 170 | } |
| 171 |
| 172 | static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Event_Type_strings[6] = {}; |
| 173 |
| 174 | static const char Event_Type_names[] = |
| 175 | "CONFIG" |
| 176 | "INIT" |
| 177 | "REVERSE_STREAM" |
| 178 | "RUNTIME_SETTING" |
| 179 | "STREAM" |
| 180 | "UNKNOWN_EVENT"; |
| 181 |
| 182 | static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Event_Type_entries[] = { |
| 183 | { {Event_Type_names + 0, 6}, 3 }, |
| 184 | { {Event_Type_names + 6, 4}, 0 }, |
| 185 | { {Event_Type_names + 10, 14}, 1 }, |
| 186 | { {Event_Type_names + 24, 15}, 5 }, |
| 187 | { {Event_Type_names + 39, 6}, 2 }, |
| 188 | { {Event_Type_names + 45, 13}, 4 }, |
| 189 | }; |
| 190 |
| 191 | static const int Event_Type_entries_by_number[] = { |
| 192 | 1, // 0 -> INIT |
| 193 | 2, // 1 -> REVERSE_STREAM |
| 194 | 4, // 2 -> STREAM |
| 195 | 0, // 3 -> CONFIG |
| 196 | 5, // 4 -> UNKNOWN_EVENT |
| 197 | 3, // 5 -> RUNTIME_SETTING |
| 198 | }; |
| 199 |
| 200 | const std::string& Event_Type_Name( |
| 201 | Event_Type value) { |
| 202 | static const bool dummy = |
| 203 | ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( |
| 204 | Event_Type_entries, |
| 205 | Event_Type_entries_by_number, |
| 206 | 6, Event_Type_strings); |
| 207 | (void) dummy; |
| 208 | int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( |
| 209 | Event_Type_entries, |
| 210 | Event_Type_entries_by_number, |
| 211 | 6, value); |
| 212 | return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : |
| 213 | Event_Type_strings[idx].get(); |
| 214 | } |
| 215 | bool Event_Type_Parse( |
| 216 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Event_Type* value) { |
| 217 | int int_value; |
| 218 | bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( |
| 219 | Event_Type_entries, 6, name, &int_value); |
| 220 | if (success) { |
| 221 | *value = static_cast<Event_Type>(int_value); |
| 222 | } |
| 223 | return success; |
| 224 | } |
| 225 | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) |
| 226 | constexpr Event_Type Event::INIT; |
| 227 | constexpr Event_Type Event::REVERSE_STREAM; |
| 228 | constexpr Event_Type Event::STREAM; |
| 229 | constexpr Event_Type Event::CONFIG; |
| 230 | constexpr Event_Type Event::UNKNOWN_EVENT; |
| 231 | constexpr Event_Type Event::RUNTIME_SETTING; |
| 232 | constexpr Event_Type Event::Type_MIN; |
| 233 | constexpr Event_Type Event::Type_MAX; |
| 234 | constexpr int Event::Type_ARRAYSIZE; |
| 235 | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) |
| 236 |
| 237 | // =================================================================== |
| 238 |
| 239 | class Init::_Internal { |
| 240 | public: |
| 241 | using HasBits = decltype(std::declval<Init>()._has_bits_); |
| 242 | static void set_has_sample_rate(HasBits* has_bits) { |
| 243 | (*has_bits)[0] |= 1u; |
| 244 | } |
| 245 | static void set_has_device_sample_rate(HasBits* has_bits) { |
| 246 | (*has_bits)[0] |= 2u; |
| 247 | } |
| 248 | static void set_has_num_input_channels(HasBits* has_bits) { |
| 249 | (*has_bits)[0] |= 4u; |
| 250 | } |
| 251 | static void set_has_num_output_channels(HasBits* has_bits) { |
| 252 | (*has_bits)[0] |= 8u; |
| 253 | } |
| 254 | static void set_has_num_reverse_channels(HasBits* has_bits) { |
| 255 | (*has_bits)[0] |= 16u; |
| 256 | } |
| 257 | static void set_has_reverse_sample_rate(HasBits* has_bits) { |
| 258 | (*has_bits)[0] |= 32u; |
| 259 | } |
| 260 | static void set_has_output_sample_rate(HasBits* has_bits) { |
| 261 | (*has_bits)[0] |= 64u; |
| 262 | } |
| 263 | static void set_has_reverse_output_sample_rate(HasBits* has_bits) { |
| 264 | (*has_bits)[0] |= 128u; |
| 265 | } |
| 266 | static void set_has_num_reverse_output_channels(HasBits* has_bits) { |
| 267 | (*has_bits)[0] |= 512u; |
| 268 | } |
| 269 | static void set_has_timestamp_ms(HasBits* has_bits) { |
| 270 | (*has_bits)[0] |= 256u; |
| 271 | } |
| 272 | }; |
| 273 |
| 274 | Init::Init(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 275 | bool is_message_owned) |
| 276 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { |
| 277 | SharedCtor(); |
| 278 | // @@protoc_insertion_point(arena_constructor:webrtc.audioproc.Init) |
| 279 | } |
| 280 | Init::Init(const Init& from) |
| 281 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| 282 | _has_bits_(from._has_bits_) { |
| 283 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 284 | ::memcpy(&sample_rate_, &from.sample_rate_, |
| 285 | static_cast<size_t>(reinterpret_cast<char*>(&num_reverse_output_channels_) - |
| 286 | reinterpret_cast<char*>(&sample_rate_)) + sizeof(num_reverse_output_channels_)); |
| 287 | // @@protoc_insertion_point(copy_constructor:webrtc.audioproc.Init) |
| 288 | } |
| 289 |
| 290 | inline void Init::SharedCtor() { |
| 291 | ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| 292 | reinterpret_cast<char*>(&sample_rate_) - reinterpret_cast<char*>(this)), |
| 293 | 0, static_cast<size_t>(reinterpret_cast<char*>(&num_reverse_output_channels_) - |
| 294 | reinterpret_cast<char*>(&sample_rate_)) + sizeof(num_reverse_output_channels_)); |
| 295 | } |
| 296 |
| 297 | Init::~Init() { |
| 298 | // @@protoc_insertion_point(destructor:webrtc.audioproc.Init) |
| 299 | if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { |
| 300 | (void)arena; |
| 301 | return; |
| 302 | } |
| 303 | SharedDtor(); |
| 304 | } |
| 305 |
| 306 | inline void Init::SharedDtor() { |
| 307 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 308 | } |
| 309 |
| 310 | void Init::SetCachedSize(int size) const { |
| 311 | _cached_size_.Set(size); |
| 312 | } |
| 313 |
| 314 | void Init::Clear() { |
| 315 | // @@protoc_insertion_point(message_clear_start:webrtc.audioproc.Init) |
| 316 | uint32_t cached_has_bits = 0; |
| 317 | // Prevent compiler warnings about cached_has_bits being unused |
| 318 | (void) cached_has_bits; |
| 319 |
| 320 | cached_has_bits = _has_bits_[0]; |
| 321 | if (cached_has_bits & 0x000000ffu) { |
| 322 | ::memset(&sample_rate_, 0, static_cast<size_t>( |
| 323 | reinterpret_cast<char*>(&reverse_output_sample_rate_) - |
| 324 | reinterpret_cast<char*>(&sample_rate_)) + sizeof(reverse_output_sample_rate_)); |
| 325 | } |
| 326 | if (cached_has_bits & 0x00000300u) { |
| 327 | ::memset(×tamp_ms_, 0, static_cast<size_t>( |
| 328 | reinterpret_cast<char*>(&num_reverse_output_channels_) - |
| 329 | reinterpret_cast<char*>(×tamp_ms_)) + sizeof(num_reverse_output_channels_)); |
| 330 | } |
| 331 | _has_bits_.Clear(); |
| 332 | _internal_metadata_.Clear<std::string>(); |
| 333 | } |
| 334 |
| 335 | const char* Init::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 336 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 337 | _Internal::HasBits has_bits{}; |
| 338 | while (!ctx->Done(&ptr)) { |
| 339 | uint32_t tag; |
| 340 | ptr = ::_pbi::ReadTag(ptr, &tag); |
| 341 | switch (tag >> 3) { |
| 342 | // optional int32 sample_rate = 1; |
| 343 | case 1: |
| 344 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
| 345 | _Internal::set_has_sample_rate(&has_bits); |
| 346 | sample_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 347 | CHK_(ptr); |
| 348 | } else |
| 349 | goto handle_unusual; |
| 350 | continue; |
| 351 | // optional int32 device_sample_rate = 2 [deprecated = true]; |
| 352 | case 2: |
| 353 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
| 354 | _Internal::set_has_device_sample_rate(&has_bits); |
| 355 | device_sample_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 356 | CHK_(ptr); |
| 357 | } else |
| 358 | goto handle_unusual; |
| 359 | continue; |
| 360 | // optional int32 num_input_channels = 3; |
| 361 | case 3: |
| 362 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { |
| 363 | _Internal::set_has_num_input_channels(&has_bits); |
| 364 | num_input_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 365 | CHK_(ptr); |
| 366 | } else |
| 367 | goto handle_unusual; |
| 368 | continue; |
| 369 | // optional int32 num_output_channels = 4; |
| 370 | case 4: |
| 371 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { |
| 372 | _Internal::set_has_num_output_channels(&has_bits); |
| 373 | num_output_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 374 | CHK_(ptr); |
| 375 | } else |
| 376 | goto handle_unusual; |
| 377 | continue; |
| 378 | // optional int32 num_reverse_channels = 5; |
| 379 | case 5: |
| 380 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { |
| 381 | _Internal::set_has_num_reverse_channels(&has_bits); |
| 382 | num_reverse_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 383 | CHK_(ptr); |
| 384 | } else |
| 385 | goto handle_unusual; |
| 386 | continue; |
| 387 | // optional int32 reverse_sample_rate = 6; |
| 388 | case 6: |
| 389 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { |
| 390 | _Internal::set_has_reverse_sample_rate(&has_bits); |
| 391 | reverse_sample_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 392 | CHK_(ptr); |
| 393 | } else |
| 394 | goto handle_unusual; |
| 395 | continue; |
| 396 | // optional int32 output_sample_rate = 7; |
| 397 | case 7: |
| 398 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) { |
| 399 | _Internal::set_has_output_sample_rate(&has_bits); |
| 400 | output_sample_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 401 | CHK_(ptr); |
| 402 | } else |
| 403 | goto handle_unusual; |
| 404 | continue; |
| 405 | // optional int32 reverse_output_sample_rate = 8; |
| 406 | case 8: |
| 407 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) { |
| 408 | _Internal::set_has_reverse_output_sample_rate(&has_bits); |
| 409 | reverse_output_sample_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 410 | CHK_(ptr); |
| 411 | } else |
| 412 | goto handle_unusual; |
| 413 | continue; |
| 414 | // optional int32 num_reverse_output_channels = 9; |
| 415 | case 9: |
| 416 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) { |
| 417 | _Internal::set_has_num_reverse_output_channels(&has_bits); |
| 418 | num_reverse_output_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 419 | CHK_(ptr); |
| 420 | } else |
| 421 | goto handle_unusual; |
| 422 | continue; |
| 423 | // optional int64 timestamp_ms = 10; |
| 424 | case 10: |
| 425 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) { |
| 426 | _Internal::set_has_timestamp_ms(&has_bits); |
| 427 | timestamp_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 428 | CHK_(ptr); |
| 429 | } else |
| 430 | goto handle_unusual; |
| 431 | continue; |
| 432 | default: |
| 433 | goto handle_unusual; |
| 434 | } // switch |
| 435 | handle_unusual: |
| 436 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 437 | CHK_(ptr); |
| 438 | ctx->SetLastTag(tag); |
| 439 | goto message_done; |
| 440 | } |
| 441 | ptr = UnknownFieldParse( |
| 442 | tag, |
| 443 | _internal_metadata_.mutable_unknown_fields<std::string>(), |
| 444 | ptr, ctx); |
| 445 | CHK_(ptr != nullptr); |
| 446 | } // while |
| 447 | message_done: |
| 448 | _has_bits_.Or(has_bits); |
| 449 | return ptr; |
| 450 | failure: |
| 451 | ptr = nullptr; |
| 452 | goto message_done; |
| 453 | #undef CHK_ |
| 454 | } |
| 455 |
| 456 | uint8_t* Init::_InternalSerialize( |
| 457 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 458 | // @@protoc_insertion_point(serialize_to_array_start:webrtc.audioproc.Init) |
| 459 | uint32_t cached_has_bits = 0; |
| 460 | (void) cached_has_bits; |
| 461 |
| 462 | cached_has_bits = _has_bits_[0]; |
| 463 | // optional int32 sample_rate = 1; |
| 464 | if (cached_has_bits & 0x00000001u) { |
| 465 | target = stream->EnsureSpace(target); |
| 466 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_sample_rate(), target); |
| 467 | } |
| 468 |
| 469 | // optional int32 device_sample_rate = 2 [deprecated = true]; |
| 470 | if (cached_has_bits & 0x00000002u) { |
| 471 | target = stream->EnsureSpace(target); |
| 472 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_device_sample_rate(), target); |
| 473 | } |
| 474 |
| 475 | // optional int32 num_input_channels = 3; |
| 476 | if (cached_has_bits & 0x00000004u) { |
| 477 | target = stream->EnsureSpace(target); |
| 478 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_input_channels(), target); |
| 479 | } |
| 480 |
| 481 | // optional int32 num_output_channels = 4; |
| 482 | if (cached_has_bits & 0x00000008u) { |
| 483 | target = stream->EnsureSpace(target); |
| 484 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_num_output_channels(), target); |
| 485 | } |
| 486 |
| 487 | // optional int32 num_reverse_channels = 5; |
| 488 | if (cached_has_bits & 0x00000010u) { |
| 489 | target = stream->EnsureSpace(target); |
| 490 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_num_reverse_channels(), target); |
| 491 | } |
| 492 |
| 493 | // optional int32 reverse_sample_rate = 6; |
| 494 | if (cached_has_bits & 0x00000020u) { |
| 495 | target = stream->EnsureSpace(target); |
| 496 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_reverse_sample_rate(), target); |
| 497 | } |
| 498 |
| 499 | // optional int32 output_sample_rate = 7; |
| 500 | if (cached_has_bits & 0x00000040u) { |
| 501 | target = stream->EnsureSpace(target); |
| 502 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_output_sample_rate(), target); |
| 503 | } |
| 504 |
| 505 | // optional int32 reverse_output_sample_rate = 8; |
| 506 | if (cached_has_bits & 0x00000080u) { |
| 507 | target = stream->EnsureSpace(target); |
| 508 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_reverse_output_sample_rate(), target); |
| 509 | } |
| 510 |
| 511 | // optional int32 num_reverse_output_channels = 9; |
| 512 | if (cached_has_bits & 0x00000200u) { |
| 513 | target = stream->EnsureSpace(target); |
| 514 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_num_reverse_output_channels(), target); |
| 515 | } |
| 516 |
| 517 | // optional int64 timestamp_ms = 10; |
| 518 | if (cached_has_bits & 0x00000100u) { |
| 519 | target = stream->EnsureSpace(target); |
| 520 | target = ::_pbi::WireFormatLite::WriteInt64ToArray(10, this->_internal_timestamp_ms(), target); |
| 521 | } |
| 522 |
| 523 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 524 | target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), |
| 525 | static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); |
| 526 | } |
| 527 | // @@protoc_insertion_point(serialize_to_array_end:webrtc.audioproc.Init) |
| 528 | return target; |
| 529 | } |
| 530 |
| 531 | size_t Init::ByteSizeLong() const { |
| 532 | // @@protoc_insertion_point(message_byte_size_start:webrtc.audioproc.Init) |
| 533 | size_t total_size = 0; |
| 534 |
| 535 | uint32_t cached_has_bits = 0; |
| 536 | // Prevent compiler warnings about cached_has_bits being unused |
| 537 | (void) cached_has_bits; |
| 538 |
| 539 | cached_has_bits = _has_bits_[0]; |
| 540 | if (cached_has_bits & 0x000000ffu) { |
| 541 | // optional int32 sample_rate = 1; |
| 542 | if (cached_has_bits & 0x00000001u) { |
| 543 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_sample_rate()); |
| 544 | } |
| 545 |
| 546 | // optional int32 device_sample_rate = 2 [deprecated = true]; |
| 547 | if (cached_has_bits & 0x00000002u) { |
| 548 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_device_sample_rate()); |
| 549 | } |
| 550 |
| 551 | // optional int32 num_input_channels = 3; |
| 552 | if (cached_has_bits & 0x00000004u) { |
| 553 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_input_channels()); |
| 554 | } |
| 555 |
| 556 | // optional int32 num_output_channels = 4; |
| 557 | if (cached_has_bits & 0x00000008u) { |
| 558 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_output_channels()); |
| 559 | } |
| 560 |
| 561 | // optional int32 num_reverse_channels = 5; |
| 562 | if (cached_has_bits & 0x00000010u) { |
| 563 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_reverse_channels()); |
| 564 | } |
| 565 |
| 566 | // optional int32 reverse_sample_rate = 6; |
| 567 | if (cached_has_bits & 0x00000020u) { |
| 568 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_reverse_sample_rate()); |
| 569 | } |
| 570 |
| 571 | // optional int32 output_sample_rate = 7; |
| 572 | if (cached_has_bits & 0x00000040u) { |
| 573 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_output_sample_rate()); |
| 574 | } |
| 575 |
| 576 | // optional int32 reverse_output_sample_rate = 8; |
| 577 | if (cached_has_bits & 0x00000080u) { |
| 578 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_reverse_output_sample_rate()); |
| 579 | } |
| 580 |
| 581 | } |
| 582 | if (cached_has_bits & 0x00000300u) { |
| 583 | // optional int64 timestamp_ms = 10; |
| 584 | if (cached_has_bits & 0x00000100u) { |
| 585 | total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_timestamp_ms()); |
| 586 | } |
| 587 |
| 588 | // optional int32 num_reverse_output_channels = 9; |
| 589 | if (cached_has_bits & 0x00000200u) { |
| 590 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_reverse_output_channels()); |
| 591 | } |
| 592 |
| 593 | } |
| 594 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 595 | total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); |
| 596 | } |
| 597 | int cached_size = ::_pbi::ToCachedSize(total_size); |
| 598 | SetCachedSize(cached_size); |
| 599 | return total_size; |
| 600 | } |
| 601 |
| 602 | void Init::CheckTypeAndMergeFrom( |
| 603 | const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| 604 | MergeFrom(*::_pbi::DownCast<const Init*>( |
| 605 | &from)); |
| 606 | } |
| 607 |
| 608 | void Init::MergeFrom(const Init& from) { |
| 609 | // @@protoc_insertion_point(class_specific_merge_from_start:webrtc.audioproc.Init) |
| 610 | GOOGLE_DCHECK_NE(&from, this); |
| 611 | uint32_t cached_has_bits = 0; |
| 612 | (void) cached_has_bits; |
| 613 |
| 614 | cached_has_bits = from._has_bits_[0]; |
| 615 | if (cached_has_bits & 0x000000ffu) { |
| 616 | if (cached_has_bits & 0x00000001u) { |
| 617 | sample_rate_ = from.sample_rate_; |
| 618 | } |
| 619 | if (cached_has_bits & 0x00000002u) { |
| 620 | device_sample_rate_ = from.device_sample_rate_; |
| 621 | } |
| 622 | if (cached_has_bits & 0x00000004u) { |
| 623 | num_input_channels_ = from.num_input_channels_; |
| 624 | } |
| 625 | if (cached_has_bits & 0x00000008u) { |
| 626 | num_output_channels_ = from.num_output_channels_; |
| 627 | } |
| 628 | if (cached_has_bits & 0x00000010u) { |
| 629 | num_reverse_channels_ = from.num_reverse_channels_; |
| 630 | } |
| 631 | if (cached_has_bits & 0x00000020u) { |
| 632 | reverse_sample_rate_ = from.reverse_sample_rate_; |
| 633 | } |
| 634 | if (cached_has_bits & 0x00000040u) { |
| 635 | output_sample_rate_ = from.output_sample_rate_; |
| 636 | } |
| 637 | if (cached_has_bits & 0x00000080u) { |
| 638 | reverse_output_sample_rate_ = from.reverse_output_sample_rate_; |
| 639 | } |
| 640 | _has_bits_[0] |= cached_has_bits; |
| 641 | } |
| 642 | if (cached_has_bits & 0x00000300u) { |
| 643 | if (cached_has_bits & 0x00000100u) { |
| 644 | timestamp_ms_ = from.timestamp_ms_; |
| 645 | } |
| 646 | if (cached_has_bits & 0x00000200u) { |
| 647 | num_reverse_output_channels_ = from.num_reverse_output_channels_; |
| 648 | } |
| 649 | _has_bits_[0] |= cached_has_bits; |
| 650 | } |
| 651 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 652 | } |
| 653 |
| 654 | void Init::CopyFrom(const Init& from) { |
| 655 | // @@protoc_insertion_point(class_specific_copy_from_start:webrtc.audioproc.Init) |
| 656 | if (&from == this) return; |
| 657 | Clear(); |
| 658 | MergeFrom(from); |
| 659 | } |
| 660 |
| 661 | bool Init::IsInitialized() const { |
| 662 | return true; |
| 663 | } |
| 664 |
| 665 | void Init::InternalSwap(Init* other) { |
| 666 | using std::swap; |
| 667 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| 668 | swap(_has_bits_[0], other->_has_bits_[0]); |
| 669 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| 670 | PROTOBUF_FIELD_OFFSET(Init, num_reverse_output_channels_) |
| 671 | + sizeof(Init::num_reverse_output_channels_) |
| 672 | - PROTOBUF_FIELD_OFFSET(Init, sample_rate_)>( |
| 673 | reinterpret_cast<char*>(&sample_rate_), |
| 674 | reinterpret_cast<char*>(&other->sample_rate_)); |
| 675 | } |
| 676 |
| 677 | std::string Init::GetTypeName() const { |
| 678 | return "webrtc.audioproc.Init"; |
| 679 | } |
| 680 |
| 681 |
| 682 | // =================================================================== |
| 683 |
| 684 | class ReverseStream::_Internal { |
| 685 | public: |
| 686 | using HasBits = decltype(std::declval<ReverseStream>()._has_bits_); |
| 687 | static void set_has_data(HasBits* has_bits) { |
| 688 | (*has_bits)[0] |= 1u; |
| 689 | } |
| 690 | }; |
| 691 |
| 692 | ReverseStream::ReverseStream(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 693 | bool is_message_owned) |
| 694 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), |
| 695 | channel_(arena) { |
| 696 | SharedCtor(); |
| 697 | // @@protoc_insertion_point(arena_constructor:webrtc.audioproc.ReverseStream) |
| 698 | } |
| 699 | ReverseStream::ReverseStream(const ReverseStream& from) |
| 700 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| 701 | _has_bits_(from._has_bits_), |
| 702 | channel_(from.channel_) { |
| 703 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 704 | data_.InitDefault(); |
| 705 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 706 | data_.Set("", GetArenaForAllocation()); |
| 707 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 708 | if (from._internal_has_data()) { |
| 709 | data_.Set(from._internal_data(), |
| 710 | GetArenaForAllocation()); |
| 711 | } |
| 712 | // @@protoc_insertion_point(copy_constructor:webrtc.audioproc.ReverseStream) |
| 713 | } |
| 714 |
| 715 | inline void ReverseStream::SharedCtor() { |
| 716 | data_.InitDefault(); |
| 717 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 718 | data_.Set("", GetArenaForAllocation()); |
| 719 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 720 | } |
| 721 |
| 722 | ReverseStream::~ReverseStream() { |
| 723 | // @@protoc_insertion_point(destructor:webrtc.audioproc.ReverseStream) |
| 724 | if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { |
| 725 | (void)arena; |
| 726 | return; |
| 727 | } |
| 728 | SharedDtor(); |
| 729 | } |
| 730 |
| 731 | inline void ReverseStream::SharedDtor() { |
| 732 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 733 | data_.Destroy(); |
| 734 | } |
| 735 |
| 736 | void ReverseStream::SetCachedSize(int size) const { |
| 737 | _cached_size_.Set(size); |
| 738 | } |
| 739 |
| 740 | void ReverseStream::Clear() { |
| 741 | // @@protoc_insertion_point(message_clear_start:webrtc.audioproc.ReverseStream) |
| 742 | uint32_t cached_has_bits = 0; |
| 743 | // Prevent compiler warnings about cached_has_bits being unused |
| 744 | (void) cached_has_bits; |
| 745 |
| 746 | channel_.Clear(); |
| 747 | cached_has_bits = _has_bits_[0]; |
| 748 | if (cached_has_bits & 0x00000001u) { |
| 749 | data_.ClearNonDefaultToEmpty(); |
| 750 | } |
| 751 | _has_bits_.Clear(); |
| 752 | _internal_metadata_.Clear<std::string>(); |
| 753 | } |
| 754 |
| 755 | const char* ReverseStream::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 756 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 757 | _Internal::HasBits has_bits{}; |
| 758 | while (!ctx->Done(&ptr)) { |
| 759 | uint32_t tag; |
| 760 | ptr = ::_pbi::ReadTag(ptr, &tag); |
| 761 | switch (tag >> 3) { |
| 762 | // optional bytes data = 1; |
| 763 | case 1: |
| 764 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
| 765 | auto str = _internal_mutable_data(); |
| 766 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
| 767 | CHK_(ptr); |
| 768 | } else |
| 769 | goto handle_unusual; |
| 770 | continue; |
| 771 | // repeated bytes channel = 2; |
| 772 | case 2: |
| 773 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
| 774 | ptr -= 1; |
| 775 | do { |
| 776 | ptr += 1; |
| 777 | auto str = _internal_add_channel(); |
| 778 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
| 779 | CHK_(ptr); |
| 780 | if (!ctx->DataAvailable(ptr)) break; |
| 781 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); |
| 782 | } else |
| 783 | goto handle_unusual; |
| 784 | continue; |
| 785 | default: |
| 786 | goto handle_unusual; |
| 787 | } // switch |
| 788 | handle_unusual: |
| 789 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 790 | CHK_(ptr); |
| 791 | ctx->SetLastTag(tag); |
| 792 | goto message_done; |
| 793 | } |
| 794 | ptr = UnknownFieldParse( |
| 795 | tag, |
| 796 | _internal_metadata_.mutable_unknown_fields<std::string>(), |
| 797 | ptr, ctx); |
| 798 | CHK_(ptr != nullptr); |
| 799 | } // while |
| 800 | message_done: |
| 801 | _has_bits_.Or(has_bits); |
| 802 | return ptr; |
| 803 | failure: |
| 804 | ptr = nullptr; |
| 805 | goto message_done; |
| 806 | #undef CHK_ |
| 807 | } |
| 808 |
| 809 | uint8_t* ReverseStream::_InternalSerialize( |
| 810 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 811 | // @@protoc_insertion_point(serialize_to_array_start:webrtc.audioproc.ReverseStream) |
| 812 | uint32_t cached_has_bits = 0; |
| 813 | (void) cached_has_bits; |
| 814 |
| 815 | cached_has_bits = _has_bits_[0]; |
| 816 | // optional bytes data = 1; |
| 817 | if (cached_has_bits & 0x00000001u) { |
| 818 | target = stream->WriteBytesMaybeAliased( |
| 819 | 1, this->_internal_data(), target); |
| 820 | } |
| 821 |
| 822 | // repeated bytes channel = 2; |
| 823 | for (int i = 0, n = this->_internal_channel_size(); i < n; i++) { |
| 824 | const auto& s = this->_internal_channel(i); |
| 825 | target = stream->WriteBytes(2, s, target); |
| 826 | } |
| 827 |
| 828 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 829 | target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), |
| 830 | static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); |
| 831 | } |
| 832 | // @@protoc_insertion_point(serialize_to_array_end:webrtc.audioproc.ReverseStream) |
| 833 | return target; |
| 834 | } |
| 835 |
| 836 | size_t ReverseStream::ByteSizeLong() const { |
| 837 | // @@protoc_insertion_point(message_byte_size_start:webrtc.audioproc.ReverseStream) |
| 838 | size_t total_size = 0; |
| 839 |
| 840 | uint32_t cached_has_bits = 0; |
| 841 | // Prevent compiler warnings about cached_has_bits being unused |
| 842 | (void) cached_has_bits; |
| 843 |
| 844 | // repeated bytes channel = 2; |
| 845 | total_size += 1 * |
| 846 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(channel_.size()); |
| 847 | for (int i = 0, n = channel_.size(); i < n; i++) { |
| 848 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
| 849 | channel_.Get(i)); |
| 850 | } |
| 851 |
| 852 | // optional bytes data = 1; |
| 853 | cached_has_bits = _has_bits_[0]; |
| 854 | if (cached_has_bits & 0x00000001u) { |
| 855 | total_size += 1 + |
| 856 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
| 857 | this->_internal_data()); |
| 858 | } |
| 859 |
| 860 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 861 | total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); |
| 862 | } |
| 863 | int cached_size = ::_pbi::ToCachedSize(total_size); |
| 864 | SetCachedSize(cached_size); |
| 865 | return total_size; |
| 866 | } |
| 867 |
| 868 | void ReverseStream::CheckTypeAndMergeFrom( |
| 869 | const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| 870 | MergeFrom(*::_pbi::DownCast<const ReverseStream*>( |
| 871 | &from)); |
| 872 | } |
| 873 |
| 874 | void ReverseStream::MergeFrom(const ReverseStream& from) { |
| 875 | // @@protoc_insertion_point(class_specific_merge_from_start:webrtc.audioproc.ReverseStream) |
| 876 | GOOGLE_DCHECK_NE(&from, this); |
| 877 | uint32_t cached_has_bits = 0; |
| 878 | (void) cached_has_bits; |
| 879 |
| 880 | channel_.MergeFrom(from.channel_); |
| 881 | if (from._internal_has_data()) { |
| 882 | _internal_set_data(from._internal_data()); |
| 883 | } |
| 884 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 885 | } |
| 886 |
| 887 | void ReverseStream::CopyFrom(const ReverseStream& from) { |
| 888 | // @@protoc_insertion_point(class_specific_copy_from_start:webrtc.audioproc.ReverseStream) |
| 889 | if (&from == this) return; |
| 890 | Clear(); |
| 891 | MergeFrom(from); |
| 892 | } |
| 893 |
| 894 | bool ReverseStream::IsInitialized() const { |
| 895 | return true; |
| 896 | } |
| 897 |
| 898 | void ReverseStream::InternalSwap(ReverseStream* other) { |
| 899 | using std::swap; |
| 900 | auto* lhs_arena = GetArenaForAllocation(); |
| 901 | auto* rhs_arena = other->GetArenaForAllocation(); |
| 902 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| 903 | swap(_has_bits_[0], other->_has_bits_[0]); |
| 904 | channel_.InternalSwap(&other->channel_); |
| 905 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| 906 | &data_, lhs_arena, |
| 907 | &other->data_, rhs_arena |
| 908 | ); |
| 909 | } |
| 910 |
| 911 | std::string ReverseStream::GetTypeName() const { |
| 912 | return "webrtc.audioproc.ReverseStream"; |
| 913 | } |
| 914 |
| 915 |
| 916 | // =================================================================== |
| 917 |
| 918 | class Stream::_Internal { |
| 919 | public: |
| 920 | using HasBits = decltype(std::declval<Stream>()._has_bits_); |
| 921 | static void set_has_input_data(HasBits* has_bits) { |
| 922 | (*has_bits)[0] |= 1u; |
| 923 | } |
| 924 | static void set_has_output_data(HasBits* has_bits) { |
| 925 | (*has_bits)[0] |= 2u; |
| 926 | } |
| 927 | static void set_has_delay(HasBits* has_bits) { |
| 928 | (*has_bits)[0] |= 4u; |
| 929 | } |
| 930 | static void set_has_drift(HasBits* has_bits) { |
| 931 | (*has_bits)[0] |= 8u; |
| 932 | } |
| 933 | static void set_has_applied_input_volume(HasBits* has_bits) { |
| 934 | (*has_bits)[0] |= 16u; |
| 935 | } |
| 936 | static void set_has_keypress(HasBits* has_bits) { |
| 937 | (*has_bits)[0] |= 32u; |
| 938 | } |
| 939 | }; |
| 940 |
| 941 | Stream::Stream(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 942 | bool is_message_owned) |
| 943 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), |
| 944 | input_channel_(arena), |
| 945 | output_channel_(arena) { |
| 946 | SharedCtor(); |
| 947 | // @@protoc_insertion_point(arena_constructor:webrtc.audioproc.Stream) |
| 948 | } |
| 949 | Stream::Stream(const Stream& from) |
| 950 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| 951 | _has_bits_(from._has_bits_), |
| 952 | input_channel_(from.input_channel_), |
| 953 | output_channel_(from.output_channel_) { |
| 954 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 955 | input_data_.InitDefault(); |
| 956 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 957 | input_data_.Set("", GetArenaForAllocation()); |
| 958 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 959 | if (from._internal_has_input_data()) { |
| 960 | input_data_.Set(from._internal_input_data(), |
| 961 | GetArenaForAllocation()); |
| 962 | } |
| 963 | output_data_.InitDefault(); |
| 964 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 965 | output_data_.Set("", GetArenaForAllocation()); |
| 966 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 967 | if (from._internal_has_output_data()) { |
| 968 | output_data_.Set(from._internal_output_data(), |
| 969 | GetArenaForAllocation()); |
| 970 | } |
| 971 | ::memcpy(&delay_, &from.delay_, |
| 972 | static_cast<size_t>(reinterpret_cast<char*>(&keypress_) - |
| 973 | reinterpret_cast<char*>(&delay_)) + sizeof(keypress_)); |
| 974 | // @@protoc_insertion_point(copy_constructor:webrtc.audioproc.Stream) |
| 975 | } |
| 976 |
| 977 | inline void Stream::SharedCtor() { |
| 978 | input_data_.InitDefault(); |
| 979 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 980 | input_data_.Set("", GetArenaForAllocation()); |
| 981 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 982 | output_data_.InitDefault(); |
| 983 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 984 | output_data_.Set("", GetArenaForAllocation()); |
| 985 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 986 | ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| 987 | reinterpret_cast<char*>(&delay_) - reinterpret_cast<char*>(this)), |
| 988 | 0, static_cast<size_t>(reinterpret_cast<char*>(&keypress_) - |
| 989 | reinterpret_cast<char*>(&delay_)) + sizeof(keypress_)); |
| 990 | } |
| 991 |
| 992 | Stream::~Stream() { |
| 993 | // @@protoc_insertion_point(destructor:webrtc.audioproc.Stream) |
| 994 | if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { |
| 995 | (void)arena; |
| 996 | return; |
| 997 | } |
| 998 | SharedDtor(); |
| 999 | } |
| 1000 |
| 1001 | inline void Stream::SharedDtor() { |
| 1002 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 1003 | input_data_.Destroy(); |
| 1004 | output_data_.Destroy(); |
| 1005 | } |
| 1006 |
| 1007 | void Stream::SetCachedSize(int size) const { |
| 1008 | _cached_size_.Set(size); |
| 1009 | } |
| 1010 |
| 1011 | void Stream::Clear() { |
| 1012 | // @@protoc_insertion_point(message_clear_start:webrtc.audioproc.Stream) |
| 1013 | uint32_t cached_has_bits = 0; |
| 1014 | // Prevent compiler warnings about cached_has_bits being unused |
| 1015 | (void) cached_has_bits; |
| 1016 |
| 1017 | input_channel_.Clear(); |
| 1018 | output_channel_.Clear(); |
| 1019 | cached_has_bits = _has_bits_[0]; |
| 1020 | if (cached_has_bits & 0x00000003u) { |
| 1021 | if (cached_has_bits & 0x00000001u) { |
| 1022 | input_data_.ClearNonDefaultToEmpty(); |
| 1023 | } |
| 1024 | if (cached_has_bits & 0x00000002u) { |
| 1025 | output_data_.ClearNonDefaultToEmpty(); |
| 1026 | } |
| 1027 | } |
| 1028 | if (cached_has_bits & 0x0000003cu) { |
| 1029 | ::memset(&delay_, 0, static_cast<size_t>( |
| 1030 | reinterpret_cast<char*>(&keypress_) - |
| 1031 | reinterpret_cast<char*>(&delay_)) + sizeof(keypress_)); |
| 1032 | } |
| 1033 | _has_bits_.Clear(); |
| 1034 | _internal_metadata_.Clear<std::string>(); |
| 1035 | } |
| 1036 |
| 1037 | const char* Stream::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 1038 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 1039 | _Internal::HasBits has_bits{}; |
| 1040 | while (!ctx->Done(&ptr)) { |
| 1041 | uint32_t tag; |
| 1042 | ptr = ::_pbi::ReadTag(ptr, &tag); |
| 1043 | switch (tag >> 3) { |
| 1044 | // optional bytes input_data = 1; |
| 1045 | case 1: |
| 1046 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
| 1047 | auto str = _internal_mutable_input_data(); |
| 1048 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
| 1049 | CHK_(ptr); |
| 1050 | } else |
| 1051 | goto handle_unusual; |
| 1052 | continue; |
| 1053 | // optional bytes output_data = 2; |
| 1054 | case 2: |
| 1055 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
| 1056 | auto str = _internal_mutable_output_data(); |
| 1057 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
| 1058 | CHK_(ptr); |
| 1059 | } else |
| 1060 | goto handle_unusual; |
| 1061 | continue; |
| 1062 | // optional int32 delay = 3; |
| 1063 | case 3: |
| 1064 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { |
| 1065 | _Internal::set_has_delay(&has_bits); |
| 1066 | delay_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 1067 | CHK_(ptr); |
| 1068 | } else |
| 1069 | goto handle_unusual; |
| 1070 | continue; |
| 1071 | // optional sint32 drift = 4; |
| 1072 | case 4: |
| 1073 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { |
| 1074 | _Internal::set_has_drift(&has_bits); |
| 1075 | drift_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarintZigZag32(&ptr); |
| 1076 | CHK_(ptr); |
| 1077 | } else |
| 1078 | goto handle_unusual; |
| 1079 | continue; |
| 1080 | // optional int32 applied_input_volume = 5; |
| 1081 | case 5: |
| 1082 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { |
| 1083 | _Internal::set_has_applied_input_volume(&has_bits); |
| 1084 | applied_input_volume_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 1085 | CHK_(ptr); |
| 1086 | } else |
| 1087 | goto handle_unusual; |
| 1088 | continue; |
| 1089 | // optional bool keypress = 6; |
| 1090 | case 6: |
| 1091 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { |
| 1092 | _Internal::set_has_keypress(&has_bits); |
| 1093 | keypress_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1094 | CHK_(ptr); |
| 1095 | } else |
| 1096 | goto handle_unusual; |
| 1097 | continue; |
| 1098 | // repeated bytes input_channel = 7; |
| 1099 | case 7: |
| 1100 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) { |
| 1101 | ptr -= 1; |
| 1102 | do { |
| 1103 | ptr += 1; |
| 1104 | auto str = _internal_add_input_channel(); |
| 1105 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
| 1106 | CHK_(ptr); |
| 1107 | if (!ctx->DataAvailable(ptr)) break; |
| 1108 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr)); |
| 1109 | } else |
| 1110 | goto handle_unusual; |
| 1111 | continue; |
| 1112 | // repeated bytes output_channel = 8; |
| 1113 | case 8: |
| 1114 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) { |
| 1115 | ptr -= 1; |
| 1116 | do { |
| 1117 | ptr += 1; |
| 1118 | auto str = _internal_add_output_channel(); |
| 1119 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
| 1120 | CHK_(ptr); |
| 1121 | if (!ctx->DataAvailable(ptr)) break; |
| 1122 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); |
| 1123 | } else |
| 1124 | goto handle_unusual; |
| 1125 | continue; |
| 1126 | default: |
| 1127 | goto handle_unusual; |
| 1128 | } // switch |
| 1129 | handle_unusual: |
| 1130 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 1131 | CHK_(ptr); |
| 1132 | ctx->SetLastTag(tag); |
| 1133 | goto message_done; |
| 1134 | } |
| 1135 | ptr = UnknownFieldParse( |
| 1136 | tag, |
| 1137 | _internal_metadata_.mutable_unknown_fields<std::string>(), |
| 1138 | ptr, ctx); |
| 1139 | CHK_(ptr != nullptr); |
| 1140 | } // while |
| 1141 | message_done: |
| 1142 | _has_bits_.Or(has_bits); |
| 1143 | return ptr; |
| 1144 | failure: |
| 1145 | ptr = nullptr; |
| 1146 | goto message_done; |
| 1147 | #undef CHK_ |
| 1148 | } |
| 1149 |
| 1150 | uint8_t* Stream::_InternalSerialize( |
| 1151 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 1152 | // @@protoc_insertion_point(serialize_to_array_start:webrtc.audioproc.Stream) |
| 1153 | uint32_t cached_has_bits = 0; |
| 1154 | (void) cached_has_bits; |
| 1155 |
| 1156 | cached_has_bits = _has_bits_[0]; |
| 1157 | // optional bytes input_data = 1; |
| 1158 | if (cached_has_bits & 0x00000001u) { |
| 1159 | target = stream->WriteBytesMaybeAliased( |
| 1160 | 1, this->_internal_input_data(), target); |
| 1161 | } |
| 1162 |
| 1163 | // optional bytes output_data = 2; |
| 1164 | if (cached_has_bits & 0x00000002u) { |
| 1165 | target = stream->WriteBytesMaybeAliased( |
| 1166 | 2, this->_internal_output_data(), target); |
| 1167 | } |
| 1168 |
| 1169 | // optional int32 delay = 3; |
| 1170 | if (cached_has_bits & 0x00000004u) { |
| 1171 | target = stream->EnsureSpace(target); |
| 1172 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_delay(), target); |
| 1173 | } |
| 1174 |
| 1175 | // optional sint32 drift = 4; |
| 1176 | if (cached_has_bits & 0x00000008u) { |
| 1177 | target = stream->EnsureSpace(target); |
| 1178 | target = ::_pbi::WireFormatLite::WriteSInt32ToArray(4, this->_internal_drift(), target); |
| 1179 | } |
| 1180 |
| 1181 | // optional int32 applied_input_volume = 5; |
| 1182 | if (cached_has_bits & 0x00000010u) { |
| 1183 | target = stream->EnsureSpace(target); |
| 1184 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_applied_input_volume(), target); |
| 1185 | } |
| 1186 |
| 1187 | // optional bool keypress = 6; |
| 1188 | if (cached_has_bits & 0x00000020u) { |
| 1189 | target = stream->EnsureSpace(target); |
| 1190 | target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_keypress(), target); |
| 1191 | } |
| 1192 |
| 1193 | // repeated bytes input_channel = 7; |
| 1194 | for (int i = 0, n = this->_internal_input_channel_size(); i < n; i++) { |
| 1195 | const auto& s = this->_internal_input_channel(i); |
| 1196 | target = stream->WriteBytes(7, s, target); |
| 1197 | } |
| 1198 |
| 1199 | // repeated bytes output_channel = 8; |
| 1200 | for (int i = 0, n = this->_internal_output_channel_size(); i < n; i++) { |
| 1201 | const auto& s = this->_internal_output_channel(i); |
| 1202 | target = stream->WriteBytes(8, s, target); |
| 1203 | } |
| 1204 |
| 1205 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 1206 | target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), |
| 1207 | static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); |
| 1208 | } |
| 1209 | // @@protoc_insertion_point(serialize_to_array_end:webrtc.audioproc.Stream) |
| 1210 | return target; |
| 1211 | } |
| 1212 |
| 1213 | size_t Stream::ByteSizeLong() const { |
| 1214 | // @@protoc_insertion_point(message_byte_size_start:webrtc.audioproc.Stream) |
| 1215 | size_t total_size = 0; |
| 1216 |
| 1217 | uint32_t cached_has_bits = 0; |
| 1218 | // Prevent compiler warnings about cached_has_bits being unused |
| 1219 | (void) cached_has_bits; |
| 1220 |
| 1221 | // repeated bytes input_channel = 7; |
| 1222 | total_size += 1 * |
| 1223 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_channel_.size()); |
| 1224 | for (int i = 0, n = input_channel_.size(); i < n; i++) { |
| 1225 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
| 1226 | input_channel_.Get(i)); |
| 1227 | } |
| 1228 |
| 1229 | // repeated bytes output_channel = 8; |
| 1230 | total_size += 1 * |
| 1231 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(output_channel_.size()); |
| 1232 | for (int i = 0, n = output_channel_.size(); i < n; i++) { |
| 1233 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
| 1234 | output_channel_.Get(i)); |
| 1235 | } |
| 1236 |
| 1237 | cached_has_bits = _has_bits_[0]; |
| 1238 | if (cached_has_bits & 0x0000003fu) { |
| 1239 | // optional bytes input_data = 1; |
| 1240 | if (cached_has_bits & 0x00000001u) { |
| 1241 | total_size += 1 + |
| 1242 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
| 1243 | this->_internal_input_data()); |
| 1244 | } |
| 1245 |
| 1246 | // optional bytes output_data = 2; |
| 1247 | if (cached_has_bits & 0x00000002u) { |
| 1248 | total_size += 1 + |
| 1249 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
| 1250 | this->_internal_output_data()); |
| 1251 | } |
| 1252 |
| 1253 | // optional int32 delay = 3; |
| 1254 | if (cached_has_bits & 0x00000004u) { |
| 1255 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_delay()); |
| 1256 | } |
| 1257 |
| 1258 | // optional sint32 drift = 4; |
| 1259 | if (cached_has_bits & 0x00000008u) { |
| 1260 | total_size += ::_pbi::WireFormatLite::SInt32SizePlusOne(this->_internal_drift()); |
| 1261 | } |
| 1262 |
| 1263 | // optional int32 applied_input_volume = 5; |
| 1264 | if (cached_has_bits & 0x00000010u) { |
| 1265 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_applied_input_volume()); |
| 1266 | } |
| 1267 |
| 1268 | // optional bool keypress = 6; |
| 1269 | if (cached_has_bits & 0x00000020u) { |
| 1270 | total_size += 1 + 1; |
| 1271 | } |
| 1272 |
| 1273 | } |
| 1274 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 1275 | total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); |
| 1276 | } |
| 1277 | int cached_size = ::_pbi::ToCachedSize(total_size); |
| 1278 | SetCachedSize(cached_size); |
| 1279 | return total_size; |
| 1280 | } |
| 1281 |
| 1282 | void Stream::CheckTypeAndMergeFrom( |
| 1283 | const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| 1284 | MergeFrom(*::_pbi::DownCast<const Stream*>( |
| 1285 | &from)); |
| 1286 | } |
| 1287 |
| 1288 | void Stream::MergeFrom(const Stream& from) { |
| 1289 | // @@protoc_insertion_point(class_specific_merge_from_start:webrtc.audioproc.Stream) |
| 1290 | GOOGLE_DCHECK_NE(&from, this); |
| 1291 | uint32_t cached_has_bits = 0; |
| 1292 | (void) cached_has_bits; |
| 1293 |
| 1294 | input_channel_.MergeFrom(from.input_channel_); |
| 1295 | output_channel_.MergeFrom(from.output_channel_); |
| 1296 | cached_has_bits = from._has_bits_[0]; |
| 1297 | if (cached_has_bits & 0x0000003fu) { |
| 1298 | if (cached_has_bits & 0x00000001u) { |
| 1299 | _internal_set_input_data(from._internal_input_data()); |
| 1300 | } |
| 1301 | if (cached_has_bits & 0x00000002u) { |
| 1302 | _internal_set_output_data(from._internal_output_data()); |
| 1303 | } |
| 1304 | if (cached_has_bits & 0x00000004u) { |
| 1305 | delay_ = from.delay_; |
| 1306 | } |
| 1307 | if (cached_has_bits & 0x00000008u) { |
| 1308 | drift_ = from.drift_; |
| 1309 | } |
| 1310 | if (cached_has_bits & 0x00000010u) { |
| 1311 | applied_input_volume_ = from.applied_input_volume_; |
| 1312 | } |
| 1313 | if (cached_has_bits & 0x00000020u) { |
| 1314 | keypress_ = from.keypress_; |
| 1315 | } |
| 1316 | _has_bits_[0] |= cached_has_bits; |
| 1317 | } |
| 1318 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 1319 | } |
| 1320 |
| 1321 | void Stream::CopyFrom(const Stream& from) { |
| 1322 | // @@protoc_insertion_point(class_specific_copy_from_start:webrtc.audioproc.Stream) |
| 1323 | if (&from == this) return; |
| 1324 | Clear(); |
| 1325 | MergeFrom(from); |
| 1326 | } |
| 1327 |
| 1328 | bool Stream::IsInitialized() const { |
| 1329 | return true; |
| 1330 | } |
| 1331 |
| 1332 | void Stream::InternalSwap(Stream* other) { |
| 1333 | using std::swap; |
| 1334 | auto* lhs_arena = GetArenaForAllocation(); |
| 1335 | auto* rhs_arena = other->GetArenaForAllocation(); |
| 1336 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| 1337 | swap(_has_bits_[0], other->_has_bits_[0]); |
| 1338 | input_channel_.InternalSwap(&other->input_channel_); |
| 1339 | output_channel_.InternalSwap(&other->output_channel_); |
| 1340 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| 1341 | &input_data_, lhs_arena, |
| 1342 | &other->input_data_, rhs_arena |
| 1343 | ); |
| 1344 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| 1345 | &output_data_, lhs_arena, |
| 1346 | &other->output_data_, rhs_arena |
| 1347 | ); |
| 1348 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| 1349 | PROTOBUF_FIELD_OFFSET(Stream, keypress_) |
| 1350 | + sizeof(Stream::keypress_) |
| 1351 | - PROTOBUF_FIELD_OFFSET(Stream, delay_)>( |
| 1352 | reinterpret_cast<char*>(&delay_), |
| 1353 | reinterpret_cast<char*>(&other->delay_)); |
| 1354 | } |
| 1355 |
| 1356 | std::string Stream::GetTypeName() const { |
| 1357 | return "webrtc.audioproc.Stream"; |
| 1358 | } |
| 1359 |
| 1360 |
| 1361 | // =================================================================== |
| 1362 |
| 1363 | class Config::_Internal { |
| 1364 | public: |
| 1365 | using HasBits = decltype(std::declval<Config>()._has_bits_); |
| 1366 | static void set_has_aec_enabled(HasBits* has_bits) { |
| 1367 | (*has_bits)[0] |= 2u; |
| 1368 | } |
| 1369 | static void set_has_aec_delay_agnostic_enabled(HasBits* has_bits) { |
| 1370 | (*has_bits)[0] |= 4u; |
| 1371 | } |
| 1372 | static void set_has_aec_drift_compensation_enabled(HasBits* has_bits) { |
| 1373 | (*has_bits)[0] |= 8u; |
| 1374 | } |
| 1375 | static void set_has_aec_extended_filter_enabled(HasBits* has_bits) { |
| 1376 | (*has_bits)[0] |= 16u; |
| 1377 | } |
| 1378 | static void set_has_aec_suppression_level(HasBits* has_bits) { |
| 1379 | (*has_bits)[0] |= 32u; |
| 1380 | } |
| 1381 | static void set_has_aecm_enabled(HasBits* has_bits) { |
| 1382 | (*has_bits)[0] |= 128u; |
| 1383 | } |
| 1384 | static void set_has_aecm_comfort_noise_enabled(HasBits* has_bits) { |
| 1385 | (*has_bits)[0] |= 256u; |
| 1386 | } |
| 1387 | static void set_has_aecm_routing_mode(HasBits* has_bits) { |
| 1388 | (*has_bits)[0] |= 64u; |
| 1389 | } |
| 1390 | static void set_has_agc_enabled(HasBits* has_bits) { |
| 1391 | (*has_bits)[0] |= 512u; |
| 1392 | } |
| 1393 | static void set_has_agc_mode(HasBits* has_bits) { |
| 1394 | (*has_bits)[0] |= 2048u; |
| 1395 | } |
| 1396 | static void set_has_agc_limiter_enabled(HasBits* has_bits) { |
| 1397 | (*has_bits)[0] |= 1024u; |
| 1398 | } |
| 1399 | static void set_has_noise_robust_agc_enabled(HasBits* has_bits) { |
| 1400 | (*has_bits)[0] |= 4096u; |
| 1401 | } |
| 1402 | static void set_has_hpf_enabled(HasBits* has_bits) { |
| 1403 | (*has_bits)[0] |= 8192u; |
| 1404 | } |
| 1405 | static void set_has_ns_enabled(HasBits* has_bits) { |
| 1406 | (*has_bits)[0] |= 16384u; |
| 1407 | } |
| 1408 | static void set_has_ns_level(HasBits* has_bits) { |
| 1409 | (*has_bits)[0] |= 65536u; |
| 1410 | } |
| 1411 | static void set_has_transient_suppression_enabled(HasBits* has_bits) { |
| 1412 | (*has_bits)[0] |= 32768u; |
| 1413 | } |
| 1414 | static void set_has_experiments_description(HasBits* has_bits) { |
| 1415 | (*has_bits)[0] |= 1u; |
| 1416 | } |
| 1417 | static void set_has_pre_amplifier_enabled(HasBits* has_bits) { |
| 1418 | (*has_bits)[0] |= 131072u; |
| 1419 | } |
| 1420 | static void set_has_pre_amplifier_fixed_gain_factor(HasBits* has_bits) { |
| 1421 | (*has_bits)[0] |= 262144u; |
| 1422 | } |
| 1423 | }; |
| 1424 |
| 1425 | Config::Config(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 1426 | bool is_message_owned) |
| 1427 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { |
| 1428 | SharedCtor(); |
| 1429 | // @@protoc_insertion_point(arena_constructor:webrtc.audioproc.Config) |
| 1430 | } |
| 1431 | Config::Config(const Config& from) |
| 1432 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| 1433 | _has_bits_(from._has_bits_) { |
| 1434 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 1435 | experiments_description_.InitDefault(); |
| 1436 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 1437 | experiments_description_.Set("", GetArenaForAllocation()); |
| 1438 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 1439 | if (from._internal_has_experiments_description()) { |
| 1440 | experiments_description_.Set(from._internal_experiments_description(), |
| 1441 | GetArenaForAllocation()); |
| 1442 | } |
| 1443 | ::memcpy(&aec_enabled_, &from.aec_enabled_, |
| 1444 | static_cast<size_t>(reinterpret_cast<char*>(&pre_amplifier_fixed_gain_factor_) - |
| 1445 | reinterpret_cast<char*>(&aec_enabled_)) + sizeof(pre_amplifier_fixed_gain_factor_)); |
| 1446 | // @@protoc_insertion_point(copy_constructor:webrtc.audioproc.Config) |
| 1447 | } |
| 1448 |
| 1449 | inline void Config::SharedCtor() { |
| 1450 | experiments_description_.InitDefault(); |
| 1451 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 1452 | experiments_description_.Set("", GetArenaForAllocation()); |
| 1453 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
| 1454 | ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| 1455 | reinterpret_cast<char*>(&aec_enabled_) - reinterpret_cast<char*>(this)), |
| 1456 | 0, static_cast<size_t>(reinterpret_cast<char*>(&pre_amplifier_fixed_gain_factor_) - |
| 1457 | reinterpret_cast<char*>(&aec_enabled_)) + sizeof(pre_amplifier_fixed_gain_factor_)); |
| 1458 | } |
| 1459 |
| 1460 | Config::~Config() { |
| 1461 | // @@protoc_insertion_point(destructor:webrtc.audioproc.Config) |
| 1462 | if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { |
| 1463 | (void)arena; |
| 1464 | return; |
| 1465 | } |
| 1466 | SharedDtor(); |
| 1467 | } |
| 1468 |
| 1469 | inline void Config::SharedDtor() { |
| 1470 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 1471 | experiments_description_.Destroy(); |
| 1472 | } |
| 1473 |
| 1474 | void Config::SetCachedSize(int size) const { |
| 1475 | _cached_size_.Set(size); |
| 1476 | } |
| 1477 |
| 1478 | void Config::Clear() { |
| 1479 | // @@protoc_insertion_point(message_clear_start:webrtc.audioproc.Config) |
| 1480 | uint32_t cached_has_bits = 0; |
| 1481 | // Prevent compiler warnings about cached_has_bits being unused |
| 1482 | (void) cached_has_bits; |
| 1483 |
| 1484 | cached_has_bits = _has_bits_[0]; |
| 1485 | if (cached_has_bits & 0x00000001u) { |
| 1486 | experiments_description_.ClearNonDefaultToEmpty(); |
| 1487 | } |
| 1488 | if (cached_has_bits & 0x000000feu) { |
| 1489 | ::memset(&aec_enabled_, 0, static_cast<size_t>( |
| 1490 | reinterpret_cast<char*>(&aecm_enabled_) - |
| 1491 | reinterpret_cast<char*>(&aec_enabled_)) + sizeof(aecm_enabled_)); |
| 1492 | } |
| 1493 | if (cached_has_bits & 0x0000ff00u) { |
| 1494 | ::memset(&aecm_comfort_noise_enabled_, 0, static_cast<size_t>( |
| 1495 | reinterpret_cast<char*>(&transient_suppression_enabled_) - |
| 1496 | reinterpret_cast<char*>(&aecm_comfort_noise_enabled_)) + sizeof(transient_suppression_enabled_)); |
| 1497 | } |
| 1498 | if (cached_has_bits & 0x00070000u) { |
| 1499 | ::memset(&ns_level_, 0, static_cast<size_t>( |
| 1500 | reinterpret_cast<char*>(&pre_amplifier_fixed_gain_factor_) - |
| 1501 | reinterpret_cast<char*>(&ns_level_)) + sizeof(pre_amplifier_fixed_gain_factor_)); |
| 1502 | } |
| 1503 | _has_bits_.Clear(); |
| 1504 | _internal_metadata_.Clear<std::string>(); |
| 1505 | } |
| 1506 |
| 1507 | const char* Config::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 1508 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 1509 | _Internal::HasBits has_bits{}; |
| 1510 | while (!ctx->Done(&ptr)) { |
| 1511 | uint32_t tag; |
| 1512 | ptr = ::_pbi::ReadTag(ptr, &tag); |
| 1513 | switch (tag >> 3) { |
| 1514 | // optional bool aec_enabled = 1; |
| 1515 | case 1: |
| 1516 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
| 1517 | _Internal::set_has_aec_enabled(&has_bits); |
| 1518 | aec_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1519 | CHK_(ptr); |
| 1520 | } else |
| 1521 | goto handle_unusual; |
| 1522 | continue; |
| 1523 | // optional bool aec_delay_agnostic_enabled = 2; |
| 1524 | case 2: |
| 1525 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
| 1526 | _Internal::set_has_aec_delay_agnostic_enabled(&has_bits); |
| 1527 | aec_delay_agnostic_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1528 | CHK_(ptr); |
| 1529 | } else |
| 1530 | goto handle_unusual; |
| 1531 | continue; |
| 1532 | // optional bool aec_drift_compensation_enabled = 3; |
| 1533 | case 3: |
| 1534 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { |
| 1535 | _Internal::set_has_aec_drift_compensation_enabled(&has_bits); |
| 1536 | aec_drift_compensation_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1537 | CHK_(ptr); |
| 1538 | } else |
| 1539 | goto handle_unusual; |
| 1540 | continue; |
| 1541 | // optional bool aec_extended_filter_enabled = 4; |
| 1542 | case 4: |
| 1543 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { |
| 1544 | _Internal::set_has_aec_extended_filter_enabled(&has_bits); |
| 1545 | aec_extended_filter_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1546 | CHK_(ptr); |
| 1547 | } else |
| 1548 | goto handle_unusual; |
| 1549 | continue; |
| 1550 | // optional int32 aec_suppression_level = 5; |
| 1551 | case 5: |
| 1552 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { |
| 1553 | _Internal::set_has_aec_suppression_level(&has_bits); |
| 1554 | aec_suppression_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 1555 | CHK_(ptr); |
| 1556 | } else |
| 1557 | goto handle_unusual; |
| 1558 | continue; |
| 1559 | // optional bool aecm_enabled = 6; |
| 1560 | case 6: |
| 1561 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { |
| 1562 | _Internal::set_has_aecm_enabled(&has_bits); |
| 1563 | aecm_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1564 | CHK_(ptr); |
| 1565 | } else |
| 1566 | goto handle_unusual; |
| 1567 | continue; |
| 1568 | // optional bool aecm_comfort_noise_enabled = 7 [deprecated = true]; |
| 1569 | case 7: |
| 1570 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) { |
| 1571 | _Internal::set_has_aecm_comfort_noise_enabled(&has_bits); |
| 1572 | aecm_comfort_noise_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1573 | CHK_(ptr); |
| 1574 | } else |
| 1575 | goto handle_unusual; |
| 1576 | continue; |
| 1577 | // optional int32 aecm_routing_mode = 8 [deprecated = true]; |
| 1578 | case 8: |
| 1579 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) { |
| 1580 | _Internal::set_has_aecm_routing_mode(&has_bits); |
| 1581 | aecm_routing_mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 1582 | CHK_(ptr); |
| 1583 | } else |
| 1584 | goto handle_unusual; |
| 1585 | continue; |
| 1586 | // optional bool agc_enabled = 9; |
| 1587 | case 9: |
| 1588 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) { |
| 1589 | _Internal::set_has_agc_enabled(&has_bits); |
| 1590 | agc_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1591 | CHK_(ptr); |
| 1592 | } else |
| 1593 | goto handle_unusual; |
| 1594 | continue; |
| 1595 | // optional int32 agc_mode = 10; |
| 1596 | case 10: |
| 1597 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) { |
| 1598 | _Internal::set_has_agc_mode(&has_bits); |
| 1599 | agc_mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 1600 | CHK_(ptr); |
| 1601 | } else |
| 1602 | goto handle_unusual; |
| 1603 | continue; |
| 1604 | // optional bool agc_limiter_enabled = 11; |
| 1605 | case 11: |
| 1606 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) { |
| 1607 | _Internal::set_has_agc_limiter_enabled(&has_bits); |
| 1608 | agc_limiter_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1609 | CHK_(ptr); |
| 1610 | } else |
| 1611 | goto handle_unusual; |
| 1612 | continue; |
| 1613 | // optional bool noise_robust_agc_enabled = 12; |
| 1614 | case 12: |
| 1615 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) { |
| 1616 | _Internal::set_has_noise_robust_agc_enabled(&has_bits); |
| 1617 | noise_robust_agc_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1618 | CHK_(ptr); |
| 1619 | } else |
| 1620 | goto handle_unusual; |
| 1621 | continue; |
| 1622 | // optional bool hpf_enabled = 13; |
| 1623 | case 13: |
| 1624 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) { |
| 1625 | _Internal::set_has_hpf_enabled(&has_bits); |
| 1626 | hpf_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1627 | CHK_(ptr); |
| 1628 | } else |
| 1629 | goto handle_unusual; |
| 1630 | continue; |
| 1631 | // optional bool ns_enabled = 14; |
| 1632 | case 14: |
| 1633 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) { |
| 1634 | _Internal::set_has_ns_enabled(&has_bits); |
| 1635 | ns_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1636 | CHK_(ptr); |
| 1637 | } else |
| 1638 | goto handle_unusual; |
| 1639 | continue; |
| 1640 | // optional int32 ns_level = 15; |
| 1641 | case 15: |
| 1642 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) { |
| 1643 | _Internal::set_has_ns_level(&has_bits); |
| 1644 | ns_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 1645 | CHK_(ptr); |
| 1646 | } else |
| 1647 | goto handle_unusual; |
| 1648 | continue; |
| 1649 | // optional bool transient_suppression_enabled = 16; |
| 1650 | case 16: |
| 1651 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) { |
| 1652 | _Internal::set_has_transient_suppression_enabled(&has_bits); |
| 1653 | transient_suppression_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1654 | CHK_(ptr); |
| 1655 | } else |
| 1656 | goto handle_unusual; |
| 1657 | continue; |
| 1658 | // optional string experiments_description = 17; |
| 1659 | case 17: |
| 1660 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) { |
| 1661 | auto str = _internal_mutable_experiments_description(); |
| 1662 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
| 1663 | CHK_(ptr); |
| 1664 | } else |
| 1665 | goto handle_unusual; |
| 1666 | continue; |
| 1667 | // optional bool pre_amplifier_enabled = 19; |
| 1668 | case 19: |
| 1669 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) { |
| 1670 | _Internal::set_has_pre_amplifier_enabled(&has_bits); |
| 1671 | pre_amplifier_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 1672 | CHK_(ptr); |
| 1673 | } else |
| 1674 | goto handle_unusual; |
| 1675 | continue; |
| 1676 | // optional float pre_amplifier_fixed_gain_factor = 20; |
| 1677 | case 20: |
| 1678 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 165)) { |
| 1679 | _Internal::set_has_pre_amplifier_fixed_gain_factor(&has_bits); |
| 1680 | pre_amplifier_fixed_gain_factor_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr); |
| 1681 | ptr += sizeof(float); |
| 1682 | } else |
| 1683 | goto handle_unusual; |
| 1684 | continue; |
| 1685 | default: |
| 1686 | goto handle_unusual; |
| 1687 | } // switch |
| 1688 | handle_unusual: |
| 1689 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 1690 | CHK_(ptr); |
| 1691 | ctx->SetLastTag(tag); |
| 1692 | goto message_done; |
| 1693 | } |
| 1694 | ptr = UnknownFieldParse( |
| 1695 | tag, |
| 1696 | _internal_metadata_.mutable_unknown_fields<std::string>(), |
| 1697 | ptr, ctx); |
| 1698 | CHK_(ptr != nullptr); |
| 1699 | } // while |
| 1700 | message_done: |
| 1701 | _has_bits_.Or(has_bits); |
| 1702 | return ptr; |
| 1703 | failure: |
| 1704 | ptr = nullptr; |
| 1705 | goto message_done; |
| 1706 | #undef CHK_ |
| 1707 | } |
| 1708 |
| 1709 | uint8_t* Config::_InternalSerialize( |
| 1710 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 1711 | // @@protoc_insertion_point(serialize_to_array_start:webrtc.audioproc.Config) |
| 1712 | uint32_t cached_has_bits = 0; |
| 1713 | (void) cached_has_bits; |
| 1714 |
| 1715 | cached_has_bits = _has_bits_[0]; |
| 1716 | // optional bool aec_enabled = 1; |
| 1717 | if (cached_has_bits & 0x00000002u) { |
| 1718 | target = stream->EnsureSpace(target); |
| 1719 | target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_aec_enabled(), target); |
| 1720 | } |
| 1721 |
| 1722 | // optional bool aec_delay_agnostic_enabled = 2; |
| 1723 | if (cached_has_bits & 0x00000004u) { |
| 1724 | target = stream->EnsureSpace(target); |
| 1725 | target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_aec_delay_agnostic_enabled(), target); |
| 1726 | } |
| 1727 |
| 1728 | // optional bool aec_drift_compensation_enabled = 3; |
| 1729 | if (cached_has_bits & 0x00000008u) { |
| 1730 | target = stream->EnsureSpace(target); |
| 1731 | target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_aec_drift_compensation_enabled(), target); |
| 1732 | } |
| 1733 |
| 1734 | // optional bool aec_extended_filter_enabled = 4; |
| 1735 | if (cached_has_bits & 0x00000010u) { |
| 1736 | target = stream->EnsureSpace(target); |
| 1737 | target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_aec_extended_filter_enabled(), target); |
| 1738 | } |
| 1739 |
| 1740 | // optional int32 aec_suppression_level = 5; |
| 1741 | if (cached_has_bits & 0x00000020u) { |
| 1742 | target = stream->EnsureSpace(target); |
| 1743 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_aec_suppression_level(), target); |
| 1744 | } |
| 1745 |
| 1746 | // optional bool aecm_enabled = 6; |
| 1747 | if (cached_has_bits & 0x00000080u) { |
| 1748 | target = stream->EnsureSpace(target); |
| 1749 | target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_aecm_enabled(), target); |
| 1750 | } |
| 1751 |
| 1752 | // optional bool aecm_comfort_noise_enabled = 7 [deprecated = true]; |
| 1753 | if (cached_has_bits & 0x00000100u) { |
| 1754 | target = stream->EnsureSpace(target); |
| 1755 | target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_aecm_comfort_noise_enabled(), target); |
| 1756 | } |
| 1757 |
| 1758 | // optional int32 aecm_routing_mode = 8 [deprecated = true]; |
| 1759 | if (cached_has_bits & 0x00000040u) { |
| 1760 | target = stream->EnsureSpace(target); |
| 1761 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_aecm_routing_mode(), target); |
| 1762 | } |
| 1763 |
| 1764 | // optional bool agc_enabled = 9; |
| 1765 | if (cached_has_bits & 0x00000200u) { |
| 1766 | target = stream->EnsureSpace(target); |
| 1767 | target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_agc_enabled(), target); |
| 1768 | } |
| 1769 |
| 1770 | // optional int32 agc_mode = 10; |
| 1771 | if (cached_has_bits & 0x00000800u) { |
| 1772 | target = stream->EnsureSpace(target); |
| 1773 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_agc_mode(), target); |
| 1774 | } |
| 1775 |
| 1776 | // optional bool agc_limiter_enabled = 11; |
| 1777 | if (cached_has_bits & 0x00000400u) { |
| 1778 | target = stream->EnsureSpace(target); |
| 1779 | target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_agc_limiter_enabled(), target); |
| 1780 | } |
| 1781 |
| 1782 | // optional bool noise_robust_agc_enabled = 12; |
| 1783 | if (cached_has_bits & 0x00001000u) { |
| 1784 | target = stream->EnsureSpace(target); |
| 1785 | target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_noise_robust_agc_enabled(), target); |
| 1786 | } |
| 1787 |
| 1788 | // optional bool hpf_enabled = 13; |
| 1789 | if (cached_has_bits & 0x00002000u) { |
| 1790 | target = stream->EnsureSpace(target); |
| 1791 | target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_hpf_enabled(), target); |
| 1792 | } |
| 1793 |
| 1794 | // optional bool ns_enabled = 14; |
| 1795 | if (cached_has_bits & 0x00004000u) { |
| 1796 | target = stream->EnsureSpace(target); |
| 1797 | target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_ns_enabled(), target); |
| 1798 | } |
| 1799 |
| 1800 | // optional int32 ns_level = 15; |
| 1801 | if (cached_has_bits & 0x00010000u) { |
| 1802 | target = stream->EnsureSpace(target); |
| 1803 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_ns_level(), target); |
| 1804 | } |
| 1805 |
| 1806 | // optional bool transient_suppression_enabled = 16; |
| 1807 | if (cached_has_bits & 0x00008000u) { |
| 1808 | target = stream->EnsureSpace(target); |
| 1809 | target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_transient_suppression_enabled(), target); |
| 1810 | } |
| 1811 |
| 1812 | // optional string experiments_description = 17; |
| 1813 | if (cached_has_bits & 0x00000001u) { |
| 1814 | target = stream->WriteStringMaybeAliased( |
| 1815 | 17, this->_internal_experiments_description(), target); |
| 1816 | } |
| 1817 |
| 1818 | // optional bool pre_amplifier_enabled = 19; |
| 1819 | if (cached_has_bits & 0x00020000u) { |
| 1820 | target = stream->EnsureSpace(target); |
| 1821 | target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_pre_amplifier_enabled(), target); |
| 1822 | } |
| 1823 |
| 1824 | // optional float pre_amplifier_fixed_gain_factor = 20; |
| 1825 | if (cached_has_bits & 0x00040000u) { |
| 1826 | target = stream->EnsureSpace(target); |
| 1827 | target = ::_pbi::WireFormatLite::WriteFloatToArray(20, this->_internal_pre_amplifier_fixed_gain_factor(), target); |
| 1828 | } |
| 1829 |
| 1830 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 1831 | target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), |
| 1832 | static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); |
| 1833 | } |
| 1834 | // @@protoc_insertion_point(serialize_to_array_end:webrtc.audioproc.Config) |
| 1835 | return target; |
| 1836 | } |
| 1837 |
| 1838 | size_t Config::ByteSizeLong() const { |
| 1839 | // @@protoc_insertion_point(message_byte_size_start:webrtc.audioproc.Config) |
| 1840 | size_t total_size = 0; |
| 1841 |
| 1842 | uint32_t cached_has_bits = 0; |
| 1843 | // Prevent compiler warnings about cached_has_bits being unused |
| 1844 | (void) cached_has_bits; |
| 1845 |
| 1846 | cached_has_bits = _has_bits_[0]; |
| 1847 | if (cached_has_bits & 0x000000ffu) { |
| 1848 | // optional string experiments_description = 17; |
| 1849 | if (cached_has_bits & 0x00000001u) { |
| 1850 | total_size += 2 + |
| 1851 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| 1852 | this->_internal_experiments_description()); |
| 1853 | } |
| 1854 |
| 1855 | // optional bool aec_enabled = 1; |
| 1856 | if (cached_has_bits & 0x00000002u) { |
| 1857 | total_size += 1 + 1; |
| 1858 | } |
| 1859 |
| 1860 | // optional bool aec_delay_agnostic_enabled = 2; |
| 1861 | if (cached_has_bits & 0x00000004u) { |
| 1862 | total_size += 1 + 1; |
| 1863 | } |
| 1864 |
| 1865 | // optional bool aec_drift_compensation_enabled = 3; |
| 1866 | if (cached_has_bits & 0x00000008u) { |
| 1867 | total_size += 1 + 1; |
| 1868 | } |
| 1869 |
| 1870 | // optional bool aec_extended_filter_enabled = 4; |
| 1871 | if (cached_has_bits & 0x00000010u) { |
| 1872 | total_size += 1 + 1; |
| 1873 | } |
| 1874 |
| 1875 | // optional int32 aec_suppression_level = 5; |
| 1876 | if (cached_has_bits & 0x00000020u) { |
| 1877 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_aec_suppression_level()); |
| 1878 | } |
| 1879 |
| 1880 | // optional int32 aecm_routing_mode = 8 [deprecated = true]; |
| 1881 | if (cached_has_bits & 0x00000040u) { |
| 1882 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_aecm_routing_mode()); |
| 1883 | } |
| 1884 |
| 1885 | // optional bool aecm_enabled = 6; |
| 1886 | if (cached_has_bits & 0x00000080u) { |
| 1887 | total_size += 1 + 1; |
| 1888 | } |
| 1889 |
| 1890 | } |
| 1891 | if (cached_has_bits & 0x0000ff00u) { |
| 1892 | // optional bool aecm_comfort_noise_enabled = 7 [deprecated = true]; |
| 1893 | if (cached_has_bits & 0x00000100u) { |
| 1894 | total_size += 1 + 1; |
| 1895 | } |
| 1896 |
| 1897 | // optional bool agc_enabled = 9; |
| 1898 | if (cached_has_bits & 0x00000200u) { |
| 1899 | total_size += 1 + 1; |
| 1900 | } |
| 1901 |
| 1902 | // optional bool agc_limiter_enabled = 11; |
| 1903 | if (cached_has_bits & 0x00000400u) { |
| 1904 | total_size += 1 + 1; |
| 1905 | } |
| 1906 |
| 1907 | // optional int32 agc_mode = 10; |
| 1908 | if (cached_has_bits & 0x00000800u) { |
| 1909 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_agc_mode()); |
| 1910 | } |
| 1911 |
| 1912 | // optional bool noise_robust_agc_enabled = 12; |
| 1913 | if (cached_has_bits & 0x00001000u) { |
| 1914 | total_size += 1 + 1; |
| 1915 | } |
| 1916 |
| 1917 | // optional bool hpf_enabled = 13; |
| 1918 | if (cached_has_bits & 0x00002000u) { |
| 1919 | total_size += 1 + 1; |
| 1920 | } |
| 1921 |
| 1922 | // optional bool ns_enabled = 14; |
| 1923 | if (cached_has_bits & 0x00004000u) { |
| 1924 | total_size += 1 + 1; |
| 1925 | } |
| 1926 |
| 1927 | // optional bool transient_suppression_enabled = 16; |
| 1928 | if (cached_has_bits & 0x00008000u) { |
| 1929 | total_size += 2 + 1; |
| 1930 | } |
| 1931 |
| 1932 | } |
| 1933 | if (cached_has_bits & 0x00070000u) { |
| 1934 | // optional int32 ns_level = 15; |
| 1935 | if (cached_has_bits & 0x00010000u) { |
| 1936 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ns_level()); |
| 1937 | } |
| 1938 |
| 1939 | // optional bool pre_amplifier_enabled = 19; |
| 1940 | if (cached_has_bits & 0x00020000u) { |
| 1941 | total_size += 2 + 1; |
| 1942 | } |
| 1943 |
| 1944 | // optional float pre_amplifier_fixed_gain_factor = 20; |
| 1945 | if (cached_has_bits & 0x00040000u) { |
| 1946 | total_size += 2 + 4; |
| 1947 | } |
| 1948 |
| 1949 | } |
| 1950 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 1951 | total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); |
| 1952 | } |
| 1953 | int cached_size = ::_pbi::ToCachedSize(total_size); |
| 1954 | SetCachedSize(cached_size); |
| 1955 | return total_size; |
| 1956 | } |
| 1957 |
| 1958 | void Config::CheckTypeAndMergeFrom( |
| 1959 | const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| 1960 | MergeFrom(*::_pbi::DownCast<const Config*>( |
| 1961 | &from)); |
| 1962 | } |
| 1963 |
| 1964 | void Config::MergeFrom(const Config& from) { |
| 1965 | // @@protoc_insertion_point(class_specific_merge_from_start:webrtc.audioproc.Config) |
| 1966 | GOOGLE_DCHECK_NE(&from, this); |
| 1967 | uint32_t cached_has_bits = 0; |
| 1968 | (void) cached_has_bits; |
| 1969 |
| 1970 | cached_has_bits = from._has_bits_[0]; |
| 1971 | if (cached_has_bits & 0x000000ffu) { |
| 1972 | if (cached_has_bits & 0x00000001u) { |
| 1973 | _internal_set_experiments_description(from._internal_experiments_description()); |
| 1974 | } |
| 1975 | if (cached_has_bits & 0x00000002u) { |
| 1976 | aec_enabled_ = from.aec_enabled_; |
| 1977 | } |
| 1978 | if (cached_has_bits & 0x00000004u) { |
| 1979 | aec_delay_agnostic_enabled_ = from.aec_delay_agnostic_enabled_; |
| 1980 | } |
| 1981 | if (cached_has_bits & 0x00000008u) { |
| 1982 | aec_drift_compensation_enabled_ = from.aec_drift_compensation_enabled_; |
| 1983 | } |
| 1984 | if (cached_has_bits & 0x00000010u) { |
| 1985 | aec_extended_filter_enabled_ = from.aec_extended_filter_enabled_; |
| 1986 | } |
| 1987 | if (cached_has_bits & 0x00000020u) { |
| 1988 | aec_suppression_level_ = from.aec_suppression_level_; |
| 1989 | } |
| 1990 | if (cached_has_bits & 0x00000040u) { |
| 1991 | aecm_routing_mode_ = from.aecm_routing_mode_; |
| 1992 | } |
| 1993 | if (cached_has_bits & 0x00000080u) { |
| 1994 | aecm_enabled_ = from.aecm_enabled_; |
| 1995 | } |
| 1996 | _has_bits_[0] |= cached_has_bits; |
| 1997 | } |
| 1998 | if (cached_has_bits & 0x0000ff00u) { |
| 1999 | if (cached_has_bits & 0x00000100u) { |
| 2000 | aecm_comfort_noise_enabled_ = from.aecm_comfort_noise_enabled_; |
| 2001 | } |
| 2002 | if (cached_has_bits & 0x00000200u) { |
| 2003 | agc_enabled_ = from.agc_enabled_; |
| 2004 | } |
| 2005 | if (cached_has_bits & 0x00000400u) { |
| 2006 | agc_limiter_enabled_ = from.agc_limiter_enabled_; |
| 2007 | } |
| 2008 | if (cached_has_bits & 0x00000800u) { |
| 2009 | agc_mode_ = from.agc_mode_; |
| 2010 | } |
| 2011 | if (cached_has_bits & 0x00001000u) { |
| 2012 | noise_robust_agc_enabled_ = from.noise_robust_agc_enabled_; |
| 2013 | } |
| 2014 | if (cached_has_bits & 0x00002000u) { |
| 2015 | hpf_enabled_ = from.hpf_enabled_; |
| 2016 | } |
| 2017 | if (cached_has_bits & 0x00004000u) { |
| 2018 | ns_enabled_ = from.ns_enabled_; |
| 2019 | } |
| 2020 | if (cached_has_bits & 0x00008000u) { |
| 2021 | transient_suppression_enabled_ = from.transient_suppression_enabled_; |
| 2022 | } |
| 2023 | _has_bits_[0] |= cached_has_bits; |
| 2024 | } |
| 2025 | if (cached_has_bits & 0x00070000u) { |
| 2026 | if (cached_has_bits & 0x00010000u) { |
| 2027 | ns_level_ = from.ns_level_; |
| 2028 | } |
| 2029 | if (cached_has_bits & 0x00020000u) { |
| 2030 | pre_amplifier_enabled_ = from.pre_amplifier_enabled_; |
| 2031 | } |
| 2032 | if (cached_has_bits & 0x00040000u) { |
| 2033 | pre_amplifier_fixed_gain_factor_ = from.pre_amplifier_fixed_gain_factor_; |
| 2034 | } |
| 2035 | _has_bits_[0] |= cached_has_bits; |
| 2036 | } |
| 2037 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 2038 | } |
| 2039 |
| 2040 | void Config::CopyFrom(const Config& from) { |
| 2041 | // @@protoc_insertion_point(class_specific_copy_from_start:webrtc.audioproc.Config) |
| 2042 | if (&from == this) return; |
| 2043 | Clear(); |
| 2044 | MergeFrom(from); |
| 2045 | } |
| 2046 |
| 2047 | bool Config::IsInitialized() const { |
| 2048 | return true; |
| 2049 | } |
| 2050 |
| 2051 | void Config::InternalSwap(Config* other) { |
| 2052 | using std::swap; |
| 2053 | auto* lhs_arena = GetArenaForAllocation(); |
| 2054 | auto* rhs_arena = other->GetArenaForAllocation(); |
| 2055 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| 2056 | swap(_has_bits_[0], other->_has_bits_[0]); |
| 2057 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
| 2058 | &experiments_description_, lhs_arena, |
| 2059 | &other->experiments_description_, rhs_arena |
| 2060 | ); |
| 2061 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| 2062 | PROTOBUF_FIELD_OFFSET(Config, pre_amplifier_fixed_gain_factor_) |
| 2063 | + sizeof(Config::pre_amplifier_fixed_gain_factor_) |
| 2064 | - PROTOBUF_FIELD_OFFSET(Config, aec_enabled_)>( |
| 2065 | reinterpret_cast<char*>(&aec_enabled_), |
| 2066 | reinterpret_cast<char*>(&other->aec_enabled_)); |
| 2067 | } |
| 2068 |
| 2069 | std::string Config::GetTypeName() const { |
| 2070 | return "webrtc.audioproc.Config"; |
| 2071 | } |
| 2072 |
| 2073 |
| 2074 | // =================================================================== |
| 2075 |
| 2076 | class PlayoutAudioDeviceInfo::_Internal { |
| 2077 | public: |
| 2078 | using HasBits = decltype(std::declval<PlayoutAudioDeviceInfo>()._has_bits_); |
| 2079 | static void set_has_id(HasBits* has_bits) { |
| 2080 | (*has_bits)[0] |= 1u; |
| 2081 | } |
| 2082 | static void set_has_max_volume(HasBits* has_bits) { |
| 2083 | (*has_bits)[0] |= 2u; |
| 2084 | } |
| 2085 | }; |
| 2086 |
| 2087 | PlayoutAudioDeviceInfo::PlayoutAudioDeviceInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 2088 | bool is_message_owned) |
| 2089 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { |
| 2090 | SharedCtor(); |
| 2091 | // @@protoc_insertion_point(arena_constructor:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2092 | } |
| 2093 | PlayoutAudioDeviceInfo::PlayoutAudioDeviceInfo(const PlayoutAudioDeviceInfo& from) |
| 2094 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| 2095 | _has_bits_(from._has_bits_) { |
| 2096 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 2097 | ::memcpy(&id_, &from.id_, |
| 2098 | static_cast<size_t>(reinterpret_cast<char*>(&max_volume_) - |
| 2099 | reinterpret_cast<char*>(&id_)) + sizeof(max_volume_)); |
| 2100 | // @@protoc_insertion_point(copy_constructor:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2101 | } |
| 2102 |
| 2103 | inline void PlayoutAudioDeviceInfo::SharedCtor() { |
| 2104 | ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| 2105 | reinterpret_cast<char*>(&id_) - reinterpret_cast<char*>(this)), |
| 2106 | 0, static_cast<size_t>(reinterpret_cast<char*>(&max_volume_) - |
| 2107 | reinterpret_cast<char*>(&id_)) + sizeof(max_volume_)); |
| 2108 | } |
| 2109 |
| 2110 | PlayoutAudioDeviceInfo::~PlayoutAudioDeviceInfo() { |
| 2111 | // @@protoc_insertion_point(destructor:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2112 | if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { |
| 2113 | (void)arena; |
| 2114 | return; |
| 2115 | } |
| 2116 | SharedDtor(); |
| 2117 | } |
| 2118 |
| 2119 | inline void PlayoutAudioDeviceInfo::SharedDtor() { |
| 2120 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 2121 | } |
| 2122 |
| 2123 | void PlayoutAudioDeviceInfo::SetCachedSize(int size) const { |
| 2124 | _cached_size_.Set(size); |
| 2125 | } |
| 2126 |
| 2127 | void PlayoutAudioDeviceInfo::Clear() { |
| 2128 | // @@protoc_insertion_point(message_clear_start:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2129 | uint32_t cached_has_bits = 0; |
| 2130 | // Prevent compiler warnings about cached_has_bits being unused |
| 2131 | (void) cached_has_bits; |
| 2132 |
| 2133 | cached_has_bits = _has_bits_[0]; |
| 2134 | if (cached_has_bits & 0x00000003u) { |
| 2135 | ::memset(&id_, 0, static_cast<size_t>( |
| 2136 | reinterpret_cast<char*>(&max_volume_) - |
| 2137 | reinterpret_cast<char*>(&id_)) + sizeof(max_volume_)); |
| 2138 | } |
| 2139 | _has_bits_.Clear(); |
| 2140 | _internal_metadata_.Clear<std::string>(); |
| 2141 | } |
| 2142 |
| 2143 | const char* PlayoutAudioDeviceInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 2144 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 2145 | _Internal::HasBits has_bits{}; |
| 2146 | while (!ctx->Done(&ptr)) { |
| 2147 | uint32_t tag; |
| 2148 | ptr = ::_pbi::ReadTag(ptr, &tag); |
| 2149 | switch (tag >> 3) { |
| 2150 | // optional int32 id = 1; |
| 2151 | case 1: |
| 2152 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
| 2153 | _Internal::set_has_id(&has_bits); |
| 2154 | id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 2155 | CHK_(ptr); |
| 2156 | } else |
| 2157 | goto handle_unusual; |
| 2158 | continue; |
| 2159 | // optional int32 max_volume = 2; |
| 2160 | case 2: |
| 2161 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
| 2162 | _Internal::set_has_max_volume(&has_bits); |
| 2163 | max_volume_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 2164 | CHK_(ptr); |
| 2165 | } else |
| 2166 | goto handle_unusual; |
| 2167 | continue; |
| 2168 | default: |
| 2169 | goto handle_unusual; |
| 2170 | } // switch |
| 2171 | handle_unusual: |
| 2172 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 2173 | CHK_(ptr); |
| 2174 | ctx->SetLastTag(tag); |
| 2175 | goto message_done; |
| 2176 | } |
| 2177 | ptr = UnknownFieldParse( |
| 2178 | tag, |
| 2179 | _internal_metadata_.mutable_unknown_fields<std::string>(), |
| 2180 | ptr, ctx); |
| 2181 | CHK_(ptr != nullptr); |
| 2182 | } // while |
| 2183 | message_done: |
| 2184 | _has_bits_.Or(has_bits); |
| 2185 | return ptr; |
| 2186 | failure: |
| 2187 | ptr = nullptr; |
| 2188 | goto message_done; |
| 2189 | #undef CHK_ |
| 2190 | } |
| 2191 |
| 2192 | uint8_t* PlayoutAudioDeviceInfo::_InternalSerialize( |
| 2193 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 2194 | // @@protoc_insertion_point(serialize_to_array_start:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2195 | uint32_t cached_has_bits = 0; |
| 2196 | (void) cached_has_bits; |
| 2197 |
| 2198 | cached_has_bits = _has_bits_[0]; |
| 2199 | // optional int32 id = 1; |
| 2200 | if (cached_has_bits & 0x00000001u) { |
| 2201 | target = stream->EnsureSpace(target); |
| 2202 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target); |
| 2203 | } |
| 2204 |
| 2205 | // optional int32 max_volume = 2; |
| 2206 | if (cached_has_bits & 0x00000002u) { |
| 2207 | target = stream->EnsureSpace(target); |
| 2208 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_max_volume(), target); |
| 2209 | } |
| 2210 |
| 2211 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 2212 | target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), |
| 2213 | static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); |
| 2214 | } |
| 2215 | // @@protoc_insertion_point(serialize_to_array_end:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2216 | return target; |
| 2217 | } |
| 2218 |
| 2219 | size_t PlayoutAudioDeviceInfo::ByteSizeLong() const { |
| 2220 | // @@protoc_insertion_point(message_byte_size_start:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2221 | size_t total_size = 0; |
| 2222 |
| 2223 | uint32_t cached_has_bits = 0; |
| 2224 | // Prevent compiler warnings about cached_has_bits being unused |
| 2225 | (void) cached_has_bits; |
| 2226 |
| 2227 | cached_has_bits = _has_bits_[0]; |
| 2228 | if (cached_has_bits & 0x00000003u) { |
| 2229 | // optional int32 id = 1; |
| 2230 | if (cached_has_bits & 0x00000001u) { |
| 2231 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id()); |
| 2232 | } |
| 2233 |
| 2234 | // optional int32 max_volume = 2; |
| 2235 | if (cached_has_bits & 0x00000002u) { |
| 2236 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_volume()); |
| 2237 | } |
| 2238 |
| 2239 | } |
| 2240 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 2241 | total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); |
| 2242 | } |
| 2243 | int cached_size = ::_pbi::ToCachedSize(total_size); |
| 2244 | SetCachedSize(cached_size); |
| 2245 | return total_size; |
| 2246 | } |
| 2247 |
| 2248 | void PlayoutAudioDeviceInfo::CheckTypeAndMergeFrom( |
| 2249 | const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| 2250 | MergeFrom(*::_pbi::DownCast<const PlayoutAudioDeviceInfo*>( |
| 2251 | &from)); |
| 2252 | } |
| 2253 |
| 2254 | void PlayoutAudioDeviceInfo::MergeFrom(const PlayoutAudioDeviceInfo& from) { |
| 2255 | // @@protoc_insertion_point(class_specific_merge_from_start:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2256 | GOOGLE_DCHECK_NE(&from, this); |
| 2257 | uint32_t cached_has_bits = 0; |
| 2258 | (void) cached_has_bits; |
| 2259 |
| 2260 | cached_has_bits = from._has_bits_[0]; |
| 2261 | if (cached_has_bits & 0x00000003u) { |
| 2262 | if (cached_has_bits & 0x00000001u) { |
| 2263 | id_ = from.id_; |
| 2264 | } |
| 2265 | if (cached_has_bits & 0x00000002u) { |
| 2266 | max_volume_ = from.max_volume_; |
| 2267 | } |
| 2268 | _has_bits_[0] |= cached_has_bits; |
| 2269 | } |
| 2270 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 2271 | } |
| 2272 |
| 2273 | void PlayoutAudioDeviceInfo::CopyFrom(const PlayoutAudioDeviceInfo& from) { |
| 2274 | // @@protoc_insertion_point(class_specific_copy_from_start:webrtc.audioproc.PlayoutAudioDeviceInfo) |
| 2275 | if (&from == this) return; |
| 2276 | Clear(); |
| 2277 | MergeFrom(from); |
| 2278 | } |
| 2279 |
| 2280 | bool PlayoutAudioDeviceInfo::IsInitialized() const { |
| 2281 | return true; |
| 2282 | } |
| 2283 |
| 2284 | void PlayoutAudioDeviceInfo::InternalSwap(PlayoutAudioDeviceInfo* other) { |
| 2285 | using std::swap; |
| 2286 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| 2287 | swap(_has_bits_[0], other->_has_bits_[0]); |
| 2288 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| 2289 | PROTOBUF_FIELD_OFFSET(PlayoutAudioDeviceInfo, max_volume_) |
| 2290 | + sizeof(PlayoutAudioDeviceInfo::max_volume_) |
| 2291 | - PROTOBUF_FIELD_OFFSET(PlayoutAudioDeviceInfo, id_)>( |
| 2292 | reinterpret_cast<char*>(&id_), |
| 2293 | reinterpret_cast<char*>(&other->id_)); |
| 2294 | } |
| 2295 |
| 2296 | std::string PlayoutAudioDeviceInfo::GetTypeName() const { |
| 2297 | return "webrtc.audioproc.PlayoutAudioDeviceInfo"; |
| 2298 | } |
| 2299 |
| 2300 |
| 2301 | // =================================================================== |
| 2302 |
| 2303 | class RuntimeSetting::_Internal { |
| 2304 | public: |
| 2305 | using HasBits = decltype(std::declval<RuntimeSetting>()._has_bits_); |
| 2306 | static void set_has_capture_pre_gain(HasBits* has_bits) { |
| 2307 | (*has_bits)[0] |= 2u; |
| 2308 | } |
| 2309 | static void set_has_custom_render_processing_setting(HasBits* has_bits) { |
| 2310 | (*has_bits)[0] |= 4u; |
| 2311 | } |
| 2312 | static void set_has_capture_fixed_post_gain(HasBits* has_bits) { |
| 2313 | (*has_bits)[0] |= 8u; |
| 2314 | } |
| 2315 | static void set_has_playout_volume_change(HasBits* has_bits) { |
| 2316 | (*has_bits)[0] |= 16u; |
| 2317 | } |
| 2318 | static const ::webrtc::audioproc::PlayoutAudioDeviceInfo& playout_audio_device_change(const RuntimeSetting* msg); |
| 2319 | static void set_has_playout_audio_device_change(HasBits* has_bits) { |
| 2320 | (*has_bits)[0] |= 1u; |
| 2321 | } |
| 2322 | static void set_has_capture_output_used(HasBits* has_bits) { |
| 2323 | (*has_bits)[0] |= 32u; |
| 2324 | } |
| 2325 | static void set_has_capture_post_gain(HasBits* has_bits) { |
| 2326 | (*has_bits)[0] |= 64u; |
| 2327 | } |
| 2328 | }; |
| 2329 |
| 2330 | const ::webrtc::audioproc::PlayoutAudioDeviceInfo& |
| 2331 | RuntimeSetting::_Internal::playout_audio_device_change(const RuntimeSetting* msg) { |
| 2332 | return *msg->playout_audio_device_change_; |
| 2333 | } |
| 2334 | RuntimeSetting::RuntimeSetting(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 2335 | bool is_message_owned) |
| 2336 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { |
| 2337 | SharedCtor(); |
| 2338 | // @@protoc_insertion_point(arena_constructor:webrtc.audioproc.RuntimeSetting) |
| 2339 | } |
| 2340 | RuntimeSetting::RuntimeSetting(const RuntimeSetting& from) |
| 2341 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| 2342 | _has_bits_(from._has_bits_) { |
| 2343 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 2344 | if (from._internal_has_playout_audio_device_change()) { |
| 2345 | playout_audio_device_change_ = new ::webrtc::audioproc::PlayoutAudioDeviceInfo(*from.playout_audio_device_change_); |
| 2346 | } else { |
| 2347 | playout_audio_device_change_ = nullptr; |
| 2348 | } |
| 2349 | ::memcpy(&capture_pre_gain_, &from.capture_pre_gain_, |
| 2350 | static_cast<size_t>(reinterpret_cast<char*>(&capture_post_gain_) - |
| 2351 | reinterpret_cast<char*>(&capture_pre_gain_)) + sizeof(capture_post_gain_)); |
| 2352 | // @@protoc_insertion_point(copy_constructor:webrtc.audioproc.RuntimeSetting) |
| 2353 | } |
| 2354 |
| 2355 | inline void RuntimeSetting::SharedCtor() { |
| 2356 | ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| 2357 | reinterpret_cast<char*>(&playout_audio_device_change_) - reinterpret_cast<char*>(this)), |
| 2358 | 0, static_cast<size_t>(reinterpret_cast<char*>(&capture_post_gain_) - |
| 2359 | reinterpret_cast<char*>(&playout_audio_device_change_)) + sizeof(capture_post_gain_)); |
| 2360 | } |
| 2361 |
| 2362 | RuntimeSetting::~RuntimeSetting() { |
| 2363 | // @@protoc_insertion_point(destructor:webrtc.audioproc.RuntimeSetting) |
| 2364 | if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { |
| 2365 | (void)arena; |
| 2366 | return; |
| 2367 | } |
| 2368 | SharedDtor(); |
| 2369 | } |
| 2370 |
| 2371 | inline void RuntimeSetting::SharedDtor() { |
| 2372 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 2373 | if (this != internal_default_instance()) delete playout_audio_device_change_; |
| 2374 | } |
| 2375 |
| 2376 | void RuntimeSetting::SetCachedSize(int size) const { |
| 2377 | _cached_size_.Set(size); |
| 2378 | } |
| 2379 |
| 2380 | void RuntimeSetting::Clear() { |
| 2381 | // @@protoc_insertion_point(message_clear_start:webrtc.audioproc.RuntimeSetting) |
| 2382 | uint32_t cached_has_bits = 0; |
| 2383 | // Prevent compiler warnings about cached_has_bits being unused |
| 2384 | (void) cached_has_bits; |
| 2385 |
| 2386 | cached_has_bits = _has_bits_[0]; |
| 2387 | if (cached_has_bits & 0x00000001u) { |
| 2388 | GOOGLE_DCHECK(playout_audio_device_change_ != nullptr); |
| 2389 | playout_audio_device_change_->Clear(); |
| 2390 | } |
| 2391 | if (cached_has_bits & 0x0000007eu) { |
| 2392 | ::memset(&capture_pre_gain_, 0, static_cast<size_t>( |
| 2393 | reinterpret_cast<char*>(&capture_post_gain_) - |
| 2394 | reinterpret_cast<char*>(&capture_pre_gain_)) + sizeof(capture_post_gain_)); |
| 2395 | } |
| 2396 | _has_bits_.Clear(); |
| 2397 | _internal_metadata_.Clear<std::string>(); |
| 2398 | } |
| 2399 |
| 2400 | const char* RuntimeSetting::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 2401 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 2402 | _Internal::HasBits has_bits{}; |
| 2403 | while (!ctx->Done(&ptr)) { |
| 2404 | uint32_t tag; |
| 2405 | ptr = ::_pbi::ReadTag(ptr, &tag); |
| 2406 | switch (tag >> 3) { |
| 2407 | // optional float capture_pre_gain = 1; |
| 2408 | case 1: |
| 2409 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) { |
| 2410 | _Internal::set_has_capture_pre_gain(&has_bits); |
| 2411 | capture_pre_gain_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr); |
| 2412 | ptr += sizeof(float); |
| 2413 | } else |
| 2414 | goto handle_unusual; |
| 2415 | continue; |
| 2416 | // optional float custom_render_processing_setting = 2; |
| 2417 | case 2: |
| 2418 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) { |
| 2419 | _Internal::set_has_custom_render_processing_setting(&has_bits); |
| 2420 | custom_render_processing_setting_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr); |
| 2421 | ptr += sizeof(float); |
| 2422 | } else |
| 2423 | goto handle_unusual; |
| 2424 | continue; |
| 2425 | // optional float capture_fixed_post_gain = 3; |
| 2426 | case 3: |
| 2427 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) { |
| 2428 | _Internal::set_has_capture_fixed_post_gain(&has_bits); |
| 2429 | capture_fixed_post_gain_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr); |
| 2430 | ptr += sizeof(float); |
| 2431 | } else |
| 2432 | goto handle_unusual; |
| 2433 | continue; |
| 2434 | // optional int32 playout_volume_change = 4; |
| 2435 | case 4: |
| 2436 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { |
| 2437 | _Internal::set_has_playout_volume_change(&has_bits); |
| 2438 | playout_volume_change_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
| 2439 | CHK_(ptr); |
| 2440 | } else |
| 2441 | goto handle_unusual; |
| 2442 | continue; |
| 2443 | // optional .webrtc.audioproc.PlayoutAudioDeviceInfo playout_audio_device_change = 5; |
| 2444 | case 5: |
| 2445 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { |
| 2446 | ptr = ctx->ParseMessage(_internal_mutable_playout_audio_device_change(), ptr); |
| 2447 | CHK_(ptr); |
| 2448 | } else |
| 2449 | goto handle_unusual; |
| 2450 | continue; |
| 2451 | // optional bool capture_output_used = 6; |
| 2452 | case 6: |
| 2453 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { |
| 2454 | _Internal::set_has_capture_output_used(&has_bits); |
| 2455 | capture_output_used_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 2456 | CHK_(ptr); |
| 2457 | } else |
| 2458 | goto handle_unusual; |
| 2459 | continue; |
| 2460 | // optional float capture_post_gain = 7; |
| 2461 | case 7: |
| 2462 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) { |
| 2463 | _Internal::set_has_capture_post_gain(&has_bits); |
| 2464 | capture_post_gain_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr); |
| 2465 | ptr += sizeof(float); |
| 2466 | } else |
| 2467 | goto handle_unusual; |
| 2468 | continue; |
| 2469 | default: |
| 2470 | goto handle_unusual; |
| 2471 | } // switch |
| 2472 | handle_unusual: |
| 2473 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 2474 | CHK_(ptr); |
| 2475 | ctx->SetLastTag(tag); |
| 2476 | goto message_done; |
| 2477 | } |
| 2478 | ptr = UnknownFieldParse( |
| 2479 | tag, |
| 2480 | _internal_metadata_.mutable_unknown_fields<std::string>(), |
| 2481 | ptr, ctx); |
| 2482 | CHK_(ptr != nullptr); |
| 2483 | } // while |
| 2484 | message_done: |
| 2485 | _has_bits_.Or(has_bits); |
| 2486 | return ptr; |
| 2487 | failure: |
| 2488 | ptr = nullptr; |
| 2489 | goto message_done; |
| 2490 | #undef CHK_ |
| 2491 | } |
| 2492 |
| 2493 | uint8_t* RuntimeSetting::_InternalSerialize( |
| 2494 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 2495 | // @@protoc_insertion_point(serialize_to_array_start:webrtc.audioproc.RuntimeSetting) |
| 2496 | uint32_t cached_has_bits = 0; |
| 2497 | (void) cached_has_bits; |
| 2498 |
| 2499 | cached_has_bits = _has_bits_[0]; |
| 2500 | // optional float capture_pre_gain = 1; |
| 2501 | if (cached_has_bits & 0x00000002u) { |
| 2502 | target = stream->EnsureSpace(target); |
| 2503 | target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_capture_pre_gain(), target); |
| 2504 | } |
| 2505 |
| 2506 | // optional float custom_render_processing_setting = 2; |
| 2507 | if (cached_has_bits & 0x00000004u) { |
| 2508 | target = stream->EnsureSpace(target); |
| 2509 | target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_custom_render_processing_setting(), target); |
| 2510 | } |
| 2511 |
| 2512 | // optional float capture_fixed_post_gain = 3; |
| 2513 | if (cached_has_bits & 0x00000008u) { |
| 2514 | target = stream->EnsureSpace(target); |
| 2515 | target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_capture_fixed_post_gain(), target); |
| 2516 | } |
| 2517 |
| 2518 | // optional int32 playout_volume_change = 4; |
| 2519 | if (cached_has_bits & 0x00000010u) { |
| 2520 | target = stream->EnsureSpace(target); |
| 2521 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_playout_volume_change(), target); |
| 2522 | } |
| 2523 |
| 2524 | // optional .webrtc.audioproc.PlayoutAudioDeviceInfo playout_audio_device_change = 5; |
| 2525 | if (cached_has_bits & 0x00000001u) { |
| 2526 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| 2527 | InternalWriteMessage(5, _Internal::playout_audio_device_change(this), |
| 2528 | _Internal::playout_audio_device_change(this).GetCachedSize(), target, stream); |
| 2529 | } |
| 2530 |
| 2531 | // optional bool capture_output_used = 6; |
| 2532 | if (cached_has_bits & 0x00000020u) { |
| 2533 | target = stream->EnsureSpace(target); |
| 2534 | target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_capture_output_used(), target); |
| 2535 | } |
| 2536 |
| 2537 | // optional float capture_post_gain = 7; |
| 2538 | if (cached_has_bits & 0x00000040u) { |
| 2539 | target = stream->EnsureSpace(target); |
| 2540 | target = ::_pbi::WireFormatLite::WriteFloatToArray(7, this->_internal_capture_post_gain(), target); |
| 2541 | } |
| 2542 |
| 2543 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 2544 | target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), |
| 2545 | static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); |
| 2546 | } |
| 2547 | // @@protoc_insertion_point(serialize_to_array_end:webrtc.audioproc.RuntimeSetting) |
| 2548 | return target; |
| 2549 | } |
| 2550 |
| 2551 | size_t RuntimeSetting::ByteSizeLong() const { |
| 2552 | // @@protoc_insertion_point(message_byte_size_start:webrtc.audioproc.RuntimeSetting) |
| 2553 | size_t total_size = 0; |
| 2554 |
| 2555 | uint32_t cached_has_bits = 0; |
| 2556 | // Prevent compiler warnings about cached_has_bits being unused |
| 2557 | (void) cached_has_bits; |
| 2558 |
| 2559 | cached_has_bits = _has_bits_[0]; |
| 2560 | if (cached_has_bits & 0x0000007fu) { |
| 2561 | // optional .webrtc.audioproc.PlayoutAudioDeviceInfo playout_audio_device_change = 5; |
| 2562 | if (cached_has_bits & 0x00000001u) { |
| 2563 | total_size += 1 + |
| 2564 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| 2565 | *playout_audio_device_change_); |
| 2566 | } |
| 2567 |
| 2568 | // optional float capture_pre_gain = 1; |
| 2569 | if (cached_has_bits & 0x00000002u) { |
| 2570 | total_size += 1 + 4; |
| 2571 | } |
| 2572 |
| 2573 | // optional float custom_render_processing_setting = 2; |
| 2574 | if (cached_has_bits & 0x00000004u) { |
| 2575 | total_size += 1 + 4; |
| 2576 | } |
| 2577 |
| 2578 | // optional float capture_fixed_post_gain = 3; |
| 2579 | if (cached_has_bits & 0x00000008u) { |
| 2580 | total_size += 1 + 4; |
| 2581 | } |
| 2582 |
| 2583 | // optional int32 playout_volume_change = 4; |
| 2584 | if (cached_has_bits & 0x00000010u) { |
| 2585 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_playout_volume_change()); |
| 2586 | } |
| 2587 |
| 2588 | // optional bool capture_output_used = 6; |
| 2589 | if (cached_has_bits & 0x00000020u) { |
| 2590 | total_size += 1 + 1; |
| 2591 | } |
| 2592 |
| 2593 | // optional float capture_post_gain = 7; |
| 2594 | if (cached_has_bits & 0x00000040u) { |
| 2595 | total_size += 1 + 4; |
| 2596 | } |
| 2597 |
| 2598 | } |
| 2599 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 2600 | total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); |
| 2601 | } |
| 2602 | int cached_size = ::_pbi::ToCachedSize(total_size); |
| 2603 | SetCachedSize(cached_size); |
| 2604 | return total_size; |
| 2605 | } |
| 2606 |
| 2607 | void RuntimeSetting::CheckTypeAndMergeFrom( |
| 2608 | const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| 2609 | MergeFrom(*::_pbi::DownCast<const RuntimeSetting*>( |
| 2610 | &from)); |
| 2611 | } |
| 2612 |
| 2613 | void RuntimeSetting::MergeFrom(const RuntimeSetting& from) { |
| 2614 | // @@protoc_insertion_point(class_specific_merge_from_start:webrtc.audioproc.RuntimeSetting) |
| 2615 | GOOGLE_DCHECK_NE(&from, this); |
| 2616 | uint32_t cached_has_bits = 0; |
| 2617 | (void) cached_has_bits; |
| 2618 |
| 2619 | cached_has_bits = from._has_bits_[0]; |
| 2620 | if (cached_has_bits & 0x0000007fu) { |
| 2621 | if (cached_has_bits & 0x00000001u) { |
| 2622 | _internal_mutable_playout_audio_device_change()->::webrtc::audioproc::PlayoutAudioDeviceInfo::MergeFrom(from._internal_playout_audio_device_change()); |
| 2623 | } |
| 2624 | if (cached_has_bits & 0x00000002u) { |
| 2625 | capture_pre_gain_ = from.capture_pre_gain_; |
| 2626 | } |
| 2627 | if (cached_has_bits & 0x00000004u) { |
| 2628 | custom_render_processing_setting_ = from.custom_render_processing_setting_; |
| 2629 | } |
| 2630 | if (cached_has_bits & 0x00000008u) { |
| 2631 | capture_fixed_post_gain_ = from.capture_fixed_post_gain_; |
| 2632 | } |
| 2633 | if (cached_has_bits & 0x00000010u) { |
| 2634 | playout_volume_change_ = from.playout_volume_change_; |
| 2635 | } |
| 2636 | if (cached_has_bits & 0x00000020u) { |
| 2637 | capture_output_used_ = from.capture_output_used_; |
| 2638 | } |
| 2639 | if (cached_has_bits & 0x00000040u) { |
| 2640 | capture_post_gain_ = from.capture_post_gain_; |
| 2641 | } |
| 2642 | _has_bits_[0] |= cached_has_bits; |
| 2643 | } |
| 2644 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 2645 | } |
| 2646 |
| 2647 | void RuntimeSetting::CopyFrom(const RuntimeSetting& from) { |
| 2648 | // @@protoc_insertion_point(class_specific_copy_from_start:webrtc.audioproc.RuntimeSetting) |
| 2649 | if (&from == this) return; |
| 2650 | Clear(); |
| 2651 | MergeFrom(from); |
| 2652 | } |
| 2653 |
| 2654 | bool RuntimeSetting::IsInitialized() const { |
| 2655 | return true; |
| 2656 | } |
| 2657 |
| 2658 | void RuntimeSetting::InternalSwap(RuntimeSetting* other) { |
| 2659 | using std::swap; |
| 2660 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| 2661 | swap(_has_bits_[0], other->_has_bits_[0]); |
| 2662 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| 2663 | PROTOBUF_FIELD_OFFSET(RuntimeSetting, capture_post_gain_) |
| 2664 | + sizeof(RuntimeSetting::capture_post_gain_) |
| 2665 | - PROTOBUF_FIELD_OFFSET(RuntimeSetting, playout_audio_device_change_)>( |
| 2666 | reinterpret_cast<char*>(&playout_audio_device_change_), |
| 2667 | reinterpret_cast<char*>(&other->playout_audio_device_change_)); |
| 2668 | } |
| 2669 |
| 2670 | std::string RuntimeSetting::GetTypeName() const { |
| 2671 | return "webrtc.audioproc.RuntimeSetting"; |
| 2672 | } |
| 2673 |
| 2674 |
| 2675 | // =================================================================== |
| 2676 |
| 2677 | class Event::_Internal { |
| 2678 | public: |
| 2679 | using HasBits = decltype(std::declval<Event>()._has_bits_); |
| 2680 | static void set_has_type(HasBits* has_bits) { |
| 2681 | (*has_bits)[0] |= 32u; |
| 2682 | } |
| 2683 | static const ::webrtc::audioproc::Init& init(const Event* msg); |
| 2684 | static void set_has_init(HasBits* has_bits) { |
| 2685 | (*has_bits)[0] |= 1u; |
| 2686 | } |
| 2687 | static const ::webrtc::audioproc::ReverseStream& reverse_stream(const Event* msg); |
| 2688 | static void set_has_reverse_stream(HasBits* has_bits) { |
| 2689 | (*has_bits)[0] |= 2u; |
| 2690 | } |
| 2691 | static const ::webrtc::audioproc::Stream& stream(const Event* msg); |
| 2692 | static void set_has_stream(HasBits* has_bits) { |
| 2693 | (*has_bits)[0] |= 4u; |
| 2694 | } |
| 2695 | static const ::webrtc::audioproc::Config& config(const Event* msg); |
| 2696 | static void set_has_config(HasBits* has_bits) { |
| 2697 | (*has_bits)[0] |= 8u; |
| 2698 | } |
| 2699 | static const ::webrtc::audioproc::RuntimeSetting& runtime_setting(const Event* msg); |
| 2700 | static void set_has_runtime_setting(HasBits* has_bits) { |
| 2701 | (*has_bits)[0] |= 16u; |
| 2702 | } |
| 2703 | static bool MissingRequiredFields(const HasBits& has_bits) { |
| 2704 | return ((has_bits[0] & 0x00000020) ^ 0x00000020) != 0; |
| 2705 | } |
| 2706 | }; |
| 2707 |
| 2708 | const ::webrtc::audioproc::Init& |
| 2709 | Event::_Internal::init(const Event* msg) { |
| 2710 | return *msg->init_; |
| 2711 | } |
| 2712 | const ::webrtc::audioproc::ReverseStream& |
| 2713 | Event::_Internal::reverse_stream(const Event* msg) { |
| 2714 | return *msg->reverse_stream_; |
| 2715 | } |
| 2716 | const ::webrtc::audioproc::Stream& |
| 2717 | Event::_Internal::stream(const Event* msg) { |
| 2718 | return *msg->stream_; |
| 2719 | } |
| 2720 | const ::webrtc::audioproc::Config& |
| 2721 | Event::_Internal::config(const Event* msg) { |
| 2722 | return *msg->config_; |
| 2723 | } |
| 2724 | const ::webrtc::audioproc::RuntimeSetting& |
| 2725 | Event::_Internal::runtime_setting(const Event* msg) { |
| 2726 | return *msg->runtime_setting_; |
| 2727 | } |
| 2728 | Event::Event(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 2729 | bool is_message_owned) |
| 2730 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { |
| 2731 | SharedCtor(); |
| 2732 | // @@protoc_insertion_point(arena_constructor:webrtc.audioproc.Event) |
| 2733 | } |
| 2734 | Event::Event(const Event& from) |
| 2735 | : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| 2736 | _has_bits_(from._has_bits_) { |
| 2737 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 2738 | if (from._internal_has_init()) { |
| 2739 | init_ = new ::webrtc::audioproc::Init(*from.init_); |
| 2740 | } else { |
| 2741 | init_ = nullptr; |
| 2742 | } |
| 2743 | if (from._internal_has_reverse_stream()) { |
| 2744 | reverse_stream_ = new ::webrtc::audioproc::ReverseStream(*from.reverse_stream_); |
| 2745 | } else { |
| 2746 | reverse_stream_ = nullptr; |
| 2747 | } |
| 2748 | if (from._internal_has_stream()) { |
| 2749 | stream_ = new ::webrtc::audioproc::Stream(*from.stream_); |
| 2750 | } else { |
| 2751 | stream_ = nullptr; |
| 2752 | } |
| 2753 | if (from._internal_has_config()) { |
| 2754 | config_ = new ::webrtc::audioproc::Config(*from.config_); |
| 2755 | } else { |
| 2756 | config_ = nullptr; |
| 2757 | } |
| 2758 | if (from._internal_has_runtime_setting()) { |
| 2759 | runtime_setting_ = new ::webrtc::audioproc::RuntimeSetting(*from.runtime_setting_); |
| 2760 | } else { |
| 2761 | runtime_setting_ = nullptr; |
| 2762 | } |
| 2763 | type_ = from.type_; |
| 2764 | // @@protoc_insertion_point(copy_constructor:webrtc.audioproc.Event) |
| 2765 | } |
| 2766 |
| 2767 | inline void Event::SharedCtor() { |
| 2768 | ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
| 2769 | reinterpret_cast<char*>(&init_) - reinterpret_cast<char*>(this)), |
| 2770 | 0, static_cast<size_t>(reinterpret_cast<char*>(&type_) - |
| 2771 | reinterpret_cast<char*>(&init_)) + sizeof(type_)); |
| 2772 | } |
| 2773 |
| 2774 | Event::~Event() { |
| 2775 | // @@protoc_insertion_point(destructor:webrtc.audioproc.Event) |
| 2776 | if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { |
| 2777 | (void)arena; |
| 2778 | return; |
| 2779 | } |
| 2780 | SharedDtor(); |
| 2781 | } |
| 2782 |
| 2783 | inline void Event::SharedDtor() { |
| 2784 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 2785 | if (this != internal_default_instance()) delete init_; |
| 2786 | if (this != internal_default_instance()) delete reverse_stream_; |
| 2787 | if (this != internal_default_instance()) delete stream_; |
| 2788 | if (this != internal_default_instance()) delete config_; |
| 2789 | if (this != internal_default_instance()) delete runtime_setting_; |
| 2790 | } |
| 2791 |
| 2792 | void Event::SetCachedSize(int size) const { |
| 2793 | _cached_size_.Set(size); |
| 2794 | } |
| 2795 |
| 2796 | void Event::Clear() { |
| 2797 | // @@protoc_insertion_point(message_clear_start:webrtc.audioproc.Event) |
| 2798 | uint32_t cached_has_bits = 0; |
| 2799 | // Prevent compiler warnings about cached_has_bits being unused |
| 2800 | (void) cached_has_bits; |
| 2801 |
| 2802 | cached_has_bits = _has_bits_[0]; |
| 2803 | if (cached_has_bits & 0x0000001fu) { |
| 2804 | if (cached_has_bits & 0x00000001u) { |
| 2805 | GOOGLE_DCHECK(init_ != nullptr); |
| 2806 | init_->Clear(); |
| 2807 | } |
| 2808 | if (cached_has_bits & 0x00000002u) { |
| 2809 | GOOGLE_DCHECK(reverse_stream_ != nullptr); |
| 2810 | reverse_stream_->Clear(); |
| 2811 | } |
| 2812 | if (cached_has_bits & 0x00000004u) { |
| 2813 | GOOGLE_DCHECK(stream_ != nullptr); |
| 2814 | stream_->Clear(); |
| 2815 | } |
| 2816 | if (cached_has_bits & 0x00000008u) { |
| 2817 | GOOGLE_DCHECK(config_ != nullptr); |
| 2818 | config_->Clear(); |
| 2819 | } |
| 2820 | if (cached_has_bits & 0x00000010u) { |
| 2821 | GOOGLE_DCHECK(runtime_setting_ != nullptr); |
| 2822 | runtime_setting_->Clear(); |
| 2823 | } |
| 2824 | } |
| 2825 | type_ = 0; |
| 2826 | _has_bits_.Clear(); |
| 2827 | _internal_metadata_.Clear<std::string>(); |
| 2828 | } |
| 2829 |
| 2830 | const char* Event::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 2831 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 2832 | _Internal::HasBits has_bits{}; |
| 2833 | while (!ctx->Done(&ptr)) { |
| 2834 | uint32_t tag; |
| 2835 | ptr = ::_pbi::ReadTag(ptr, &tag); |
| 2836 | switch (tag >> 3) { |
| 2837 | // required .webrtc.audioproc.Event.Type type = 1; |
| 2838 | case 1: |
| 2839 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
| 2840 | uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
| 2841 | CHK_(ptr); |
| 2842 | if (PROTOBUF_PREDICT_TRUE(::webrtc::audioproc::Event_Type_IsValid(val))) { |
| 2843 | _internal_set_type(static_cast<::webrtc::audioproc::Event_Type>(val)); |
| 2844 | } else { |
| 2845 | ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); |
| 2846 | } |
| 2847 | } else |
| 2848 | goto handle_unusual; |
| 2849 | continue; |
| 2850 | // optional .webrtc.audioproc.Init init = 2; |
| 2851 | case 2: |
| 2852 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
| 2853 | ptr = ctx->ParseMessage(_internal_mutable_init(), ptr); |
| 2854 | CHK_(ptr); |
| 2855 | } else |
| 2856 | goto handle_unusual; |
| 2857 | continue; |
| 2858 | // optional .webrtc.audioproc.ReverseStream reverse_stream = 3; |
| 2859 | case 3: |
| 2860 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { |
| 2861 | ptr = ctx->ParseMessage(_internal_mutable_reverse_stream(), ptr); |
| 2862 | CHK_(ptr); |
| 2863 | } else |
| 2864 | goto handle_unusual; |
| 2865 | continue; |
| 2866 | // optional .webrtc.audioproc.Stream stream = 4; |
| 2867 | case 4: |
| 2868 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { |
| 2869 | ptr = ctx->ParseMessage(_internal_mutable_stream(), ptr); |
| 2870 | CHK_(ptr); |
| 2871 | } else |
| 2872 | goto handle_unusual; |
| 2873 | continue; |
| 2874 | // optional .webrtc.audioproc.Config config = 5; |
| 2875 | case 5: |
| 2876 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { |
| 2877 | ptr = ctx->ParseMessage(_internal_mutable_config(), ptr); |
| 2878 | CHK_(ptr); |
| 2879 | } else |
| 2880 | goto handle_unusual; |
| 2881 | continue; |
| 2882 | // optional .webrtc.audioproc.RuntimeSetting runtime_setting = 6; |
| 2883 | case 6: |
| 2884 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) { |
| 2885 | ptr = ctx->ParseMessage(_internal_mutable_runtime_setting(), ptr); |
| 2886 | CHK_(ptr); |
| 2887 | } else |
| 2888 | goto handle_unusual; |
| 2889 | continue; |
| 2890 | default: |
| 2891 | goto handle_unusual; |
| 2892 | } // switch |
| 2893 | handle_unusual: |
| 2894 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 2895 | CHK_(ptr); |
| 2896 | ctx->SetLastTag(tag); |
| 2897 | goto message_done; |
| 2898 | } |
| 2899 | ptr = UnknownFieldParse( |
| 2900 | tag, |
| 2901 | _internal_metadata_.mutable_unknown_fields<std::string>(), |
| 2902 | ptr, ctx); |
| 2903 | CHK_(ptr != nullptr); |
| 2904 | } // while |
| 2905 | message_done: |
| 2906 | _has_bits_.Or(has_bits); |
| 2907 | return ptr; |
| 2908 | failure: |
| 2909 | ptr = nullptr; |
| 2910 | goto message_done; |
| 2911 | #undef CHK_ |
| 2912 | } |
| 2913 |
| 2914 | uint8_t* Event::_InternalSerialize( |
| 2915 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 2916 | // @@protoc_insertion_point(serialize_to_array_start:webrtc.audioproc.Event) |
| 2917 | uint32_t cached_has_bits = 0; |
| 2918 | (void) cached_has_bits; |
| 2919 |
| 2920 | cached_has_bits = _has_bits_[0]; |
| 2921 | // required .webrtc.audioproc.Event.Type type = 1; |
| 2922 | if (cached_has_bits & 0x00000020u) { |
| 2923 | target = stream->EnsureSpace(target); |
| 2924 | target = ::_pbi::WireFormatLite::WriteEnumToArray( |
| 2925 | 1, this->_internal_type(), target); |
| 2926 | } |
| 2927 |
| 2928 | // optional .webrtc.audioproc.Init init = 2; |
| 2929 | if (cached_has_bits & 0x00000001u) { |
| 2930 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| 2931 | InternalWriteMessage(2, _Internal::init(this), |
| 2932 | _Internal::init(this).GetCachedSize(), target, stream); |
| 2933 | } |
| 2934 |
| 2935 | // optional .webrtc.audioproc.ReverseStream reverse_stream = 3; |
| 2936 | if (cached_has_bits & 0x00000002u) { |
| 2937 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| 2938 | InternalWriteMessage(3, _Internal::reverse_stream(this), |
| 2939 | _Internal::reverse_stream(this).GetCachedSize(), target, stream); |
| 2940 | } |
| 2941 |
| 2942 | // optional .webrtc.audioproc.Stream stream = 4; |
| 2943 | if (cached_has_bits & 0x00000004u) { |
| 2944 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| 2945 | InternalWriteMessage(4, _Internal::stream(this), |
| 2946 | _Internal::stream(this).GetCachedSize(), target, stream); |
| 2947 | } |
| 2948 |
| 2949 | // optional .webrtc.audioproc.Config config = 5; |
| 2950 | if (cached_has_bits & 0x00000008u) { |
| 2951 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| 2952 | InternalWriteMessage(5, _Internal::config(this), |
| 2953 | _Internal::config(this).GetCachedSize(), target, stream); |
| 2954 | } |
| 2955 |
| 2956 | // optional .webrtc.audioproc.RuntimeSetting runtime_setting = 6; |
| 2957 | if (cached_has_bits & 0x00000010u) { |
| 2958 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| 2959 | InternalWriteMessage(6, _Internal::runtime_setting(this), |
| 2960 | _Internal::runtime_setting(this).GetCachedSize(), target, stream); |
| 2961 | } |
| 2962 |
| 2963 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 2964 | target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), |
| 2965 | static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); |
| 2966 | } |
| 2967 | // @@protoc_insertion_point(serialize_to_array_end:webrtc.audioproc.Event) |
| 2968 | return target; |
| 2969 | } |
| 2970 |
| 2971 | size_t Event::ByteSizeLong() const { |
| 2972 | // @@protoc_insertion_point(message_byte_size_start:webrtc.audioproc.Event) |
| 2973 | size_t total_size = 0; |
| 2974 |
| 2975 | // required .webrtc.audioproc.Event.Type type = 1; |
| 2976 | if (_internal_has_type()) { |
| 2977 | total_size += 1 + |
| 2978 | ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); |
| 2979 | } |
| 2980 | uint32_t cached_has_bits = 0; |
| 2981 | // Prevent compiler warnings about cached_has_bits being unused |
| 2982 | (void) cached_has_bits; |
| 2983 |
| 2984 | cached_has_bits = _has_bits_[0]; |
| 2985 | if (cached_has_bits & 0x0000001fu) { |
| 2986 | // optional .webrtc.audioproc.Init init = 2; |
| 2987 | if (cached_has_bits & 0x00000001u) { |
| 2988 | total_size += 1 + |
| 2989 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| 2990 | *init_); |
| 2991 | } |
| 2992 |
| 2993 | // optional .webrtc.audioproc.ReverseStream reverse_stream = 3; |
| 2994 | if (cached_has_bits & 0x00000002u) { |
| 2995 | total_size += 1 + |
| 2996 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| 2997 | *reverse_stream_); |
| 2998 | } |
| 2999 |
| 3000 | // optional .webrtc.audioproc.Stream stream = 4; |
| 3001 | if (cached_has_bits & 0x00000004u) { |
| 3002 | total_size += 1 + |
| 3003 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| 3004 | *stream_); |
| 3005 | } |
| 3006 |
| 3007 | // optional .webrtc.audioproc.Config config = 5; |
| 3008 | if (cached_has_bits & 0x00000008u) { |
| 3009 | total_size += 1 + |
| 3010 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| 3011 | *config_); |
| 3012 | } |
| 3013 |
| 3014 | // optional .webrtc.audioproc.RuntimeSetting runtime_setting = 6; |
| 3015 | if (cached_has_bits & 0x00000010u) { |
| 3016 | total_size += 1 + |
| 3017 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| 3018 | *runtime_setting_); |
| 3019 | } |
| 3020 |
| 3021 | } |
| 3022 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 3023 | total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); |
| 3024 | } |
| 3025 | int cached_size = ::_pbi::ToCachedSize(total_size); |
| 3026 | SetCachedSize(cached_size); |
| 3027 | return total_size; |
| 3028 | } |
| 3029 |
| 3030 | void Event::CheckTypeAndMergeFrom( |
| 3031 | const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| 3032 | MergeFrom(*::_pbi::DownCast<const Event*>( |
| 3033 | &from)); |
| 3034 | } |
| 3035 |
| 3036 | void Event::MergeFrom(const Event& from) { |
| 3037 | // @@protoc_insertion_point(class_specific_merge_from_start:webrtc.audioproc.Event) |
| 3038 | GOOGLE_DCHECK_NE(&from, this); |
| 3039 | uint32_t cached_has_bits = 0; |
| 3040 | (void) cached_has_bits; |
| 3041 |
| 3042 | cached_has_bits = from._has_bits_[0]; |
| 3043 | if (cached_has_bits & 0x0000003fu) { |
| 3044 | if (cached_has_bits & 0x00000001u) { |
| 3045 | _internal_mutable_init()->::webrtc::audioproc::Init::MergeFrom(from._internal_init()); |
| 3046 | } |
| 3047 | if (cached_has_bits & 0x00000002u) { |
| 3048 | _internal_mutable_reverse_stream()->::webrtc::audioproc::ReverseStream::MergeFrom(from._internal_reverse_stream()); |
| 3049 | } |
| 3050 | if (cached_has_bits & 0x00000004u) { |
| 3051 | _internal_mutable_stream()->::webrtc::audioproc::Stream::MergeFrom(from._internal_stream()); |
| 3052 | } |
| 3053 | if (cached_has_bits & 0x00000008u) { |
| 3054 | _internal_mutable_config()->::webrtc::audioproc::Config::MergeFrom(from._internal_config()); |
| 3055 | } |
| 3056 | if (cached_has_bits & 0x00000010u) { |
| 3057 | _internal_mutable_runtime_setting()->::webrtc::audioproc::RuntimeSetting::MergeFrom(from._internal_runtime_setting()); |
| 3058 | } |
| 3059 | if (cached_has_bits & 0x00000020u) { |
| 3060 | type_ = from.type_; |
| 3061 | } |
| 3062 | _has_bits_[0] |= cached_has_bits; |
| 3063 | } |
| 3064 | _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); |
| 3065 | } |
| 3066 |
| 3067 | void Event::CopyFrom(const Event& from) { |
| 3068 | // @@protoc_insertion_point(class_specific_copy_from_start:webrtc.audioproc.Event) |
| 3069 | if (&from == this) return; |
| 3070 | Clear(); |
| 3071 | MergeFrom(from); |
| 3072 | } |
| 3073 |
| 3074 | bool Event::IsInitialized() const { |
| 3075 | if (_Internal::MissingRequiredFields(_has_bits_)) return false; |
| 3076 | return true; |
| 3077 | } |
| 3078 |
| 3079 | void Event::InternalSwap(Event* other) { |
| 3080 | using std::swap; |
| 3081 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
| 3082 | swap(_has_bits_[0], other->_has_bits_[0]); |
| 3083 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| 3084 | PROTOBUF_FIELD_OFFSET(Event, type_) |
| 3085 | + sizeof(Event::type_) |
| 3086 | - PROTOBUF_FIELD_OFFSET(Event, init_)>( |
| 3087 | reinterpret_cast<char*>(&init_), |
| 3088 | reinterpret_cast<char*>(&other->init_)); |
| 3089 | } |
| 3090 |
| 3091 | std::string Event::GetTypeName() const { |
| 3092 | return "webrtc.audioproc.Event"; |
| 3093 | } |
| 3094 |
| 3095 |
| 3096 | // @@protoc_insertion_point(namespace_scope) |
| 3097 | } // namespace audioproc |
| 3098 | } // namespace webrtc |
| 3099 | PROTOBUF_NAMESPACE_OPEN |
| 3100 | template<> PROTOBUF_NOINLINE ::webrtc::audioproc::Init* |
| 3101 | Arena::CreateMaybeMessage< ::webrtc::audioproc::Init >(Arena* arena) { |
| 3102 | return Arena::CreateMessageInternal< ::webrtc::audioproc::Init >(arena); |
| 3103 | } |
| 3104 | template<> PROTOBUF_NOINLINE ::webrtc::audioproc::ReverseStream* |
| 3105 | Arena::CreateMaybeMessage< ::webrtc::audioproc::ReverseStream >(Arena* arena) { |
| 3106 | return Arena::CreateMessageInternal< ::webrtc::audioproc::ReverseStream >(arena); |
| 3107 | } |
| 3108 | template<> PROTOBUF_NOINLINE ::webrtc::audioproc::Stream* |
| 3109 | Arena::CreateMaybeMessage< ::webrtc::audioproc::Stream >(Arena* arena) { |
| 3110 | return Arena::CreateMessageInternal< ::webrtc::audioproc::Stream >(arena); |
| 3111 | } |
| 3112 | template<> PROTOBUF_NOINLINE ::webrtc::audioproc::Config* |
| 3113 | Arena::CreateMaybeMessage< ::webrtc::audioproc::Config >(Arena* arena) { |
| 3114 | return Arena::CreateMessageInternal< ::webrtc::audioproc::Config >(arena); |
| 3115 | } |
| 3116 | template<> PROTOBUF_NOINLINE ::webrtc::audioproc::PlayoutAudioDeviceInfo* |
| 3117 | Arena::CreateMaybeMessage< ::webrtc::audioproc::PlayoutAudioDeviceInfo >(Arena* arena) { |
| 3118 | return Arena::CreateMessageInternal< ::webrtc::audioproc::PlayoutAudioDeviceInfo >(arena); |
| 3119 | } |
| 3120 | template<> PROTOBUF_NOINLINE ::webrtc::audioproc::RuntimeSetting* |
| 3121 | Arena::CreateMaybeMessage< ::webrtc::audioproc::RuntimeSetting >(Arena* arena) { |
| 3122 | return Arena::CreateMessageInternal< ::webrtc::audioproc::RuntimeSetting >(arena); |
| 3123 | } |
| 3124 | template<> PROTOBUF_NOINLINE ::webrtc::audioproc::Event* |
| 3125 | Arena::CreateMaybeMessage< ::webrtc::audioproc::Event >(Arena* arena) { |
| 3126 | return Arena::CreateMessageInternal< ::webrtc::audioproc::Event >(arena); |
| 3127 | } |
| 3128 | PROTOBUF_NAMESPACE_CLOSE |
| 3129 |
| 3130 | // @@protoc_insertion_point(global_scope) |
| 3131 | #include <google/protobuf/port_undef.inc> |
| 3132 |