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

Side by Side Diff: media/filters/fake_demuxer_stream.cc

Issue 119203003: Drop DecryptConfig::data_offset_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/filters/fake_demuxer_stream.h" 5 #include "media/filters/fake_demuxer_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 scoped_refptr<DecoderBuffer> buffer = CreateFakeVideoBufferForTest( 146 scoped_refptr<DecoderBuffer> buffer = CreateFakeVideoBufferForTest(
147 video_decoder_config_, current_timestamp_, duration_); 147 video_decoder_config_, current_timestamp_, duration_);
148 148
149 // TODO(xhwang): Output out-of-order buffers if needed. 149 // TODO(xhwang): Output out-of-order buffers if needed.
150 if (is_encrypted_) { 150 if (is_encrypted_) {
151 buffer->set_decrypt_config(scoped_ptr<DecryptConfig>( 151 buffer->set_decrypt_config(scoped_ptr<DecryptConfig>(
152 new DecryptConfig(std::string(kKeyId, kKeyId + arraysize(kKeyId)), 152 new DecryptConfig(std::string(kKeyId, kKeyId + arraysize(kKeyId)),
153 std::string(kIv, kIv + arraysize(kIv)), 153 std::string(kIv, kIv + arraysize(kIv)),
154 0,
155 std::vector<SubsampleEntry>()))); 154 std::vector<SubsampleEntry>())));
156 } 155 }
157 buffer->set_timestamp(current_timestamp_); 156 buffer->set_timestamp(current_timestamp_);
158 buffer->set_duration(duration_); 157 buffer->set_duration(duration_);
159 current_timestamp_ += duration_; 158 current_timestamp_ += duration_;
160 159
161 num_buffers_left_in_current_config_--; 160 num_buffers_left_in_current_config_--;
162 if (num_buffers_left_in_current_config_ == 0) 161 if (num_buffers_left_in_current_config_ == 0)
163 num_configs_left_--; 162 num_configs_left_--;
164 163
165 num_buffers_returned_++; 164 num_buffers_returned_++;
166 base::ResetAndReturn(&read_cb_).Run(kOk, buffer); 165 base::ResetAndReturn(&read_cb_).Run(kOk, buffer);
167 } 166 }
168 167
169 } // namespace media 168 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698