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

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

Issue 6171009: Remove MessageLoop methods from Filter interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply CR suggestions & fix style issues. Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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"
11 #include "media/base/media_format.h" 11 #include "media/base/media_format.h"
12 #include "media/video/video_decode_context.h" 12 #include "media/video/video_decode_context.h"
13 #include "media/video/video_decode_engine.h" 13 #include "media/video/video_decode_engine.h"
14 14
15 class MessageLoop; 15 class MessageLoop;
16 16
17 namespace media { 17 namespace media {
18 18
19 class Buffer; 19 class Buffer;
20 class OmxVideoDecodeEngine; 20 class OmxVideoDecodeEngine;
21 class VideoFrame; 21 class VideoFrame;
22 22
23 class OmxVideoDecoder : public VideoDecoder, 23 class OmxVideoDecoder : public VideoDecoder,
24 public VideoDecodeEngine::EventHandler { 24 public VideoDecodeEngine::EventHandler {
25 public: 25 public:
26 explicit OmxVideoDecoder(VideoDecodeContext* decode_context); 26 OmxVideoDecoder(MessageLoop* message_loop,
27 VideoDecodeContext* decode_context);
27 virtual ~OmxVideoDecoder(); 28 virtual ~OmxVideoDecoder();
28 29
29 // Filter implementations. 30 // Filter implementations.
30 virtual void Initialize(DemuxerStream* stream, FilterCallback* callback); 31 virtual void Initialize(DemuxerStream* stream, FilterCallback* callback);
31 virtual void Stop(FilterCallback* callback); 32 virtual void Stop(FilterCallback* callback);
32 virtual void Flush(FilterCallback* callback); 33 virtual void Flush(FilterCallback* callback);
33 virtual void Seek(base::TimeDelta time, FilterCallback* callback); 34 virtual void Seek(base::TimeDelta time, FilterCallback* callback);
34 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); 35 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame);
35 virtual bool ProvidesBuffer(); 36 virtual bool ProvidesBuffer();
36 virtual const MediaFormat& media_format(); 37 virtual const MediaFormat& media_format();
37 38
39 MessageLoop* message_loop();
scherkus (not reviewing) 2011/01/13 23:52:50 nit: add blank line after this
acolwell GONE FROM CHROMIUM 2011/01/14 01:14:12 Removed method since it is no longer needed. On 20
38 private: 40 private:
39 // VideoDecodeEngine::EventHandler interface. 41 // VideoDecodeEngine::EventHandler interface.
40 virtual void OnInitializeComplete(const VideoCodecInfo& info); 42 virtual void OnInitializeComplete(const VideoCodecInfo& info);
41 virtual void OnUninitializeComplete(); 43 virtual void OnUninitializeComplete();
42 virtual void OnFlushComplete(); 44 virtual void OnFlushComplete();
43 virtual void OnSeekComplete(); 45 virtual void OnSeekComplete();
44 virtual void OnError(); 46 virtual void OnError();
45 virtual void OnFormatChange(VideoStreamInfo stream_info); 47 virtual void OnFormatChange(VideoStreamInfo stream_info);
46 virtual void ProduceVideoSample(scoped_refptr<Buffer> buffer); 48 virtual void ProduceVideoSample(scoped_refptr<Buffer> buffer);
47 virtual void ConsumeVideoFrame(scoped_refptr<VideoFrame> frame); 49 virtual void ConsumeVideoFrame(scoped_refptr<VideoFrame> frame);
48 50
49 // TODO(hclam): This is very ugly that we keep reference instead of 51 // TODO(hclam): This is very ugly that we keep reference instead of
50 // scoped_refptr. 52 // scoped_refptr.
51 void DemuxCompleteTask(Buffer* buffer); 53 void DemuxCompleteTask(Buffer* buffer);
52 54
55 MessageLoop* message_loop_;
56
53 // Pointer to the demuxer stream that will feed us compressed buffers. 57 // Pointer to the demuxer stream that will feed us compressed buffers.
54 scoped_refptr<DemuxerStream> demuxer_stream_; 58 scoped_refptr<DemuxerStream> demuxer_stream_;
55 scoped_ptr<VideoDecodeEngine> decode_engine_; 59 scoped_ptr<VideoDecodeEngine> decode_engine_;
56 scoped_ptr<VideoDecodeContext> decode_context_; 60 scoped_ptr<VideoDecodeContext> decode_context_;
57 MediaFormat media_format_; 61 MediaFormat media_format_;
58 size_t width_; 62 size_t width_;
59 size_t height_; 63 size_t height_;
60 64
61 scoped_ptr<FilterCallback> initialize_callback_; 65 scoped_ptr<FilterCallback> initialize_callback_;
62 scoped_ptr<FilterCallback> uninitialize_callback_; 66 scoped_ptr<FilterCallback> uninitialize_callback_;
63 scoped_ptr<FilterCallback> flush_callback_; 67 scoped_ptr<FilterCallback> flush_callback_;
64 scoped_ptr<FilterCallback> seek_callback_; 68 scoped_ptr<FilterCallback> seek_callback_;
65 69
66 VideoCodecInfo info_; 70 VideoCodecInfo info_;
67 71
68 DISALLOW_COPY_AND_ASSIGN(OmxVideoDecoder); 72 DISALLOW_COPY_AND_ASSIGN(OmxVideoDecoder);
69 }; 73 };
70 74
71 } // namespace media 75 } // namespace media
72 76
73 #endif // MEDIA_FILTERS_OMX_VIDEO_DECODER_H_ 77 #endif // MEDIA_FILTERS_OMX_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698