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_factory.h" | 5 #include "content/renderer/media/rtc_video_encoder_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/common/gpu/client/gpu_video_encode_accelerator_host.h" | 8 #include "content/common/gpu/client/gpu_video_encode_accelerator_host.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "content/renderer/media/rtc_video_encoder.h" | 10 #include "content/renderer/media/rtc_video_encoder.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 found = true; | 80 found = true; |
81 break; | 81 break; |
82 } | 82 } |
83 } | 83 } |
84 if (!found) | 84 if (!found) |
85 return NULL; | 85 return NULL; |
86 return new RTCVideoEncoder( | 86 return new RTCVideoEncoder( |
87 type, WebRTCCodecToVideoCodecProfile(type), gpu_factories_); | 87 type, WebRTCCodecToVideoCodecProfile(type), gpu_factories_); |
88 } | 88 } |
89 | 89 |
90 void RTCVideoEncoderFactory::AddObserver(Observer* observer) { | |
91 // No-op: our codec list is populated on installation. | |
92 } | |
93 | |
94 void RTCVideoEncoderFactory::RemoveObserver(Observer* observer) {} | |
95 | |
96 const std::vector<cricket::WebRtcVideoEncoderFactory::VideoCodec>& | 90 const std::vector<cricket::WebRtcVideoEncoderFactory::VideoCodec>& |
97 RTCVideoEncoderFactory::codecs() const { | 91 RTCVideoEncoderFactory::codecs() const { |
98 return codecs_; | 92 return codecs_; |
99 } | 93 } |
100 | 94 |
101 void RTCVideoEncoderFactory::DestroyVideoEncoder( | 95 void RTCVideoEncoderFactory::DestroyVideoEncoder( |
102 webrtc::VideoEncoder* encoder) { | 96 webrtc::VideoEncoder* encoder) { |
103 delete encoder; | 97 delete encoder; |
104 } | 98 } |
105 | 99 |
106 } // namespace content | 100 } // namespace content |
OLD | NEW |