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

Side by Side Diff: media/remoting/proto_utils.cc

Issue 2895573002: Reland of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Fix the compile fails in build target "jpeg_decode_accelerator_unittest" Created 3 years, 7 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
« no previous file with comments | « media/mojo/services/mojo_cdm_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/remoting/proto_utils.h" 5 #include "media/remoting/proto_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/big_endian.h" 9 #include "base/big_endian.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 stats->audio_memory_usage = stats_message.audio_memory_usage(); 344 stats->audio_memory_usage = stats_message.audio_memory_usage();
345 stats->video_memory_usage = stats_message.video_memory_usage(); 345 stats->video_memory_usage = stats_message.video_memory_usage();
346 // HACK: Set the following to prevent "disable video when hidden" logic in 346 // HACK: Set the following to prevent "disable video when hidden" logic in
347 // media::blink::WebMediaPlayerImpl. 347 // media::blink::WebMediaPlayerImpl.
348 stats->video_keyframe_distance_average = base::TimeDelta::Max(); 348 stats->video_keyframe_distance_average = base::TimeDelta::Max();
349 } 349 }
350 350
351 void ConvertCdmKeyInfoToProto( 351 void ConvertCdmKeyInfoToProto(
352 const CdmKeysInfo& keys_information, 352 const CdmKeysInfo& keys_information,
353 pb::CdmClientOnSessionKeysChange* key_change_message) { 353 pb::CdmClientOnSessionKeysChange* key_change_message) {
354 for (auto* info : keys_information) { 354 for (auto& info : keys_information) {
355 pb::CdmKeyInformation* key = key_change_message->add_key_information(); 355 pb::CdmKeyInformation* key = key_change_message->add_key_information();
356 key->set_key_id(info->key_id.data(), info->key_id.size()); 356 key->set_key_id(info->key_id.data(), info->key_id.size());
357 key->set_status(ToProtoCdmKeyInformation(info->status).value()); 357 key->set_status(ToProtoCdmKeyInformation(info->status).value());
358 key->set_system_code(info->system_code); 358 key->set_system_code(info->system_code);
359 } 359 }
360 } 360 }
361 361
362 void ConvertProtoToCdmKeyInfo( 362 void ConvertProtoToCdmKeyInfo(
363 const pb::CdmClientOnSessionKeysChange keychange_message, 363 const pb::CdmClientOnSessionKeysChange keychange_message,
364 CdmKeysInfo* key_information) { 364 CdmKeysInfo* key_information) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 CdmPromiseResult::~CdmPromiseResult() = default; 459 CdmPromiseResult::~CdmPromiseResult() = default;
460 460
461 CdmPromiseResult CdmPromiseResult::SuccessResult() { 461 CdmPromiseResult CdmPromiseResult::SuccessResult() {
462 CdmPromiseResult result(static_cast<CdmPromise::Exception>(0), 0, ""); 462 CdmPromiseResult result(static_cast<CdmPromise::Exception>(0), 0, "");
463 result.success_ = true; 463 result.success_ = true;
464 return result; 464 return result;
465 } 465 }
466 466
467 } // namespace remoting 467 } // namespace remoting
468 } // namespace media 468 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_cdm_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698