OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ENCODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <vector> | 11 #include <vector> |
9 | 12 |
| 13 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
13 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
14 #include "base/time/time.h" | 18 #include "base/time/time.h" |
15 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
16 #include "media/base/video_decoder_config.h" | 20 #include "media/base/video_decoder_config.h" |
17 #include "third_party/webrtc/modules/video_coding/include/video_codec_interface.
h" | 21 #include "third_party/webrtc/modules/video_coding/include/video_codec_interface.
h" |
18 #include "ui/gfx/geometry/size.h" | 22 #include "ui/gfx/geometry/size.h" |
19 | 23 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 int32_t Release() override; | 59 int32_t Release() override; |
56 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 60 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
57 int32_t SetRates(uint32_t new_bit_rate, uint32_t frame_rate) override; | 61 int32_t SetRates(uint32_t new_bit_rate, uint32_t frame_rate) override; |
58 | 62 |
59 private: | 63 private: |
60 class Impl; | 64 class Impl; |
61 friend class RTCVideoEncoder::Impl; | 65 friend class RTCVideoEncoder::Impl; |
62 | 66 |
63 // Return an encoded output buffer to WebRTC. | 67 // Return an encoded output buffer to WebRTC. |
64 void ReturnEncodedImage(scoped_ptr<webrtc::EncodedImage> image, | 68 void ReturnEncodedImage(scoped_ptr<webrtc::EncodedImage> image, |
65 int32 bitstream_buffer_id, | 69 int32_t bitstream_buffer_id, |
66 uint16 picture_id); | 70 uint16_t picture_id); |
67 | 71 |
68 void NotifyError(int32_t error); | 72 void NotifyError(int32_t error); |
69 | 73 |
70 void RecordInitEncodeUMA(int32_t init_retval, | 74 void RecordInitEncodeUMA(int32_t init_retval, |
71 media::VideoCodecProfile profile); | 75 media::VideoCodecProfile profile); |
72 | 76 |
73 base::ThreadChecker thread_checker_; | 77 base::ThreadChecker thread_checker_; |
74 | 78 |
75 // The video codec type, as reported to WebRTC. | 79 // The video codec type, as reported to WebRTC. |
76 const webrtc::VideoCodecType video_codec_type_; | 80 const webrtc::VideoCodecType video_codec_type_; |
(...skipping 20 matching lines...) Expand all Loading... |
97 // RTCVideoEncoder. | 101 // RTCVideoEncoder. |
98 // NOTE: Weak pointers must be invalidated before all other member variables. | 102 // NOTE: Weak pointers must be invalidated before all other member variables. |
99 base::WeakPtrFactory<RTCVideoEncoder> weak_factory_; | 103 base::WeakPtrFactory<RTCVideoEncoder> weak_factory_; |
100 | 104 |
101 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); | 105 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); |
102 }; | 106 }; |
103 | 107 |
104 } // namespace content | 108 } // namespace content |
105 | 109 |
106 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ | 110 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
OLD | NEW |