/* * Copyright 2018 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.
*/ #ifndef VIDEO_VIDEO_SEND_STREAM_IMPL_H_ #define VIDEO_VIDEO_SEND_STREAM_IMPL_H_
// VideoSendStreamImpl implements webrtc::VideoSendStream. // It is created and destroyed on `worker queue`. The intent is to // An encoder may deliver frames through the EncodedImageCallback on an // arbitrary thread. class VideoSendStreamImpl : public webrtc::VideoSendStream, public webrtc::BitrateAllocatorObserver, public VideoStreamEncoderInterface::EncoderSink { public: using RtpStateMap = std::map<uint32_t, RtpState>; using RtpPayloadStateMap = std::map<uint32_t, RtpPayloadState>;
// Implements EncodedImageCallback. The implementation routes encoded frames // to the `payload_router_` and `config.pre_encode_callback` if set. // Called on an arbitrary encoder callback thread.
EncodedImageCallback::Result OnEncodedImage( const EncodedImage& encoded_image, const CodecSpecificInfo* codec_specific_info) override;
// Starts monitoring and sends a keyframe. void StartupVideoSendStream(); // Removes the bitrate observer, stops monitoring and notifies the video // encoder of the bitrate update. void StopVideoSendStream() RTC_RUN_ON(thread_checker_);
void ConfigureProtection(); void ConfigureSsrcs(); void SignalEncoderTimedOut(); void SignalEncoderActive(); // A video send stream is running if VideoSendStream::Start has been invoked // and there is an active encoding. bool IsRunning() const;
MediaStreamAllocationConfig GetAllocationConfig() const
RTC_RUN_ON(thread_checker_);
// Context for the most recent and last sent video bitrate allocation. Used to // throttle sending of similar bitrate allocations. struct VbaSendContext {
VideoBitrateAllocation last_sent_allocation;
std::optional<VideoBitrateAllocation> throttled_allocation;
int64_t last_send_time_ms;
};
std::optional<VbaSendContext> video_bitrate_allocation_context_
RTC_GUARDED_BY(thread_checker_); const std::optional<float> configured_pacing_factor_;
};
} // namespace internal
} // namespace webrtc #endif// VIDEO_VIDEO_SEND_STREAM_IMPL_H_
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.