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 16 matching lines...) Expand all Loading... |
27 // class might use it to release more resources so that this | 27 // class might use it to release more resources so that this |
28 // decoder can use them. | 28 // decoder can use them. |
29 MediaCodecVideoDecoder( | 29 MediaCodecVideoDecoder( |
30 const scoped_refptr<base::SingleThreadTaskRunner>& media_runner, | 30 const scoped_refptr<base::SingleThreadTaskRunner>& media_runner, |
31 const base::Closure& request_data_cb, | 31 const base::Closure& request_data_cb, |
32 const base::Closure& starvation_cb, | 32 const base::Closure& starvation_cb, |
33 const base::Closure& drained_requested_cb, | 33 const base::Closure& drained_requested_cb, |
34 const base::Closure& stop_done_cb, | 34 const base::Closure& stop_done_cb, |
35 const base::Closure& error_cb, | 35 const base::Closure& error_cb, |
36 const SetTimeCallback& update_current_time_cb, | 36 const SetTimeCallback& update_current_time_cb, |
37 const VideoSizeChangedCallback& video_size_changed_cb, | 37 const VideoSizeChangedCallback& video_size_changed_cb); |
38 const base::Closure& codec_created_cb); | |
39 ~MediaCodecVideoDecoder() override; | 38 ~MediaCodecVideoDecoder() override; |
40 | 39 |
41 const char* class_name() const override; | 40 const char* class_name() const override; |
42 | 41 |
43 bool HasStream() const override; | 42 bool HasStream() const override; |
44 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; | 43 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; |
45 void ReleaseDecoderResources() override; | 44 void ReleaseDecoderResources() override; |
46 void ReleaseMediaCodec() override; | 45 void ReleaseMediaCodec() override; |
47 | 46 |
48 // Stores the video surface to use with upcoming Configure() | 47 // Stores the video surface to use with upcoming Configure() |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 87 |
89 // Video surface that we render to. | 88 // Video surface that we render to. |
90 gfx::ScopedJavaSurface surface_; | 89 gfx::ScopedJavaSurface surface_; |
91 | 90 |
92 // Reports current playback time to the callee. | 91 // Reports current playback time to the callee. |
93 SetTimeCallback update_current_time_cb_; | 92 SetTimeCallback update_current_time_cb_; |
94 | 93 |
95 // Informs the callee that video size is changed. | 94 // Informs the callee that video size is changed. |
96 VideoSizeChangedCallback video_size_changed_cb_; | 95 VideoSizeChangedCallback video_size_changed_cb_; |
97 | 96 |
98 // Informs the callee that the MediaCodec is created. | |
99 base::Closure codec_created_cb_; | |
100 | |
101 // Current video size to be sent with |video_size_changed_cb_|. | 97 // Current video size to be sent with |video_size_changed_cb_|. |
102 gfx::Size video_size_; | 98 gfx::Size video_size_; |
103 | 99 |
104 // Indices of output buffers that are posted for rendering. | 100 // Indices of output buffers that are posted for rendering. |
105 std::set<int> delayed_buffers_; | 101 std::set<int> delayed_buffers_; |
106 | 102 |
107 // Associate presentation timestamps with time. | 103 // Associate presentation timestamps with time. |
108 base::TimeTicks start_time_ticks_; | 104 base::TimeTicks start_time_ticks_; |
109 base::TimeDelta start_pts_; | 105 base::TimeDelta start_pts_; |
110 | 106 |
111 // Mantain the last seen PTS for stand-alone EOS. | 107 // Mantain the last seen PTS for stand-alone EOS. |
112 base::TimeDelta last_seen_pts_; | 108 base::TimeDelta last_seen_pts_; |
113 | 109 |
114 DISALLOW_COPY_AND_ASSIGN(MediaCodecVideoDecoder); | 110 DISALLOW_COPY_AND_ASSIGN(MediaCodecVideoDecoder); |
115 }; | 111 }; |
116 | 112 |
117 } // namespace media | 113 } // namespace media |
118 | 114 |
119 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ | 115 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_VIDEO_DECODER_H_ |
OLD | NEW |