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

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

Issue 5612004: Web media player pipeline: implemented feature to choose proper... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years 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_video_decoder.cc ('k') | media/filters/omx_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) 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 #include "media/ffmpeg/ffmpeg_common.h"
14 15
15 class MessageLoop; 16 class MessageLoop;
16 17
17 namespace media { 18 namespace media {
18 19
19 class Buffer; 20 class Buffer;
20 class OmxVideoDecodeEngine; 21 class OmxVideoDecodeEngine;
21 class VideoFrame; 22 class VideoFrame;
22 23
23 class OmxVideoDecoder : public VideoDecoder, 24 class OmxVideoDecoder : public VideoDecoder,
24 public VideoDecodeEngine::EventHandler { 25 public VideoDecodeEngine::EventHandler {
25 public: 26 public:
26 explicit OmxVideoDecoder(VideoDecodeContext* decode_context); 27 explicit OmxVideoDecoder(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() { return media_format_; } 37 virtual const MediaFormat& media_format() { return media_format_; }
37 38
39 virtual const char* filter_name() { return "OmxVideoDecoder"; }
40 virtual bool supports_codec_id(int codec_id) {
41 switch (codec_id) {
42 case CODEC_ID_VC1:
43 case CODEC_ID_H264:
44 case CODEC_ID_THEORA:
45 case CODEC_ID_MPEG2VIDEO:
46 case CODEC_ID_MPEG4:
47 return true;
48 default:
49 return false;
50 }
51 return false;
52 }
53
38 private: 54 private:
39 // VideoDecodeEngine::EventHandler interface. 55 // VideoDecodeEngine::EventHandler interface.
40 virtual void OnInitializeComplete(const VideoCodecInfo& info); 56 virtual void OnInitializeComplete(const VideoCodecInfo& info);
41 virtual void OnUninitializeComplete(); 57 virtual void OnUninitializeComplete();
42 virtual void OnFlushComplete(); 58 virtual void OnFlushComplete();
43 virtual void OnSeekComplete(); 59 virtual void OnSeekComplete();
44 virtual void OnError(); 60 virtual void OnError();
45 virtual void OnFormatChange(VideoStreamInfo stream_info); 61 virtual void OnFormatChange(VideoStreamInfo stream_info);
46 virtual void ProduceVideoSample(scoped_refptr<Buffer> buffer); 62 virtual void ProduceVideoSample(scoped_refptr<Buffer> buffer);
47 virtual void ConsumeVideoFrame(scoped_refptr<VideoFrame> frame); 63 virtual void ConsumeVideoFrame(scoped_refptr<VideoFrame> frame);
(...skipping 16 matching lines...) Expand all
64 scoped_ptr<FilterCallback> seek_callback_; 80 scoped_ptr<FilterCallback> seek_callback_;
65 81
66 VideoCodecInfo info_; 82 VideoCodecInfo info_;
67 83
68 DISALLOW_COPY_AND_ASSIGN(OmxVideoDecoder); 84 DISALLOW_COPY_AND_ASSIGN(OmxVideoDecoder);
69 }; 85 };
70 86
71 } // namespace media 87 } // namespace media
72 88
73 #endif // MEDIA_FILTERS_OMX_VIDEO_DECODER_H_ 89 #endif // MEDIA_FILTERS_OMX_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/omx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698