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

Side by Side Diff: content/renderer/media/rtc_video_decoder.h

Issue 7461016: Replace VideoDecoder::media_format() with significantly simpler width()/height() methods. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 9 years, 5 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) 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 CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 // Filter implementation. 25 // Filter implementation.
26 virtual void Play(media::FilterCallback* callback); 26 virtual void Play(media::FilterCallback* callback);
27 virtual void Seek(base::TimeDelta time, const media::FilterStatusCB& cb); 27 virtual void Seek(base::TimeDelta time, const media::FilterStatusCB& cb);
28 virtual void Pause(media::FilterCallback* callback); 28 virtual void Pause(media::FilterCallback* callback);
29 virtual void Stop(media::FilterCallback* callback); 29 virtual void Stop(media::FilterCallback* callback);
30 30
31 // Decoder implementation. 31 // Decoder implementation.
32 virtual void Initialize(media::DemuxerStream* demuxer_stream, 32 virtual void Initialize(media::DemuxerStream* demuxer_stream,
33 media::FilterCallback* filter_callback, 33 media::FilterCallback* filter_callback,
34 media::StatisticsCallback* stat_callback); 34 media::StatisticsCallback* stat_callback);
35 virtual const media::MediaFormat& media_format();
36 virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> video_frame); 35 virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> video_frame);
37 virtual bool ProvidesBuffer(); 36 virtual bool ProvidesBuffer();
37 virtual int width();
38 virtual int height();
38 39
39 // cricket::VideoRenderer implementation 40 // cricket::VideoRenderer implementation
40 virtual bool SetSize(int width, int height, int reserved); 41 virtual bool SetSize(int width, int height, int reserved);
41 virtual bool RenderFrame(const cricket::VideoFrame* frame); 42 virtual bool RenderFrame(const cricket::VideoFrame* frame);
42 43
43 private: 44 private:
44 friend class RTCVideoDecoderTest; 45 friend class RTCVideoDecoderTest;
45 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, Initialize_Successful); 46 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, Initialize_Successful);
46 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoSeek); 47 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoSeek);
47 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoRenderFrame); 48 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoRenderFrame);
48 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoSetSize); 49 FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoSetSize);
49 50
50 enum DecoderState { 51 enum DecoderState {
51 kUnInitialized, 52 kUnInitialized,
52 kNormal, 53 kNormal,
53 kSeeking, 54 kSeeking,
54 kPaused, 55 kPaused,
55 kStopped 56 kStopped
56 }; 57 };
57 58
58 MessageLoop* message_loop_; 59 MessageLoop* message_loop_;
59 size_t width_; 60 size_t width_;
60 size_t height_; 61 size_t height_;
61 std::string url_; 62 std::string url_;
62 DecoderState state_; 63 DecoderState state_;
63 media::MediaFormat media_format_;
64 std::deque<scoped_refptr<media::VideoFrame> > frame_queue_available_; 64 std::deque<scoped_refptr<media::VideoFrame> > frame_queue_available_;
65 // Used for accessing frame queue from another thread. 65 // Used for accessing frame queue from another thread.
66 base::Lock lock_; 66 base::Lock lock_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); 68 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder);
69 }; 69 };
70 70
71 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ 71 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_video_decoder.cc » ('j') | content/renderer/media/rtc_video_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698