OLD | NEW |
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/media_decoder_job.h" | 5 #include "media/base/android/media_decoder_job.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
11 #include "media/base/android/media_codec_bridge.h" | 11 #include "media/base/android/media_codec_bridge.h" |
12 #include "media/base/bind_to_loop.h" | 12 #include "media/base/bind_to_current_loop.h" |
13 #include "media/base/buffers.h" | 13 #include "media/base/buffers.h" |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 | 16 |
17 // Timeout value for media codec operations. Because the first | 17 // Timeout value for media codec operations. Because the first |
18 // DequeInputBuffer() can take about 150 milliseconds, use 250 milliseconds | 18 // DequeInputBuffer() can take about 150 milliseconds, use 250 milliseconds |
19 // here. See http://b/9357571. | 19 // here. See http://b/9357571. |
20 static const int kMediaCodecTimeoutInMilliseconds = 250; | 20 static const int kMediaCodecTimeoutInMilliseconds = 250; |
21 | 21 |
22 MediaDecoderJob::MediaDecoderJob( | 22 MediaDecoderJob::MediaDecoderJob( |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // Do nothing. | 422 // Do nothing. |
423 break; | 423 break; |
424 }; | 424 }; |
425 | 425 |
426 stop_decode_pending_ = false; | 426 stop_decode_pending_ = false; |
427 base::ResetAndReturn(&decode_cb_).Run(status, presentation_timestamp, | 427 base::ResetAndReturn(&decode_cb_).Run(status, presentation_timestamp, |
428 audio_output_bytes); | 428 audio_output_bytes); |
429 } | 429 } |
430 | 430 |
431 } // namespace media | 431 } // namespace media |
OLD | NEW |