Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 | 47 |
| 48 MultiEndCall( | 48 MultiEndCall( |
| 49 rtc::ArrayView<const Turn> timing, const std::string& audiotracks_path, | 49 rtc::ArrayView<const Turn> timing, const std::string& audiotracks_path, |
| 50 std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory); | 50 std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory); |
| 51 ~MultiEndCall(); | 51 ~MultiEndCall(); |
| 52 | 52 |
| 53 const std::set<std::string>& speaker_names() const; | 53 const std::set<std::string>& speaker_names() const; |
| 54 const std::map<std::string, std::unique_ptr<WavReaderInterface>>& | 54 const std::map<std::string, std::unique_ptr<WavReaderInterface>>& |
| 55 audiotrack_readers() const; | 55 audiotrack_readers() const; |
| 56 bool valid() const; | 56 bool valid() const; |
| 57 int sample_rate() const; | |
|
minyue-webrtc
2017/05/16 15:05:16
can put getter function inline
int sample_rate_hz
AleBzk
2017/05/17 12:49:38
Done.
| |
| 57 size_t total_duration_samples() const; | 58 size_t total_duration_samples() const; |
| 58 const std::vector<SpeakingTurn>& speaking_turns() const; | 59 const std::vector<SpeakingTurn>& speaking_turns() const; |
| 59 | 60 |
| 60 private: | 61 private: |
| 61 // Finds unique speaker names. | 62 // Finds unique speaker names. |
| 62 void FindSpeakerNames(); | 63 void FindSpeakerNames(); |
| 63 | 64 |
| 64 // Creates one WavReader instance for each unique audiotrack. | 65 // Creates one WavReader instance for each unique audiotrack. It returns false |
| 65 void CreateAudioTrackReaders(); | 66 // if the audio tracks do not have the same sample rate or if they are not |
| 67 // mono. | |
| 68 bool CreateAudioTrackReaders(); | |
| 66 | 69 |
| 67 // Validates the speaking turns timing information. Accepts cross-talk, but | 70 // Validates the speaking turns timing information. Accepts cross-talk, but |
| 68 // only up to 2 speakers. Rejects unordered turns and self cross-talk. | 71 // only up to 2 speakers. Rejects unordered turns and self cross-talk. |
| 69 bool CheckTiming(); | 72 bool CheckTiming(); |
| 70 | 73 |
| 71 rtc::ArrayView<const Turn> timing_; | 74 rtc::ArrayView<const Turn> timing_; |
| 72 const std::string& audiotracks_path_; | 75 const std::string& audiotracks_path_; |
| 73 std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory_; | 76 std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory_; |
| 74 std::set<std::string> speaker_names_; | 77 std::set<std::string> speaker_names_; |
| 75 std::map<std::string, std::unique_ptr<WavReaderInterface>> | 78 std::map<std::string, std::unique_ptr<WavReaderInterface>> |
| 76 audiotrack_readers_; | 79 audiotrack_readers_; |
| 77 bool valid_; | 80 bool valid_; |
| 81 int sample_rate_; | |
|
minyue-webrtc
2017/05/16 15:05:16
needs a unit, ie., sample_rate_hz_;
AleBzk
2017/05/17 12:49:38
Done.
| |
| 78 size_t total_duration_samples_; | 82 size_t total_duration_samples_; |
| 79 std::vector<SpeakingTurn> speaking_turns_; | 83 std::vector<SpeakingTurn> speaking_turns_; |
| 80 | 84 |
| 81 RTC_DISALLOW_COPY_AND_ASSIGN(MultiEndCall); | 85 RTC_DISALLOW_COPY_AND_ASSIGN(MultiEndCall); |
| 82 }; | 86 }; |
| 83 | 87 |
| 84 } // namespace conversational_speech | 88 } // namespace conversational_speech |
| 85 } // namespace test | 89 } // namespace test |
| 86 } // namespace webrtc | 90 } // namespace webrtc |
| 87 | 91 |
| 88 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_C ALL_H_ | 92 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MULTIEND_C ALL_H_ |
| OLD | NEW |