| 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 | 9 |
| 10 #include "media/base/android/media_decoder_job.h" | 10 #include "media/base/android/media_decoder_job.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 class VideoCodecBridge; | 14 class VideoCodecBridge; |
| 15 | 15 |
| 16 // Class for managing video decoding jobs. | 16 // Class for managing video decoding jobs. |
| 17 class VideoDecoderJob : public MediaDecoderJob { | 17 class VideoDecoderJob : public MediaDecoderJob { |
| 18 public: | 18 public: |
| 19 // Create a new VideoDecoderJob instance. | 19 // Create a new VideoDecoderJob instance. |
| 20 // |request_data_cb| - Callback used to request more data for the decoder. | 20 // |request_data_cb| - Callback used to request more data for the decoder. |
| 21 // |request_resources_cb| - Callback used to request resources. | 21 // |request_resources_cb| - Callback used to request resources. |
| 22 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that | 22 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that |
| 23 // demuxer config has changed. | 23 // demuxer config has changed. |
| 24 VideoDecoderJob( | 24 VideoDecoderJob(const base::Closure& request_data_cb, |
| 25 const base::Closure& request_data_cb, | 25 const base::Closure& request_resources_cb, |
| 26 const base::Closure& request_resources_cb, | 26 const base::Closure& on_demuxer_config_changed_cb, |
| 27 const base::Closure& on_demuxer_config_changed_cb); | 27 FrameStatistics* frame_statistics); |
| 28 ~VideoDecoderJob() override; | 28 ~VideoDecoderJob() override; |
| 29 | 29 |
| 30 // Passes a java surface object to the codec. Returns true if the surface | 30 // Passes a java surface object to the codec. Returns true if the surface |
| 31 // can be used by the decoder, or false otherwise. | 31 // can be used by the decoder, or false otherwise. |
| 32 bool SetVideoSurface(gfx::ScopedJavaSurface surface); | 32 bool SetVideoSurface(gfx::ScopedJavaSurface surface); |
| 33 | 33 |
| 34 // MediaDecoderJob implementation. | 34 // MediaDecoderJob implementation. |
| 35 bool HasStream() const override; | 35 bool HasStream() const override; |
| 36 void ReleaseDecoderResources() override; | 36 void ReleaseDecoderResources() override; |
| 37 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; | 37 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Callbacks to inform the caller about decoder resources change. | 72 // Callbacks to inform the caller about decoder resources change. |
| 73 base::Closure request_resources_cb_; | 73 base::Closure request_resources_cb_; |
| 74 base::Closure release_resources_cb_; | 74 base::Closure release_resources_cb_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob); | 76 DISALLOW_COPY_AND_ASSIGN(VideoDecoderJob); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace media | 79 } // namespace media |
| 80 | 80 |
| 81 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ | 81 #endif // MEDIA_BASE_ANDROID_VIDEO_DECODER_JOB_H_ |
| OLD | NEW |