OLD | NEW |
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 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/synchronization/lock.h" |
12 #include "base/time.h" | 13 #include "base/time.h" |
13 #include "media/base/filters.h" | 14 #include "media/base/filters.h" |
14 #include "media/base/video_frame.h" | 15 #include "media/base/video_frame.h" |
15 #include "media/filters/decoder_base.h" | |
16 #include "third_party/libjingle/source/talk/session/phone/mediachannel.h" | 16 #include "third_party/libjingle/source/talk/session/phone/mediachannel.h" |
17 #include "third_party/libjingle/source/talk/session/phone/videorenderer.h" | 17 #include "third_party/libjingle/source/talk/session/phone/videorenderer.h" |
18 | 18 |
| 19 class MessageLoop; |
| 20 |
19 namespace cricket { | 21 namespace cricket { |
20 class VideoFrame; | 22 class VideoFrame; |
21 } // namespace cricket | 23 } // namespace cricket |
22 | 24 |
23 class RTCVideoDecoder | 25 class RTCVideoDecoder |
24 : public media::VideoDecoder, | 26 : public media::VideoDecoder, |
25 public cricket::VideoRenderer { | 27 public cricket::VideoRenderer { |
26 public: | 28 public: |
27 RTCVideoDecoder(MessageLoop* message_loop, const std::string& url); | 29 RTCVideoDecoder(MessageLoop* message_loop, const std::string& url); |
28 virtual ~RTCVideoDecoder(); | 30 virtual ~RTCVideoDecoder(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 std::string url_; | 70 std::string url_; |
69 DecoderState state_; | 71 DecoderState state_; |
70 std::deque<scoped_refptr<media::VideoFrame> > frame_queue_available_; | 72 std::deque<scoped_refptr<media::VideoFrame> > frame_queue_available_; |
71 // Used for accessing frame queue from another thread. | 73 // Used for accessing frame queue from another thread. |
72 base::Lock lock_; | 74 base::Lock lock_; |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); | 76 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); |
75 }; | 77 }; |
76 | 78 |
77 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ | 79 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
OLD | NEW |