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

Side by Side Diff: media/base/android/media_codec_decoder.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/media_codec_decoder.h" 5 #include "media/base/android/media_codec_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 const int kNextFrameDelay = 1; 25 const int kNextFrameDelay = 1;
26 26
27 // Timeout for dequeuing an input buffer from MediaCodec in milliseconds. 27 // Timeout for dequeuing an input buffer from MediaCodec in milliseconds.
28 const int kInputBufferTimeout = 20; 28 const int kInputBufferTimeout = 20;
29 29
30 // Timeout for dequeuing an output buffer from MediaCodec in milliseconds. 30 // Timeout for dequeuing an output buffer from MediaCodec in milliseconds.
31 const int kOutputBufferTimeout = 20; 31 const int kOutputBufferTimeout = 20;
32 } 32 }
33 33
34 MediaCodecDecoder::MediaCodecDecoder( 34 MediaCodecDecoder::MediaCodecDecoder(
35 const char* decoder_thread_name,
35 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 36 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
37 FrameStatistics* frame_statistics,
36 const base::Closure& external_request_data_cb, 38 const base::Closure& external_request_data_cb,
37 const base::Closure& starvation_cb, 39 const base::Closure& starvation_cb,
38 const base::Closure& decoder_drained_cb, 40 const base::Closure& decoder_drained_cb,
39 const base::Closure& stop_done_cb, 41 const base::Closure& stop_done_cb,
40 const base::Closure& waiting_for_decryption_key_cb, 42 const base::Closure& waiting_for_decryption_key_cb,
41 const base::Closure& error_cb, 43 const base::Closure& error_cb)
42 const char* decoder_thread_name) 44 : decoder_thread_(decoder_thread_name),
43 : media_task_runner_(media_task_runner), 45 media_task_runner_(media_task_runner),
44 decoder_thread_(decoder_thread_name), 46 frame_statistics_(frame_statistics),
45 needs_reconfigure_(false), 47 needs_reconfigure_(false),
46 drain_decoder_(false), 48 drain_decoder_(false),
47 always_reconfigure_for_tests_(false), 49 always_reconfigure_for_tests_(false),
48 external_request_data_cb_(external_request_data_cb), 50 external_request_data_cb_(external_request_data_cb),
49 starvation_cb_(starvation_cb), 51 starvation_cb_(starvation_cb),
50 decoder_drained_cb_(decoder_drained_cb), 52 decoder_drained_cb_(decoder_drained_cb),
51 stop_done_cb_(stop_done_cb), 53 stop_done_cb_(stop_done_cb),
52 waiting_for_decryption_key_cb_(waiting_for_decryption_key_cb), 54 waiting_for_decryption_key_cb_(waiting_for_decryption_key_cb),
53 error_cb_(error_cb), 55 error_cb_(error_cb),
54 state_(kStopped), 56 state_(kStopped),
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 RETURN_STRING(kStopping); 949 RETURN_STRING(kStopping);
948 RETURN_STRING(kInEmergencyStop); 950 RETURN_STRING(kInEmergencyStop);
949 RETURN_STRING(kError); 951 RETURN_STRING(kError);
950 } 952 }
951 return nullptr; // crash early 953 return nullptr; // crash early
952 } 954 }
953 955
954 #undef RETURN_STRING 956 #undef RETURN_STRING
955 957
956 } // namespace media 958 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_decoder.h ('k') | media/base/android/media_codec_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698