OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 if (inst->maxFramerate < 1) { | 68 if (inst->maxFramerate < 1) { |
69 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 69 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
70 } | 70 } |
71 // allow zero to represent an unspecified maxBitRate | 71 // allow zero to represent an unspecified maxBitRate |
72 if (inst->maxBitrate > 0 && inst->startBitrate > inst->maxBitrate) { | 72 if (inst->maxBitrate > 0 && inst->startBitrate > inst->maxBitrate) { |
73 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 73 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
74 } | 74 } |
75 if (inst->width <= 1 || inst->height <= 1) { | 75 if (inst->width <= 1 || inst->height <= 1) { |
76 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 76 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
77 } | 77 } |
78 if (inst->VP8().feedbackModeOn && inst->numberOfSimulcastStreams > 1) { | |
79 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | |
80 } | |
81 if (inst->VP8().automaticResizeOn && inst->numberOfSimulcastStreams > 1) { | 78 if (inst->VP8().automaticResizeOn && inst->numberOfSimulcastStreams > 1) { |
82 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 79 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
83 } | 80 } |
84 return WEBRTC_VIDEO_CODEC_OK; | 81 return WEBRTC_VIDEO_CODEC_OK; |
85 } | 82 } |
86 | 83 |
87 // An EncodedImageCallback implementation that forwards on calls to a | 84 // An EncodedImageCallback implementation that forwards on calls to a |
88 // SimulcastEncoderAdapter, but with the stream index it's registered with as | 85 // SimulcastEncoderAdapter, but with the stream index it's registered with as |
89 // the first parameter to Encoded. | 86 // the first parameter to Encoded. |
90 class AdapterEncodedImageCallback : public webrtc::EncodedImageCallback { | 87 class AdapterEncodedImageCallback : public webrtc::EncodedImageCallback { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 if (!Initialized() || NumberOfStreams(codec_) != 1) | 468 if (!Initialized() || NumberOfStreams(codec_) != 1) |
472 return VideoEncoder::ScalingSettings(false); | 469 return VideoEncoder::ScalingSettings(false); |
473 return streaminfos_[0].encoder->GetScalingSettings(); | 470 return streaminfos_[0].encoder->GetScalingSettings(); |
474 } | 471 } |
475 | 472 |
476 const char* SimulcastEncoderAdapter::ImplementationName() const { | 473 const char* SimulcastEncoderAdapter::ImplementationName() const { |
477 return implementation_name_.c_str(); | 474 return implementation_name_.c_str(); |
478 } | 475 } |
479 | 476 |
480 } // namespace webrtc | 477 } // namespace webrtc |
OLD | NEW |