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 #ifndef MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 STATUS_FAILURE, | 38 STATUS_FAILURE, |
39 }; | 39 }; |
40 | 40 |
41 struct Deleter { | 41 struct Deleter { |
42 inline void operator()(MediaDecoderJob* ptr) const { ptr->Release(); } | 42 inline void operator()(MediaDecoderJob* ptr) const { ptr->Release(); } |
43 }; | 43 }; |
44 | 44 |
45 // Callback when a decoder job finishes its work. Args: whether decode | 45 // Callback when a decoder job finishes its work. Args: whether decode |
46 // finished successfully, a flag whether the frame is late for statistics, | 46 // finished successfully, a flag whether the frame is late for statistics, |
47 // cacurrent presentation time, max presentation time. | 47 // cacurrent presentation time, max presentation time. |
48 // If the current presentation time is equal to kNoTimestamp(), the decoder | 48 // If the current presentation time is equal to kNoTimestamp, the decoder |
49 // job skipped rendering of the decoded output and the callback target should | 49 // job skipped rendering of the decoded output and the callback target should |
50 // ignore the timestamps provided. The late frame flag has no meaning in this | 50 // ignore the timestamps provided. The late frame flag has no meaning in this |
51 // case. | 51 // case. |
52 typedef base::Callback<void(MediaCodecStatus, bool, base::TimeDelta, | 52 typedef base::Callback<void(MediaCodecStatus, bool, base::TimeDelta, |
53 base::TimeDelta)> DecoderCallback; | 53 base::TimeDelta)> DecoderCallback; |
54 | 54 |
55 virtual ~MediaDecoderJob(); | 55 virtual ~MediaDecoderJob(); |
56 | 56 |
57 // Called by MediaSourcePlayer when more data for this object has arrived. | 57 // Called by MediaSourcePlayer when more data for this object has arrived. |
58 void OnDataReceived(const DemuxerData& data); | 58 void OnDataReceived(const DemuxerData& data); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 // This access unit is passed to the decoder during config changes to drain | 358 // This access unit is passed to the decoder during config changes to drain |
359 // the decoder. | 359 // the decoder. |
360 AccessUnit eos_unit_; | 360 AccessUnit eos_unit_; |
361 | 361 |
362 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 362 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
363 }; | 363 }; |
364 | 364 |
365 } // namespace media | 365 } // namespace media |
366 | 366 |
367 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 367 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
OLD | NEW |