| 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 "content/common/gpu/client/gpu_video_encode_accelerator_host.h" | 7 #include "content/common/gpu/client/gpu_video_encode_accelerator_host.h" |
| 8 #include "content/renderer/media/rtc_video_encoder.h" | 8 #include "content/renderer/media/rtc_video_encoder.h" |
| 9 #include "media/filters/gpu_video_accelerator_factories.h" | 9 #include "media/filters/gpu_video_accelerator_factories.h" |
| 10 #include "media/video/video_encode_accelerator.h" | 10 #include "media/video/video_encode_accelerator.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 return cricket::WebRtcVideoEncoderFactory::VideoCodec( | 41 return cricket::WebRtcVideoEncoderFactory::VideoCodec( |
| 42 type, name, width, height, fps); | 42 type, name, width, height, fps); |
| 43 } | 43 } |
| 44 | 44 |
| 45 // Translate from cricket::WebRtcVideoEncoderFactory::VideoCodec to | 45 // Translate from cricket::WebRtcVideoEncoderFactory::VideoCodec to |
| 46 // media::VideoCodecProfile. Pick a default profile for each codec type. | 46 // media::VideoCodecProfile. Pick a default profile for each codec type. |
| 47 media::VideoCodecProfile WebRTCCodecToVideoCodecProfile( | 47 media::VideoCodecProfile WebRTCCodecToVideoCodecProfile( |
| 48 webrtc::VideoCodecType type) { | 48 webrtc::VideoCodecType type) { |
| 49 switch (type) { | 49 switch (type) { |
| 50 case webrtc::kVideoCodecVP8: | 50 case webrtc::kVideoCodecVP8: |
| 51 return media::VP8PROFILE_MAIN; | 51 return media::VP8PROFILE_ANY; |
| 52 case webrtc::kVideoCodecGeneric: | 52 case webrtc::kVideoCodecGeneric: |
| 53 return media::H264PROFILE_MAIN; | 53 return media::H264PROFILE_MAIN; |
| 54 default: | 54 default: |
| 55 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 55 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // anonymous namespace | 59 } // anonymous namespace |
| 60 | 60 |
| 61 RTCVideoEncoderFactory::RTCVideoEncoderFactory( | 61 RTCVideoEncoderFactory::RTCVideoEncoderFactory( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 RTCVideoEncoderFactory::codecs() const { | 98 RTCVideoEncoderFactory::codecs() const { |
| 99 return codecs_; | 99 return codecs_; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void RTCVideoEncoderFactory::DestroyVideoEncoder( | 102 void RTCVideoEncoderFactory::DestroyVideoEncoder( |
| 103 webrtc::VideoEncoder* encoder) { | 103 webrtc::VideoEncoder* encoder) { |
| 104 delete encoder; | 104 delete encoder; |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace content | 107 } // namespace content |
| OLD | NEW |