| 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_VIDEO_MEDIA_CODEC_DECODER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_ |
| 6 #define MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_ | 6 #define MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 const char* class_name() const override; | 45 const char* class_name() const override; |
| 46 | 46 |
| 47 bool HasStream() const override; | 47 bool HasStream() const override; |
| 48 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; | 48 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; |
| 49 bool IsContentEncrypted() const override; | 49 bool IsContentEncrypted() const override; |
| 50 void ReleaseDecoderResources() override; | 50 void ReleaseDecoderResources() override; |
| 51 void ReleaseMediaCodec() override; | 51 void ReleaseMediaCodec() override; |
| 52 | 52 |
| 53 // Stores the video surface to use with upcoming Configure() | 53 // Stores the video surface to use with upcoming Configure() |
| 54 void SetVideoSurface(gfx::ScopedJavaSurface surface); | 54 void SetVideoSurface(gl::ScopedJavaSurface surface); |
| 55 | 55 |
| 56 // Returns true if there is a video surface to use. | 56 // Returns true if there is a video surface to use. |
| 57 bool HasVideoSurface() const; | 57 bool HasVideoSurface() const; |
| 58 | 58 |
| 59 // Sets whether protected surface is needed for the currently used DRM. | 59 // Sets whether protected surface is needed for the currently used DRM. |
| 60 void SetProtectedSurfaceRequired(bool value); | 60 void SetProtectedSurfaceRequired(bool value); |
| 61 | 61 |
| 62 // Returns true if protected surface is needed. | 62 // Returns true if protected surface is needed. |
| 63 bool IsProtectedSurfaceRequired() const; | 63 bool IsProtectedSurfaceRequired() const; |
| 64 | 64 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 91 bool render, | 91 bool render, |
| 92 bool update_time, | 92 bool update_time, |
| 93 bool eos_encountered); | 93 bool eos_encountered); |
| 94 | 94 |
| 95 // Data. | 95 // Data. |
| 96 | 96 |
| 97 // Configuration received from demuxer | 97 // Configuration received from demuxer |
| 98 DemuxerConfigs configs_; | 98 DemuxerConfigs configs_; |
| 99 | 99 |
| 100 // Video surface that we render to. | 100 // Video surface that we render to. |
| 101 gfx::ScopedJavaSurface surface_; | 101 gl::ScopedJavaSurface surface_; |
| 102 | 102 |
| 103 // Flags that indicates whether we need protected surface. | 103 // Flags that indicates whether we need protected surface. |
| 104 bool is_protected_surface_required_; | 104 bool is_protected_surface_required_; |
| 105 | 105 |
| 106 // Reports current playback time to the callee. | 106 // Reports current playback time to the callee. |
| 107 SetTimeCallback update_current_time_cb_; | 107 SetTimeCallback update_current_time_cb_; |
| 108 | 108 |
| 109 // Informs the callee that video size is changed. | 109 // Informs the callee that video size is changed. |
| 110 VideoSizeChangedCallback video_size_changed_cb_; | 110 VideoSizeChangedCallback video_size_changed_cb_; |
| 111 | 111 |
| 112 // Current video size to be sent with |video_size_changed_cb_|. | 112 // Current video size to be sent with |video_size_changed_cb_|. |
| 113 gfx::Size video_size_; | 113 gfx::Size video_size_; |
| 114 | 114 |
| 115 // Indices of output buffers that are posted for rendering. | 115 // Indices of output buffers that are posted for rendering. |
| 116 std::set<int> delayed_buffers_; | 116 std::set<int> delayed_buffers_; |
| 117 | 117 |
| 118 // Associate presentation timestamps with time. | 118 // Associate presentation timestamps with time. |
| 119 base::TimeTicks start_time_ticks_; | 119 base::TimeTicks start_time_ticks_; |
| 120 base::TimeDelta start_pts_; | 120 base::TimeDelta start_pts_; |
| 121 | 121 |
| 122 // Mantain the last seen PTS for stand-alone EOS. | 122 // Mantain the last seen PTS for stand-alone EOS. |
| 123 base::TimeDelta last_seen_pts_; | 123 base::TimeDelta last_seen_pts_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(VideoMediaCodecDecoder); | 125 DISALLOW_COPY_AND_ASSIGN(VideoMediaCodecDecoder); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } // namespace media | 128 } // namespace media |
| 129 | 129 |
| 130 #endif // MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_ | 130 #endif // MEDIA_BASE_ANDROID_VIDEO_MEDIA_CODEC_DECODER_H_ |
| OLD | NEW |