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_FILTERS_OMX_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_OMX_VIDEO_DECODER_H_ |
6 #define MEDIA_FILTERS_OMX_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_OMX_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "media/base/filters.h" | 10 #include "media/base/filters.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 OmxVideoDecoder(MessageLoop* message_loop, | 27 OmxVideoDecoder(MessageLoop* message_loop, |
28 VideoDecodeContext* decode_context); | 28 VideoDecodeContext* decode_context); |
29 virtual ~OmxVideoDecoder(); | 29 virtual ~OmxVideoDecoder(); |
30 | 30 |
31 // Filter implementations. | 31 // Filter implementations. |
32 virtual void Initialize(DemuxerStream* stream, | 32 virtual void Initialize(DemuxerStream* stream, |
33 FilterCallback* callback, | 33 FilterCallback* callback, |
34 StatisticsCallback* stats_callback); | 34 StatisticsCallback* stats_callback); |
35 virtual void Stop(FilterCallback* callback); | 35 virtual void Stop(FilterCallback* callback); |
36 virtual void Flush(FilterCallback* callback); | 36 virtual void Flush(FilterCallback* callback); |
37 virtual void Seek(base::TimeDelta time, FilterCallback* callback); | 37 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb); |
38 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); | 38 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); |
39 virtual bool ProvidesBuffer(); | 39 virtual bool ProvidesBuffer(); |
40 virtual const MediaFormat& media_format(); | 40 virtual const MediaFormat& media_format(); |
41 | 41 |
42 private: | 42 private: |
43 // VideoDecodeEngine::EventHandler interface. | 43 // VideoDecodeEngine::EventHandler interface. |
44 virtual void OnInitializeComplete(const VideoCodecInfo& info); | 44 virtual void OnInitializeComplete(const VideoCodecInfo& info); |
45 virtual void OnUninitializeComplete(); | 45 virtual void OnUninitializeComplete(); |
46 virtual void OnFlushComplete(); | 46 virtual void OnFlushComplete(); |
47 virtual void OnSeekComplete(); | 47 virtual void OnSeekComplete(); |
(...skipping 12 matching lines...) Expand all Loading... |
60 | 60 |
61 // Pointer to the demuxer stream that will feed us compressed buffers. | 61 // Pointer to the demuxer stream that will feed us compressed buffers. |
62 scoped_refptr<DemuxerStream> demuxer_stream_; | 62 scoped_refptr<DemuxerStream> demuxer_stream_; |
63 scoped_ptr<VideoDecodeEngine> decode_engine_; | 63 scoped_ptr<VideoDecodeEngine> decode_engine_; |
64 scoped_ptr<VideoDecodeContext> decode_context_; | 64 scoped_ptr<VideoDecodeContext> decode_context_; |
65 MediaFormat media_format_; | 65 MediaFormat media_format_; |
66 | 66 |
67 scoped_ptr<FilterCallback> initialize_callback_; | 67 scoped_ptr<FilterCallback> initialize_callback_; |
68 scoped_ptr<FilterCallback> uninitialize_callback_; | 68 scoped_ptr<FilterCallback> uninitialize_callback_; |
69 scoped_ptr<FilterCallback> flush_callback_; | 69 scoped_ptr<FilterCallback> flush_callback_; |
70 scoped_ptr<FilterCallback> seek_callback_; | 70 FilterStatusCB seek_cb_; |
71 scoped_ptr<StatisticsCallback> statistics_callback_; | 71 scoped_ptr<StatisticsCallback> statistics_callback_; |
72 | 72 |
73 VideoCodecInfo info_; | 73 VideoCodecInfo info_; |
74 | 74 |
75 PtsStream pts_stream_; // Stream of presentation timestamps. | 75 PtsStream pts_stream_; // Stream of presentation timestamps. |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(OmxVideoDecoder); | 77 DISALLOW_COPY_AND_ASSIGN(OmxVideoDecoder); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace media | 80 } // namespace media |
81 | 81 |
82 #endif // MEDIA_FILTERS_OMX_VIDEO_DECODER_H_ | 82 #endif // MEDIA_FILTERS_OMX_VIDEO_DECODER_H_ |
OLD | NEW |