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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h

Issue 2275903002: Make FakeDecodeFromFile handle codec-internal CNG (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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h
diff --git a/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h b/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h
index 2c51998261c3998baa85345f6fafcab173d865a6..d210438d45ef431d69a4d66ae9c19303c97b0ba6 100644
--- a/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h
+++ b/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.h
@@ -50,11 +50,13 @@ class FakeDecodeFromFile : public AudioDecoder {
int16_t* decoded,
SpeechType* speech_type) override;
- // Helper method. Writes |timestamp| and |samples| to |encoded| in a format
- // that the FakeDecpdeFromFile decoder will understand. |encoded| must be at
- // least 8 bytes long.
+ // Helper method. Writes |timestamp|, |samples| and
+ // |original_payload_size_bytes| to |encoded| in a format that the
+ // FakeDecpdeFromFile decoder will understand. |encoded| must be at least 12
ivoc 2016/08/24 14:55:28 Typo: FakeDecodeFromFile.
hlundin-webrtc 2016/08/24 15:27:36 Done.
+ // bytes long.
static void PrepareEncoded(uint32_t timestamp,
size_t samples,
+ size_t original_payload_size_bytes,
rtc::ArrayView<uint8_t> encoded);
private:
@@ -62,6 +64,8 @@ class FakeDecodeFromFile : public AudioDecoder {
rtc::Optional<uint32_t> next_timestamp_from_input_;
const int sample_rate_hz_;
const bool stereo_;
+ size_t last_decoded_length_ = 0;
+ bool cng_mode_ = false;
};
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698