Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: media/filters/ffmpeg_video_decoder.h

Issue 6969026: Convert Filter::Seek() to use new callback system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More CR fixes Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 <deque> 8 #include <deque>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class FFmpegVideoDecoder : public VideoDecoder, 22 class FFmpegVideoDecoder : public VideoDecoder,
23 public VideoDecodeEngine::EventHandler { 23 public VideoDecodeEngine::EventHandler {
24 public: 24 public:
25 FFmpegVideoDecoder(MessageLoop* message_loop, 25 FFmpegVideoDecoder(MessageLoop* message_loop,
26 VideoDecodeContext* decode_context); 26 VideoDecodeContext* decode_context);
27 virtual ~FFmpegVideoDecoder(); 27 virtual ~FFmpegVideoDecoder();
28 28
29 // Filter implementation. 29 // Filter implementation.
30 virtual void Stop(FilterCallback* callback); 30 virtual void Stop(FilterCallback* callback);
31 virtual void Seek(base::TimeDelta time, FilterCallback* callback); 31 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb);
32 virtual void Pause(FilterCallback* callback); 32 virtual void Pause(FilterCallback* callback);
33 virtual void Flush(FilterCallback* callback); 33 virtual void Flush(FilterCallback* callback);
34 34
35 // Decoder implementation. 35 // Decoder implementation.
36 virtual void Initialize(DemuxerStream* demuxer_stream, 36 virtual void Initialize(DemuxerStream* demuxer_stream,
37 FilterCallback* callback, 37 FilterCallback* callback,
38 StatisticsCallback* stats_callback); 38 StatisticsCallback* stats_callback);
39 virtual const MediaFormat& media_format(); 39 virtual const MediaFormat& media_format();
40 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> video_frame); 40 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> video_frame);
41 virtual bool ProvidesBuffer(); 41 virtual bool ProvidesBuffer();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 MediaFormat media_format_; 93 MediaFormat media_format_;
94 94
95 PtsStream pts_stream_; // Stream of presentation timestamps. 95 PtsStream pts_stream_; // Stream of presentation timestamps.
96 DecoderState state_; 96 DecoderState state_;
97 scoped_ptr<VideoDecodeEngine> decode_engine_; 97 scoped_ptr<VideoDecodeEngine> decode_engine_;
98 scoped_ptr<VideoDecodeContext> decode_context_; 98 scoped_ptr<VideoDecodeContext> decode_context_;
99 99
100 scoped_ptr<FilterCallback> initialize_callback_; 100 scoped_ptr<FilterCallback> initialize_callback_;
101 scoped_ptr<FilterCallback> uninitialize_callback_; 101 scoped_ptr<FilterCallback> uninitialize_callback_;
102 scoped_ptr<FilterCallback> flush_callback_; 102 scoped_ptr<FilterCallback> flush_callback_;
103 scoped_ptr<FilterCallback> seek_callback_; 103 FilterStatusCB seek_cb_;
104 scoped_ptr<StatisticsCallback> statistics_callback_; 104 scoped_ptr<StatisticsCallback> statistics_callback_;
105 105
106 // Hold video frames when flush happens. 106 // Hold video frames when flush happens.
107 std::deque<scoped_refptr<VideoFrame> > frame_queue_flushed_; 107 std::deque<scoped_refptr<VideoFrame> > frame_queue_flushed_;
108 108
109 VideoCodecInfo info_; 109 VideoCodecInfo info_;
110 110
111 // Pointer to the demuxer stream that will feed us compressed buffers. 111 // Pointer to the demuxer stream that will feed us compressed buffers.
112 scoped_refptr<DemuxerStream> demuxer_stream_; 112 scoped_refptr<DemuxerStream> demuxer_stream_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); 114 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
115 }; 115 };
116 116
117 } // namespace media 117 } // namespace media
118 118
119 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 119 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698