Chromium Code Reviews| Index: content/renderer/media/rtc_video_decoder.h |
| =================================================================== |
| --- content/renderer/media/rtc_video_decoder.h (revision 90607) |
| +++ content/renderer/media/rtc_video_decoder.h (working copy) |
| @@ -2,50 +2,38 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef MEDIA_FILTERS_RTC_VIDEO_DECODER_H_ |
| -#define MEDIA_FILTERS_RTC_VIDEO_DECODER_H_ |
| +#ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
| +#define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
| #include <deque> |
| #include <string> |
| #include "base/gtest_prod_util.h" |
| #include "base/time.h" |
| +#include "content/renderer/media/webrtc_external_renderer.h" |
| #include "media/base/filters.h" |
| #include "media/base/video_frame.h" |
| #include "media/filters/decoder_base.h" |
| -// TODO(ronghuawu) ExternalRenderer should be defined in WebRtc |
| -class ExternalRenderer { |
| +class RTCVideoDecoder |
| + : public media::VideoDecoder, |
| + public ExternalRenderer { |
| public: |
| - virtual int FrameSizeChange(unsigned int width, |
| - unsigned int height, |
| - unsigned int number_of_streams) = 0; |
| - virtual int DeliverFrame(unsigned char* buffer, int buffer_size) = 0; |
| - |
| - protected: |
| - virtual ~ExternalRenderer() {} |
| -}; |
| - |
| -namespace media { |
| - |
| -class RTCVideoDecoder : public VideoDecoder, |
| - public ExternalRenderer { |
| - public: |
| RTCVideoDecoder(MessageLoop* message_loop, const std::string& url); |
| virtual ~RTCVideoDecoder(); |
| // Filter implementation. |
| - virtual void Play(FilterCallback* callback); |
| - virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb); |
| - virtual void Pause(FilterCallback* callback); |
| - virtual void Stop(FilterCallback* callback); |
| + virtual void Play(media::FilterCallback* callback); |
| + virtual void Seek(base::TimeDelta time, const media::FilterStatusCB& cb); |
| + virtual void Pause(media::FilterCallback* callback); |
| + virtual void Stop(media::FilterCallback* callback); |
| // Decoder implementation. |
| - virtual void Initialize(DemuxerStream* demuxer_stream, |
| - FilterCallback* filter_callback, |
| - StatisticsCallback* stat_callback); |
| - virtual const MediaFormat& media_format(); |
| - virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> video_frame); |
| + virtual void Initialize(media::DemuxerStream* demuxer_stream, |
| + media::FilterCallback* filter_callback, |
| + media::StatisticsCallback* stat_callback); |
| + virtual const media::MediaFormat& media_format(); |
| + virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> video_frame); |
| virtual bool ProvidesBuffer(); |
| // ExternalRenderer implementation |
| @@ -80,14 +68,13 @@ |
| size_t height_; |
| std::string url_; |
| DecoderState state_; |
| - MediaFormat media_format_; |
| - std::deque<scoped_refptr<VideoFrame> > frame_queue_available_; |
| + media::MediaFormat media_format_; |
| + std::deque<scoped_refptr<media::VideoFrame> > frame_queue_available_; |
| // Used for accessing frame queue from another thread. |
| base::Lock lock_; |
| DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); |
| }; |
| -} // namespace media |
| +#endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
|
scherkus (not reviewing)
2011/06/29 00:39:28
nit: could you get rid of blank line here
Ronghua
2011/06/29 20:36:39
Done.
|
| -#endif // MEDIA_FILTERS_RTC_VIDEO_DECODER_H_ |