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 #include "content/renderer/media/rtc_video_encoder.h" | 5 #include "content/renderer/media/rtc_video_encoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Request encoding parameter change for the underlying encoder. | 108 // Request encoding parameter change for the underlying encoder. |
109 void RequestEncodingParametersChange(uint32 bitrate, uint32 framerate); | 109 void RequestEncodingParametersChange(uint32 bitrate, uint32 framerate); |
110 | 110 |
111 // Destroy this Impl's encoder. The destructor is not explicitly called, as | 111 // Destroy this Impl's encoder. The destructor is not explicitly called, as |
112 // Impl is a base::RefCountedThreadSafe. | 112 // Impl is a base::RefCountedThreadSafe. |
113 void Destroy(); | 113 void Destroy(); |
114 | 114 |
115 // media::VideoEncodeAccelerator::Client implementation. | 115 // media::VideoEncodeAccelerator::Client implementation. |
116 virtual void RequireBitstreamBuffers(unsigned int input_count, | 116 virtual void RequireBitstreamBuffers(unsigned int input_count, |
117 const gfx::Size& input_coded_size, | 117 const gfx::Size& input_coded_size, |
118 size_t output_buffer_size) OVERRIDE; | 118 size_t output_buffer_size) override; |
119 virtual void BitstreamBufferReady(int32 bitstream_buffer_id, | 119 virtual void BitstreamBufferReady(int32 bitstream_buffer_id, |
120 size_t payload_size, | 120 size_t payload_size, |
121 bool key_frame) OVERRIDE; | 121 bool key_frame) override; |
122 virtual void NotifyError(media::VideoEncodeAccelerator::Error error) OVERRIDE; | 122 virtual void NotifyError(media::VideoEncodeAccelerator::Error error) override; |
123 | 123 |
124 private: | 124 private: |
125 friend class base::RefCountedThreadSafe<Impl>; | 125 friend class base::RefCountedThreadSafe<Impl>; |
126 | 126 |
127 enum { | 127 enum { |
128 kInputBufferExtraCount = 1, // The number of input buffers allocated, more | 128 kInputBufferExtraCount = 1, // The number of input buffers allocated, more |
129 // than what is requested by | 129 // than what is requested by |
130 // VEA::RequireBitstreamBuffers(). | 130 // VEA::RequireBitstreamBuffers(). |
131 kOutputBufferCount = 3, | 131 kOutputBufferCount = 3, |
132 }; | 132 }; |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoEncoderInitEncodeSuccess", | 749 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoEncoderInitEncodeSuccess", |
750 init_retval == WEBRTC_VIDEO_CODEC_OK); | 750 init_retval == WEBRTC_VIDEO_CODEC_OK); |
751 if (init_retval == WEBRTC_VIDEO_CODEC_OK) { | 751 if (init_retval == WEBRTC_VIDEO_CODEC_OK) { |
752 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoEncoderProfile", | 752 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoEncoderProfile", |
753 video_codec_profile_, | 753 video_codec_profile_, |
754 media::VIDEO_CODEC_PROFILE_MAX + 1); | 754 media::VIDEO_CODEC_PROFILE_MAX + 1); |
755 } | 755 } |
756 } | 756 } |
757 | 757 |
758 } // namespace content | 758 } // namespace content |
OLD | NEW |