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

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: Removed CDM stuff, fixed Opus Created 4 years, 10 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..e9300956565b03f615aa0f5e24e5be2eae106b3a 100644
--- a/media/base/decoder_buffer.cc
+++ b/media/base/decoder_buffer.cc
@@ -78,20 +78,25 @@ scoped_refptr<DecoderBuffer> DecoderBuffer::CreateEOSBuffer() {
return make_scoped_refptr(new DecoderBuffer(NULL, 0, NULL, 0));
}
-std::string DecoderBuffer::AsHumanReadableString() {
+std::string DecoderBuffer::AsHumanReadableString(int flags) {
if (end_of_stream()) {
return "end of stream";
}
std::ostringstream s;
- s << "timestamp: " << timestamp_.InMicroseconds()
- << " duration: " << duration_.InMicroseconds()
- << " size: " << size_
- << " side_data_size: " << side_data_size_
- << " is_key_frame: " << is_key_frame_
- << " encrypted: " << (decrypt_config_ != NULL)
- << " discard_padding (ms): (" << discard_padding_.first.InMilliseconds()
- << ", " << discard_padding_.second.InMilliseconds() << ")";
+ if ((flags & kShortFormat) == kShortFormat) {
+ s << "timestamp: " << timestamp_;
+ if (is_key_frame_)
+ s << " KEY";
+ } else {
+ s << "timestamp: " << timestamp_.InMicroseconds()
+ << " duration: " << duration_.InMicroseconds() << " size: " << size_
+ << " side_data_size: " << side_data_size_
+ << " is_key_frame: " << is_key_frame_
+ << " encrypted: " << (decrypt_config_ != NULL)
+ << " discard_padding (ms): (" << discard_padding_.first.InMilliseconds()
+ << ", " << discard_padding_.second.InMilliseconds() << ")";
+ }
if (decrypt_config_)
s << " decrypt:" << (*decrypt_config_);

Powered by Google App Engine
This is Rietveld 408576698