| Index: webrtc/video/loopback.cc
|
| diff --git a/webrtc/video/loopback.cc b/webrtc/video/loopback.cc
|
| index 9083500c1e6a3a80583812f32a97c99e320595b2..eef8d9e5cbc2c09a524c3916f9a2f203a87d7b44 100644
|
| --- a/webrtc/video/loopback.cc
|
| +++ b/webrtc/video/loopback.cc
|
| @@ -43,6 +43,7 @@ static const uint32_t kSendRtxSsrc = 0x654322;
|
| static const uint32_t kReceiverLocalSsrc = 0x123456;
|
|
|
| static const uint8_t kRtxVideoPayloadType = 96;
|
| +static const uint8_t kVideoPayloadTypeH264 = 120; // TODO(hbos): What value to use for H264?
|
| static const uint8_t kVideoPayloadTypeVP8 = 124;
|
| static const uint8_t kVideoPayloadTypeVP9 = 125;
|
|
|
| @@ -98,17 +99,21 @@ void Loopback::Run() {
|
|
|
| send_config.local_renderer = local_preview.get();
|
| rtc::scoped_ptr<VideoEncoder> encoder;
|
| - if (config_.codec == "VP8") {
|
| + int payload_type;
|
| + if (config_.codec == "H264") {
|
| + encoder.reset(VideoEncoder::Create(VideoEncoder::kH264));
|
| + payload_type = kVideoPayloadTypeH264;
|
| + } else if (config_.codec == "VP8") {
|
| encoder.reset(VideoEncoder::Create(VideoEncoder::kVp8));
|
| + payload_type = kVideoPayloadTypeVP8;
|
| } else if (config_.codec == "VP9") {
|
| encoder.reset(VideoEncoder::Create(VideoEncoder::kVp9));
|
| + payload_type = kVideoPayloadTypeVP9;
|
| } else {
|
| // Codec not supported.
|
| RTC_NOTREACHED() << "Codec not supported!";
|
| return;
|
| }
|
| - const int payload_type =
|
| - config_.codec == "VP8" ? kVideoPayloadTypeVP8 : kVideoPayloadTypeVP9;
|
| send_config.encoder_settings.encoder = encoder.get();
|
| send_config.encoder_settings.payload_name = config_.codec;
|
| send_config.encoder_settings.payload_type = payload_type;
|
|
|