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

Side by Side Diff: media/cdm/ppapi/cdm_adapter.h

Issue 568623003: CdmAdapter: Report size of the file read by CDM via FileIO. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only report the first file read in CdmFileIOImpl (becase the completion cb can only be used once). Created 6 years, 3 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 | « no previous file | media/cdm/ppapi/cdm_adapter.cc » ('j') | media/cdm/ppapi/cdm_file_io_impl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 5 #ifndef MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
6 #define MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 6 #define MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 void DeliverSamples(int32_t result, 240 void DeliverSamples(int32_t result,
241 const cdm::Status& status, 241 const cdm::Status& status,
242 const LinkedAudioFrames& audio_frames, 242 const LinkedAudioFrames& audio_frames,
243 const PP_DecryptTrackingInfo& tracking_info); 243 const PP_DecryptTrackingInfo& tracking_info);
244 244
245 // Helper for SetTimer(). 245 // Helper for SetTimer().
246 void TimerExpired(int32_t result, void* context); 246 void TimerExpired(int32_t result, void* context);
247 247
248 bool IsValidVideoFrame(const LinkedVideoFrame& video_frame); 248 bool IsValidVideoFrame(const LinkedVideoFrame& video_frame);
249 249
250 // Callback to report |file_size_bytes| of the first file read by FileIO.
251 void OnFirstFileRead(int32_t file_size_bytes);
252
250 #if !defined(NDEBUG) 253 #if !defined(NDEBUG)
251 // Logs the given message to the JavaScript console associated with the 254 // Logs the given message to the JavaScript console associated with the
252 // CDM adapter instance. The name of the CDM adapter issuing the log message 255 // CDM adapter instance. The name of the CDM adapter issuing the log message
253 // will be automatically prepended to the message. 256 // will be automatically prepended to the message.
254 void LogToConsole(const pp::Var& value); 257 void LogToConsole(const pp::Var& value);
255 #endif // !defined(NDEBUG) 258 #endif // !defined(NDEBUG)
256 259
257 #if defined(OS_CHROMEOS) 260 #if defined(OS_CHROMEOS)
258 void ReportOutputProtectionUMA(OutputProtectionStatus status); 261 void ReportOutputProtectionUMA(OutputProtectionStatus status);
259 void ReportOutputProtectionQuery(); 262 void ReportOutputProtectionQuery();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 std::string key_system_; 294 std::string key_system_;
292 295
293 // If the CDM returned kDeferredInitialization during InitializeAudioDecoder() 296 // If the CDM returned kDeferredInitialization during InitializeAudioDecoder()
294 // or InitializeVideoDecoder(), the (Audio|Video)DecoderConfig.request_id is 297 // or InitializeVideoDecoder(), the (Audio|Video)DecoderConfig.request_id is
295 // saved for the future call to OnDeferredInitializationDone(). 298 // saved for the future call to OnDeferredInitializationDone().
296 bool deferred_initialize_audio_decoder_; 299 bool deferred_initialize_audio_decoder_;
297 uint32_t deferred_audio_decoder_config_id_; 300 uint32_t deferred_audio_decoder_config_id_;
298 bool deferred_initialize_video_decoder_; 301 bool deferred_initialize_video_decoder_;
299 uint32_t deferred_video_decoder_config_id_; 302 uint32_t deferred_video_decoder_config_id_;
300 303
304 uint32_t last_read_file_size_kb_;
305 bool file_size_uma_reported_;
306
301 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); 307 DISALLOW_COPY_AND_ASSIGN(CdmAdapter);
302 }; 308 };
303 309
304 } // namespace media 310 } // namespace media
305 311
306 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 312 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | media/cdm/ppapi/cdm_adapter.cc » ('j') | media/cdm/ppapi/cdm_file_io_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698