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

Side by Side Diff: media/base/android/video_decoder_job.cc

Issue 1367403003: Added UMA metrics for MediaSourcePlayer and MediaCodecPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-drm
Patch Set: Attempt to fix clang compilation 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
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | media/media.gyp » ('j') | no next file with comments »
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 #include "media/base/android/video_decoder_job.h" 5 #include "media/base/android/video_decoder_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "media/base/android/media_codec_bridge.h" 10 #include "media/base/android/media_codec_bridge.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // TODO(qinmin): Check if it is tolerable to use worker pool to handle all the 22 // TODO(qinmin): Check if it is tolerable to use worker pool to handle all the
23 // decoding tasks so that we don't need a global thread here. 23 // decoding tasks so that we don't need a global thread here.
24 // http://crbug.com/245750 24 // http://crbug.com/245750
25 base::LazyInstance<VideoDecoderThread>::Leaky 25 base::LazyInstance<VideoDecoderThread>::Leaky
26 g_video_decoder_thread = LAZY_INSTANCE_INITIALIZER; 26 g_video_decoder_thread = LAZY_INSTANCE_INITIALIZER;
27 27
28 VideoDecoderJob::VideoDecoderJob( 28 VideoDecoderJob::VideoDecoderJob(
29 const base::Closure& request_data_cb, 29 const base::Closure& request_data_cb,
30 const base::Closure& request_resources_cb, 30 const base::Closure& request_resources_cb,
31 const base::Closure& on_demuxer_config_changed_cb) 31 const base::Closure& on_demuxer_config_changed_cb,
32 FrameStatistics* frame_statistics)
32 : MediaDecoderJob(g_video_decoder_thread.Pointer()->task_runner(), 33 : MediaDecoderJob(g_video_decoder_thread.Pointer()->task_runner(),
33 request_data_cb, 34 request_data_cb,
34 on_demuxer_config_changed_cb), 35 on_demuxer_config_changed_cb,
36 frame_statistics),
35 video_codec_(kUnknownVideoCodec), 37 video_codec_(kUnknownVideoCodec),
36 config_width_(0), 38 config_width_(0),
37 config_height_(0), 39 config_height_(0),
38 output_width_(0), 40 output_width_(0),
39 output_height_(0), 41 output_height_(0),
40 request_resources_cb_(request_resources_cb) { 42 request_resources_cb_(request_resources_cb) {
41 } 43 }
42 44
43 VideoDecoderJob::~VideoDecoderJob() {} 45 VideoDecoderJob::~VideoDecoderJob() {}
44 46
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return (output_width_ != prev_output_width) || 160 return (output_width_ != prev_output_width) ||
159 (output_height_ != prev_output_height); 161 (output_height_ != prev_output_height);
160 } 162 }
161 163
162 bool VideoDecoderJob::IsProtectedSurfaceRequired() { 164 bool VideoDecoderJob::IsProtectedSurfaceRequired() {
163 return is_content_encrypted() && drm_bridge() && 165 return is_content_encrypted() && drm_bridge() &&
164 drm_bridge()->IsProtectedSurfaceRequired(); 166 drm_bridge()->IsProtectedSurfaceRequired();
165 } 167 }
166 168
167 } // namespace media 169 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/video_decoder_job.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698