| 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 10 matching lines...) Expand all Loading... |
| 21 // Create a new VideoDecoderJob instance. | 21 // Create a new VideoDecoderJob instance. |
| 22 // |request_data_cb| - Callback used to request more data for the decoder. | 22 // |request_data_cb| - Callback used to request more data for the decoder. |
| 23 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that | 23 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that |
| 24 // demuxer config has changed. | 24 // demuxer config has changed. |
| 25 VideoDecoderJob(const base::Closure& request_data_cb, | 25 VideoDecoderJob(const base::Closure& request_data_cb, |
| 26 const base::Closure& on_demuxer_config_changed_cb); | 26 const base::Closure& on_demuxer_config_changed_cb); |
| 27 ~VideoDecoderJob() override; | 27 ~VideoDecoderJob() override; |
| 28 | 28 |
| 29 // Passes a java surface object to the codec. Returns true if the surface | 29 // Passes a java surface object to the codec. Returns true if the surface |
| 30 // can be used by the decoder, or false otherwise. | 30 // can be used by the decoder, or false otherwise. |
| 31 bool SetVideoSurface(gfx::ScopedJavaSurface surface); | 31 bool SetVideoSurface(gl::ScopedJavaSurface surface); |
| 32 | 32 |
| 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: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 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 gl::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 |