| 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_VIDEO_DECODER_JOB_H_ | 5 #ifndef MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ |
| 6 #define MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ | 6 #define MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // MediaDecoderJob implementation. | 33 // MediaDecoderJob implementation. |
| 34 bool HasStream() const override; | 34 bool HasStream() const override; |
| 35 void ReleaseDecoderResources() override; | 35 void ReleaseDecoderResources() override; |
| 36 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; | 36 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; |
| 37 | 37 |
| 38 int output_width() const { return output_width_; } | 38 int output_width() const { return output_width_; } |
| 39 int output_height() const { return output_height_; } | 39 int output_height() const { return output_height_; } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 // MediaDecoderJob implementation. | 42 // MediaDecoderJob implementation. |
| 43 void ReleaseOutputBuffer( | 43 void ReleaseOutputBuffer(int output_buffer_index, |
| 44 int output_buffer_index, | 44 size_t offset, |
| 45 size_t offset, | 45 size_t size, |
| 46 size_t size, | 46 bool render_output, |
| 47 bool render_output, | 47 bool is_late_frame, |
| 48 bool is_late_frame, | 48 base::TimeDelta current_presentation_timestamp, |
| 49 base::TimeDelta current_presentation_timestamp, | 49 MediaCodecStatus status, |
| 50 const ReleaseOutputCompletionCallback& callback) override; | 50 const DecoderCallback& callback) override; |
| 51 bool ComputeTimeToRender() const override; | 51 bool ComputeTimeToRender() const override; |
| 52 bool IsCodecReconfigureNeeded(const DemuxerConfigs& configs) const override; | 52 bool IsCodecReconfigureNeeded(const DemuxerConfigs& configs) const override; |
| 53 bool AreDemuxerConfigsChanged(const DemuxerConfigs& configs) const override; | 53 bool AreDemuxerConfigsChanged(const DemuxerConfigs& configs) const override; |
| 54 MediaDecoderJobStatus CreateMediaCodecBridgeInternal() override; | 54 MediaDecoderJobStatus CreateMediaCodecBridgeInternal() override; |
| 55 bool UpdateOutputFormat() override; | 55 bool UpdateOutputFormat() override; |
| 56 | 56 |
| 57 // Returns true if a protected surface is required for video playback. | 57 // Returns true if a protected surface is required for video playback. |
| 58 bool IsProtectedSurfaceRequired(); | 58 bool IsProtectedSurfaceRequired(); |
| 59 | 59 |
| 60 // Video configs from the demuxer. | 60 // Video configs from the demuxer. |
| 61 VideoCodec video_codec_; | 61 VideoCodec video_codec_; |
| 62 int config_width_; | 62 int config_width_; |
| 63 int config_height_; | 63 int config_height_; |
| 64 | 64 |
| 65 // Video output format. | 65 // Video output format. |
| 66 int output_width_; | 66 int output_width_; |
| 67 int output_height_; | 67 int output_height_; |
| 68 | 68 |
| 69 // The surface object currently owned by the player. | 69 // The surface object currently owned by the player. |
| 70 gfx::ScopedJavaSurface surface_; | 70 gfx::ScopedJavaSurface surface_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob); | 72 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace media | 75 } // namespace media |
| 76 | 76 |
| 77 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ | 77 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ |
| OLD | NEW |