| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FILTERS_VPX_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ |
| 6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
| 11 #include "media/base/video_decoder.h" | 11 #include "media/base/video_decoder.h" |
| 12 #include "media/base/video_frame.h" |
| 12 | 13 |
| 13 struct vpx_codec_ctx; | 14 struct vpx_codec_ctx; |
| 14 struct vpx_image; | 15 struct vpx_image; |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class MessageLoopProxy; | 18 class MessageLoopProxy; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace media { | 21 namespace media { |
| 21 | 22 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void DoDecryptOrDecodeBuffer(DemuxerStream::Status status, | 56 void DoDecryptOrDecodeBuffer(DemuxerStream::Status status, |
| 56 const scoped_refptr<DecoderBuffer>& buffer); | 57 const scoped_refptr<DecoderBuffer>& buffer); |
| 57 | 58 |
| 58 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer); | 59 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer); |
| 59 bool Decode(const scoped_refptr<DecoderBuffer>& buffer, | 60 bool Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 60 scoped_refptr<VideoFrame>* video_frame); | 61 scoped_refptr<VideoFrame>* video_frame); |
| 61 | 62 |
| 62 // Reset decoder and call |reset_cb_|. | 63 // Reset decoder and call |reset_cb_|. |
| 63 void DoReset(); | 64 void DoReset(); |
| 64 | 65 |
| 65 void CopyVpxImageTo(const vpx_image* vpx_image, | 66 void CopyVpxImageTo(const struct vpx_image* vpx_image, |
| 67 const struct vpx_image* vpx_image_alpha, |
| 66 scoped_refptr<VideoFrame>* video_frame); | 68 scoped_refptr<VideoFrame>* video_frame); |
| 67 | 69 |
| 68 scoped_refptr<base::MessageLoopProxy> message_loop_; | 70 scoped_refptr<base::MessageLoopProxy> message_loop_; |
| 69 | 71 |
| 70 DecoderState state_; | 72 DecoderState state_; |
| 71 | 73 |
| 72 StatisticsCB statistics_cb_; | 74 StatisticsCB statistics_cb_; |
| 73 ReadCB read_cb_; | 75 ReadCB read_cb_; |
| 74 base::Closure reset_cb_; | 76 base::Closure reset_cb_; |
| 75 | 77 |
| 76 // Pointer to the demuxer stream that will feed us compressed buffers. | 78 // Pointer to the demuxer stream that will feed us compressed buffers. |
| 77 scoped_refptr<DemuxerStream> demuxer_stream_; | 79 scoped_refptr<DemuxerStream> demuxer_stream_; |
| 78 | 80 |
| 79 vpx_codec_ctx* vpx_codec_; | 81 vpx_codec_ctx* vpx_codec_; |
| 82 vpx_codec_ctx* vpx_codec_alpha_; |
| 83 VideoFrame::Format format_; |
| 80 | 84 |
| 81 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); | 85 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); |
| 82 }; | 86 }; |
| 83 | 87 |
| 84 } // namespace media | 88 } // namespace media |
| 85 | 89 |
| 86 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ | 90 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ |
| OLD | NEW |