/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
std::vector<VideoFrameType> layers(ssrcs_.size(),
VideoFrameType::kVideoFrameDelta); if (!per_layer_keyframes_) { // Always produce key frame for all streams.
video_stream_encoder_->SendKeyFrame();
} else { // Determine on which layer we ask for key frames.
layers[ssrc_index] = VideoFrameType::kVideoFrameKey;
video_stream_encoder_->SendKeyFrame(layers);
}
}
// Deduce decodability of the last received frame and of its dependencies. if (last_received.is_first && last_received.is_last) { // The frame consists of a single packet, and that packet has evidently // been received in full; the frame is therefore assemblable. // In this case, the decodability of the dependencies is communicated by // the decodability flag, and the frame itself is decodable if and only // if they are decodable.
loss_notification.dependencies_of_last_received_decodable =
decodability_flag;
loss_notification.last_received_decodable = decodability_flag;
} elseif (last_received.is_first && !last_received.is_last) { // In this case, the decodability flag communicates the decodability of // the dependencies. If any is undecodable, we also know that the frame // itself will not be decodable; if all are decodable, the frame's own // decodability will remain unknown, as not all of its packets have // been received.
loss_notification.dependencies_of_last_received_decodable =
decodability_flag;
loss_notification.last_received_decodable =
!decodability_flag ? std::make_optional(false) : std::nullopt;
} elseif (!last_received.is_first && last_received.is_last) { if (decodability_flag) { // The frame has been received in full, and found to be decodable. // (Messages of this type are not sent by WebRTC at the moment, but are // theoretically possible, for example for serving as acks.)
loss_notification.dependencies_of_last_received_decodable = true;
loss_notification.last_received_decodable = true;
} else { // It is impossible to tell whether some dependencies were undecodable, // or whether the frame was unassemblable, but in either case, the frame // itself was undecodable.
loss_notification.dependencies_of_last_received_decodable = std::nullopt;
loss_notification.last_received_decodable = false;
}
} else { // !last_received.is_first && !last_received.is_last if (decodability_flag) { // The frame has not yet been received in full, but no gaps have // been encountered so far, and the dependencies were all decodable. // (Messages of this type are not sent by WebRTC at the moment, but are // theoretically possible, for example for serving as acks.)
loss_notification.dependencies_of_last_received_decodable = true;
loss_notification.last_received_decodable = std::nullopt;
} else { // It is impossible to tell whether some dependencies were undecodable, // or whether the frame was unassemblable, but in either case, the frame // itself was undecodable.
loss_notification.dependencies_of_last_received_decodable = std::nullopt;
loss_notification.last_received_decodable = false;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.