OLD | NEW |
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 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include "media/base/android/media_codec_decoder.h" | 9 #include "media/base/android/media_codec_decoder.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 MediaCodecVideoDecoder( | 29 MediaCodecVideoDecoder( |
30 const scoped_refptr<base::SingleThreadTaskRunner>& media_runner, | 30 const scoped_refptr<base::SingleThreadTaskRunner>& media_runner, |
31 FrameStatistics* frame_statistics, | 31 FrameStatistics* frame_statistics, |
32 const base::Closure& request_data_cb, | 32 const base::Closure& request_data_cb, |
33 const base::Closure& starvation_cb, | 33 const base::Closure& starvation_cb, |
34 const base::Closure& drained_requested_cb, | 34 const base::Closure& drained_requested_cb, |
35 const base::Closure& stop_done_cb, | 35 const base::Closure& stop_done_cb, |
36 const base::Closure& waiting_for_decryption_key_cb, | 36 const base::Closure& waiting_for_decryption_key_cb, |
37 const base::Closure& error_cb, | 37 const base::Closure& error_cb, |
38 const SetTimeCallback& update_current_time_cb, | 38 const SetTimeCallback& update_current_time_cb, |
39 const VideoSizeChangedCallback& video_size_changed_cb, | 39 const VideoSizeChangedCallback& video_size_changed_cb); |
40 const base::Closure& codec_created_cb); | |
41 ~MediaCodecVideoDecoder() override; | 40 ~MediaCodecVideoDecoder() override; |
42 | 41 |
43 const char* class_name() const override; | 42 const char* class_name() const override; |
44 | 43 |
45 bool HasStream() const override; | 44 bool HasStream() const override; |
46 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; | 45 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; |
47 bool IsContentEncrypted() const override; | 46 bool IsContentEncrypted() const override; |
48 void ReleaseDecoderResources() override; | 47 void ReleaseDecoderResources() override; |
49 void ReleaseMediaCodec() override; | 48 void ReleaseMediaCodec() override; |
50 | 49 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 99 |
101 // Flags that indicates whether we need protected surface. | 100 // Flags that indicates whether we need protected surface. |
102 bool is_protected_surface_required_; | 101 bool is_protected_surface_required_; |
103 | 102 |
104 // Reports current playback time to the callee. | 103 // Reports current playback time to the callee. |
105 SetTimeCallback update_current_time_cb_; | 104 SetTimeCallback update_current_time_cb_; |
106 | 105 |
107 // Informs the callee that video size is changed. | 106 // Informs the callee that video size is changed. |
108 VideoSizeChangedCallback video_size_changed_cb_; | 107 VideoSizeChangedCallback video_size_changed_cb_; |
109 | 108 |
110 // Informs the callee that the MediaCodec is created. | |
111 base::Closure codec_created_cb_; | |
112 | |
113 // Current video size to be sent with |video_size_changed_cb_|. | 109 // Current video size to be sent with |video_size_changed_cb_|. |
114 gfx::Size video_size_; | 110 gfx::Size video_size_; |
115 | 111 |
116 // Indices of output buffers that are posted for rendering. | 112 // Indices of output buffers that are posted for rendering. |
117 std::set<int> delayed_buffers_; | 113 std::set<int> delayed_buffers_; |
118 | 114 |
119 // Associate presentation timestamps with time. | 115 // Associate presentation timestamps with time. |
120 base::TimeTicks start_time_ticks_; | 116 base::TimeTicks start_time_ticks_; |
121 base::TimeDelta start_pts_; | 117 base::TimeDelta start_pts_; |
122 | 118 |
123 // Mantain the last seen PTS for stand-alone EOS. | 119 // Mantain the last seen PTS for stand-alone EOS. |
124 base::TimeDelta last_seen_pts_; | 120 base::TimeDelta last_seen_pts_; |
125 | 121 |
126 DISALLOW_COPY_AND_ASSIGN(MediaCodecVideoDecoder); | 122 DISALLOW_COPY_AND_ASSIGN(MediaCodecVideoDecoder); |
127 }; | 123 }; |
128 | 124 |
129 } // namespace media | 125 } // namespace media |
130 | 126 |
131 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ | 127 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ |
OLD | NEW |