| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_VIDEO_VIDEO_DECODE_ENGINE_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ |
| 6 #define MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ | 6 #define MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/base/media_export.h" | |
| 11 #include "media/base/video_decoder_config.h" | 10 #include "media/base/video_decoder_config.h" |
| 12 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
| 13 | 12 |
| 14 class MessageLoop; | 13 class MessageLoop; |
| 15 | 14 |
| 16 namespace media { | 15 namespace media { |
| 17 | 16 |
| 18 class Buffer; | 17 class Buffer; |
| 19 class VideoDecodeContext; | 18 class VideoDecodeContext; |
| 20 | 19 |
| 21 struct PipelineStatistics; | 20 struct PipelineStatistics; |
| 22 | 21 |
| 23 struct VideoCodecInfo { | 22 struct VideoCodecInfo { |
| 24 // Other parameter is only meaningful when this is true. | 23 // Other parameter is only meaningful when this is true. |
| 25 bool success; | 24 bool success; |
| 26 | 25 |
| 27 // Can be different with container's value. | 26 // Can be different with container's value. |
| 28 uint32 surface_width; | 27 uint32 surface_width; |
| 29 | 28 |
| 30 // Can be different with container's value. | 29 // Can be different with container's value. |
| 31 uint32 surface_height; | 30 uint32 surface_height; |
| 32 }; | 31 }; |
| 33 | 32 |
| 34 class MEDIA_EXPORT VideoDecodeEngine { | 33 class VideoDecodeEngine { |
| 35 public: | 34 public: |
| 36 struct MEDIA_EXPORT EventHandler { | 35 struct EventHandler { |
| 37 public: | 36 public: |
| 38 virtual ~EventHandler() {} | 37 virtual ~EventHandler() {} |
| 39 virtual void OnInitializeComplete(const VideoCodecInfo& info) = 0; | 38 virtual void OnInitializeComplete(const VideoCodecInfo& info) = 0; |
| 40 virtual void OnUninitializeComplete() = 0; | 39 virtual void OnUninitializeComplete() = 0; |
| 41 virtual void OnFlushComplete() = 0; | 40 virtual void OnFlushComplete() = 0; |
| 42 virtual void OnSeekComplete() = 0; | 41 virtual void OnSeekComplete() = 0; |
| 43 virtual void OnError() = 0; | 42 virtual void OnError() = 0; |
| 44 | 43 |
| 45 // TODO(hclam): The following two methods shouldn't belong to this class | 44 // TODO(hclam): The following two methods shouldn't belong to this class |
| 46 // because they are not video decode events but used to send decoded | 45 // because they are not video decode events but used to send decoded |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // is called by the user to return the video frame object. | 120 // is called by the user to return the video frame object. |
| 122 // | 121 // |
| 123 // In response to this method call, ConsumeVideoFrame() is called with a | 122 // In response to this method call, ConsumeVideoFrame() is called with a |
| 124 // video frame object containing decoded video content. | 123 // video frame object containing decoded video content. |
| 125 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame) = 0; | 124 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame) = 0; |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 } // namespace media | 127 } // namespace media |
| 129 | 128 |
| 130 #endif // MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ | 129 #endif // MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ |
| OLD | NEW |