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

Side by Side Diff: media/base/decoder_buffer.cc

Issue 1422643002: Pass DecryptConfig parameters over IPC and use it in AVDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/decoder_buffer.h" 5 #include "media/base/decoder_buffer.h"
6 6
7 7
8 namespace media { 8 namespace media {
9 9
10 // Allocates a block of memory which is padded for use with the SIMD 10 // Allocates a block of memory which is padded for use with the SIMD
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 std::ostringstream s; 93 std::ostringstream s;
94 s << "timestamp: " << timestamp_.InMicroseconds() 94 s << "timestamp: " << timestamp_.InMicroseconds()
95 << " duration: " << duration_.InMicroseconds() 95 << " duration: " << duration_.InMicroseconds()
96 << " size: " << size_ 96 << " size: " << size_
97 << " side_data_size: " << side_data_size_ 97 << " side_data_size: " << side_data_size_
98 << " is_key_frame: " << is_key_frame_ 98 << " is_key_frame: " << is_key_frame_
99 << " encrypted: " << (decrypt_config_ != NULL) 99 << " encrypted: " << (decrypt_config_ != NULL)
100 << " discard_padding (ms): (" << discard_padding_.first.InMilliseconds() 100 << " discard_padding (ms): (" << discard_padding_.first.InMilliseconds()
101 << ", " << discard_padding_.second.InMilliseconds() << ")"; 101 << ", " << discard_padding_.second.InMilliseconds() << ")";
102
103 if (decrypt_config_)
104 s << " decrypt:" << (*decrypt_config_);
105
102 return s.str(); 106 return s.str();
103 } 107 }
104 108
105 void DecoderBuffer::set_timestamp(base::TimeDelta timestamp) { 109 void DecoderBuffer::set_timestamp(base::TimeDelta timestamp) {
106 DCHECK(!end_of_stream()); 110 DCHECK(!end_of_stream());
107 timestamp_ = timestamp; 111 timestamp_ = timestamp;
108 } 112 }
109 113
110 void DecoderBuffer::CopySideDataFrom(const uint8* side_data, 114 void DecoderBuffer::CopySideDataFrom(const uint8* side_data,
111 int side_data_size) { 115 int side_data_size) {
112 if (side_data_size > 0) { 116 if (side_data_size > 0) {
113 side_data_size_ = side_data_size; 117 side_data_size_ = side_data_size;
114 side_data_.reset(AllocateFFmpegSafeBlock(side_data_size_)); 118 side_data_.reset(AllocateFFmpegSafeBlock(side_data_size_));
115 memcpy(side_data_.get(), side_data, side_data_size_); 119 memcpy(side_data_.get(), side_data, side_data_size_);
116 } else { 120 } else {
117 side_data_.reset(); 121 side_data_.reset();
118 side_data_size_ = 0; 122 side_data_size_ = 0;
119 } 123 }
120 } 124 }
121 125
122 } // namespace media 126 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698