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

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

Issue 2252043003: Added recording of the configuration for the AudioFrame API call (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 RETURN_ON_ERR(MaybeInitializeCapture(processing_config)); 631 RETURN_ON_ERR(MaybeInitializeCapture(processing_config));
632 } 632 }
633 rtc::CritScope cs_capture(&crit_capture_); 633 rtc::CritScope cs_capture(&crit_capture_);
634 if (frame->samples_per_channel_ != 634 if (frame->samples_per_channel_ !=
635 formats_.api_format.input_stream().num_frames()) { 635 formats_.api_format.input_stream().num_frames()) {
636 return kBadDataLengthError; 636 return kBadDataLengthError;
637 } 637 }
638 638
639 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP 639 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
640 if (debug_dump_.debug_file->is_open()) { 640 if (debug_dump_.debug_file->is_open()) {
641 RETURN_ON_ERR(WriteConfigMessage(false));
642
641 debug_dump_.capture.event_msg->set_type(audioproc::Event::STREAM); 643 debug_dump_.capture.event_msg->set_type(audioproc::Event::STREAM);
642 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); 644 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream();
643 const size_t data_size = 645 const size_t data_size =
644 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; 646 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_;
645 msg->set_input_data(frame->data_, data_size); 647 msg->set_input_data(frame->data_, data_size);
646 } 648 }
647 #endif 649 #endif
648 650
649 capture_.capture_audio->DeinterleaveFrom(frame); 651 capture_.capture_audio->DeinterleaveFrom(frame);
650 RETURN_ON_ERR(ProcessStreamLocked()); 652 RETURN_ON_ERR(ProcessStreamLocked());
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); 1492 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config);
1491 1493
1492 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), 1494 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(),
1493 &debug_dump_.num_bytes_left_for_log_, 1495 &debug_dump_.num_bytes_left_for_log_,
1494 &crit_debug_, &debug_dump_.capture)); 1496 &crit_debug_, &debug_dump_.capture));
1495 return kNoError; 1497 return kNoError;
1496 } 1498 }
1497 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP 1499 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
1498 1500
1499 } // namespace webrtc 1501 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698