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

Unified Diff: media/base/decoder_buffer.cc

Issue 1651673002: Add MediaCodecAudioDecoder implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: media/base/decoder_buffer.cc
diff --git a/media/base/decoder_buffer.cc b/media/base/decoder_buffer.cc
index 621ba00539a3d3a4d55611f7290d2a958aeab9fc..ec0d01b29b776d938b3fb185b00290f5c8ae9227 100644
--- a/media/base/decoder_buffer.cc
+++ b/media/base/decoder_buffer.cc
@@ -99,6 +99,21 @@ std::string DecoderBuffer::AsHumanReadableString() {
return s.str();
}
+std::string DecoderBuffer::AsShortString() {
+ if (end_of_stream()) {
+ return "EOS";
+ }
+
+ std::ostringstream s;
+ s << "timestamp: " << timestamp_;
+ if (is_key_frame_)
+ s << " KEY";
+ if (decrypt_config_)
+ s << " decrypt:" << (*decrypt_config_);
+
+ return s.str();
+}
+
void DecoderBuffer::set_timestamp(base::TimeDelta timestamp) {
DCHECK(!end_of_stream());
timestamp_ = timestamp;

Powered by Google App Engine
This is Rietveld 408576698