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; |