| 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_FFMPEG_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
| 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_FFMPEG_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/decryptor.h" | 10 #include "media/base/decryptor.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const scoped_refptr<DecoderBuffer>& buffer); | 73 const scoped_refptr<DecoderBuffer>& buffer); |
| 74 | 74 |
| 75 // Carries out the operation scheduled by BufferDecrypted(). | 75 // Carries out the operation scheduled by BufferDecrypted(). |
| 76 void DoBufferDecrypted(Decryptor::Status decrypt_status, | 76 void DoBufferDecrypted(Decryptor::Status decrypt_status, |
| 77 const scoped_refptr<DecoderBuffer>& buffer); | 77 const scoped_refptr<DecoderBuffer>& buffer); |
| 78 | 78 |
| 79 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer); | 79 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer); |
| 80 bool Decode(const scoped_refptr<DecoderBuffer>& buffer, | 80 bool Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 81 scoped_refptr<VideoFrame>* video_frame); | 81 scoped_refptr<VideoFrame>* video_frame); |
| 82 | 82 |
| 83 // Handles (re-)initializing the decoder with a (new) config. |
| 84 // Returns true if initialization was successful. |
| 85 bool ConfigureDecoder(); |
| 86 |
| 83 // Releases resources associated with |codec_context_| and |av_frame_| | 87 // Releases resources associated with |codec_context_| and |av_frame_| |
| 84 // and resets them to NULL. | 88 // and resets them to NULL. |
| 85 void ReleaseFFmpegResources(); | 89 void ReleaseFFmpegResources(); |
| 86 | 90 |
| 87 // Reset decoder and call |reset_cb_|. | 91 // Reset decoder and call |reset_cb_|. |
| 88 void DoReset(); | 92 void DoReset(); |
| 89 | 93 |
| 90 // Free decoder resources and call |stop_cb_|. | 94 // Free decoder resources and call |stop_cb_|. |
| 91 void DoStop(); | 95 void DoStop(); |
| 92 | 96 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 111 scoped_refptr<DemuxerStream> demuxer_stream_; | 115 scoped_refptr<DemuxerStream> demuxer_stream_; |
| 112 | 116 |
| 113 Decryptor* decryptor_; | 117 Decryptor* decryptor_; |
| 114 | 118 |
| 115 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 119 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
| 116 }; | 120 }; |
| 117 | 121 |
| 118 } // namespace media | 122 } // namespace media |
| 119 | 123 |
| 120 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 124 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
| OLD | NEW |