In VP9 wrapper fill information required to produce Dependency Descriptor
Bug: webrtc:11999 Change-Id: Id20575fca5b9279adccf1498165815aa16e044af Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187340 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32421}
This commit is contained in:
committed by
Commit Bot
parent
711de82cd1
commit
5ad731ad89
@ -57,7 +57,6 @@ EncodedVideoFrameProducer::Encode() {
|
||||
WEBRTC_VIDEO_CODEC_OK);
|
||||
|
||||
uint32_t rtp_tick = 90000 / framerate_fps_;
|
||||
std::vector<VideoFrameType> frame_types = {VideoFrameType::kVideoFrameDelta};
|
||||
for (int i = 0; i < num_input_frames_; ++i) {
|
||||
VideoFrame frame =
|
||||
VideoFrame::Builder()
|
||||
@ -65,7 +64,9 @@ EncodedVideoFrameProducer::Encode() {
|
||||
.set_timestamp_rtp(rtp_timestamp_)
|
||||
.build();
|
||||
rtp_timestamp_ += rtp_tick;
|
||||
RTC_CHECK_EQ(encoder_.Encode(frame, &frame_types), WEBRTC_VIDEO_CODEC_OK);
|
||||
RTC_CHECK_EQ(encoder_.Encode(frame, &next_frame_type_),
|
||||
WEBRTC_VIDEO_CODEC_OK);
|
||||
next_frame_type_[0] = VideoFrameType::kVideoFrameDelta;
|
||||
}
|
||||
|
||||
RTC_CHECK_EQ(encoder_.RegisterEncodeCompleteCallback(nullptr),
|
||||
|
||||
@ -40,6 +40,8 @@ class EncodedVideoFrameProducer {
|
||||
|
||||
// Number of the input frames to pass to the encoder.
|
||||
EncodedVideoFrameProducer& SetNumInputFrames(int value);
|
||||
// Encode next frame as key frame.
|
||||
EncodedVideoFrameProducer& ForceKeyFrame();
|
||||
// Resolution of the input frames.
|
||||
EncodedVideoFrameProducer& SetResolution(RenderResolution value);
|
||||
|
||||
@ -57,6 +59,8 @@ class EncodedVideoFrameProducer {
|
||||
int num_input_frames_ = 1;
|
||||
int framerate_fps_ = 30;
|
||||
RenderResolution resolution_ = {320, 180};
|
||||
std::vector<VideoFrameType> next_frame_type_ = {
|
||||
VideoFrameType::kVideoFrameKey};
|
||||
};
|
||||
|
||||
inline EncodedVideoFrameProducer& EncodedVideoFrameProducer::SetNumInputFrames(
|
||||
@ -66,6 +70,11 @@ inline EncodedVideoFrameProducer& EncodedVideoFrameProducer::SetNumInputFrames(
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline EncodedVideoFrameProducer& EncodedVideoFrameProducer::ForceKeyFrame() {
|
||||
next_frame_type_ = {VideoFrameType::kVideoFrameKey};
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline EncodedVideoFrameProducer& EncodedVideoFrameProducer::SetResolution(
|
||||
RenderResolution value) {
|
||||
resolution_ = value;
|
||||
|
||||
Reference in New Issue
Block a user