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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 // getting passed to the media thread and causing |result| to be destructed 798 // getting passed to the media thread and causing |result| to be destructed
799 // on the wrong thread in some failure conditions. 799 // on the wrong thread in some failure conditions.
800 set_cdm_result_.reset(new blink::WebContentDecryptionModuleResult(result)); 800 set_cdm_result_.reset(new blink::WebContentDecryptionModuleResult(result));
801 801
802 SetCdm(BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnCdmAttached), 802 SetCdm(BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnCdmAttached),
803 ToWebContentDecryptionModuleImpl(cdm)->GetCdmContext()); 803 ToWebContentDecryptionModuleImpl(cdm)->GetCdmContext());
804 } 804 }
805 805
806 void WebMediaPlayerImpl::OnEncryptedMediaInitData( 806 void WebMediaPlayerImpl::OnEncryptedMediaInitData(
807 EmeInitDataType init_data_type, 807 EmeInitDataType init_data_type,
808 const std::vector<uint8>& init_data) { 808 const std::vector<uint8_t>& init_data) {
809 DCHECK(init_data_type != EmeInitDataType::UNKNOWN); 809 DCHECK(init_data_type != EmeInitDataType::UNKNOWN);
810 810
811 // Do not fire "encrypted" event if encrypted media is not enabled. 811 // Do not fire "encrypted" event if encrypted media is not enabled.
812 // TODO(xhwang): Handle this in |client_|. 812 // TODO(xhwang): Handle this in |client_|.
813 if (!blink::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled() && 813 if (!blink::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled() &&
814 !blink::WebRuntimeFeatures::isEncryptedMediaEnabled()) { 814 !blink::WebRuntimeFeatures::isEncryptedMediaEnabled()) {
815 return; 815 return;
816 } 816 }
817 817
818 // TODO(xhwang): Update this UMA name. 818 // TODO(xhwang): Update this UMA name.
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1367 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1368 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1368 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1369 << ", Demuxer: " << demuxer_memory_usage; 1369 << ", Demuxer: " << demuxer_memory_usage;
1370 1370
1371 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1371 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1372 last_reported_memory_usage_ = current_memory_usage; 1372 last_reported_memory_usage_ = current_memory_usage;
1373 adjust_allocated_memory_cb_.Run(delta); 1373 adjust_allocated_memory_cb_.Run(delta);
1374 } 1374 }
1375 1375
1376 } // namespace media 1376 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698