OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 | 370 |
371 output_file_recorder_ = FileRecorder::CreateFileRecorder( | 371 output_file_recorder_ = FileRecorder::CreateFileRecorder( |
372 _instanceId, (const FileFormats)format); | 372 _instanceId, (const FileFormats)format); |
373 if (!output_file_recorder_) { | 373 if (!output_file_recorder_) { |
374 _engineStatisticsPtr->SetLastError( | 374 _engineStatisticsPtr->SetLastError( |
375 VE_INVALID_ARGUMENT, kTraceError, | 375 VE_INVALID_ARGUMENT, kTraceError, |
376 "StartRecordingPlayout() fileRecorder format isnot correct"); | 376 "StartRecordingPlayout() fileRecorder format isnot correct"); |
377 return -1; | 377 return -1; |
378 } | 378 } |
379 | 379 |
380 if (output_file_recorder_->StartRecordingAudioFile(*stream, *codecInst, | 380 if (output_file_recorder_->StartRecordingAudioFile(stream, *codecInst, |
381 notificationTime) != 0) { | 381 notificationTime) != 0) { |
382 _engineStatisticsPtr->SetLastError( | 382 _engineStatisticsPtr->SetLastError( |
383 VE_BAD_FILE, kTraceError, | 383 VE_BAD_FILE, kTraceError, |
384 "StartRecordingAudioFile() failed to start file recording"); | 384 "StartRecordingAudioFile() failed to start file recording"); |
385 output_file_recorder_->StopRecording(); | 385 output_file_recorder_->StopRecording(); |
386 output_file_recorder_.reset(); | 386 output_file_recorder_.reset(); |
387 return -1; | 387 return -1; |
388 } | 388 } |
389 | 389 |
390 output_file_recorder_->RegisterModuleFileCallback(this); | 390 output_file_recorder_->RegisterModuleFileCallback(this); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 } | 499 } |
500 | 500 |
501 // --- Measure audio level (0-9) for the combined signal | 501 // --- Measure audio level (0-9) for the combined signal |
502 _audioLevel.ComputeLevel(_audioFrame); | 502 _audioLevel.ComputeLevel(_audioFrame); |
503 | 503 |
504 return 0; | 504 return 0; |
505 } | 505 } |
506 } // namespace voe | 506 } // namespace voe |
507 } // namespace webrtc | 507 } // namespace webrtc |
OLD | NEW |