Reland "Add spatial index to EncodedImage."
This is a reland of da0898dfae3b0a013ca8ad3828e9adfdc749748d Original change's description: > Add spatial index to EncodedImage. > > Replaces the VP8 simulcast index and VP9 spatial index formely part of > CodecSpecificInfo. > > Bug: webrtc:9378 > Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2 > Reviewed-on: https://webrtc-review.googlesource.com/83161 > Commit-Queue: Niels Moller <nisse@webrtc.org> > Reviewed-by: Erik Språng <sprang@webrtc.org> > Reviewed-by: Sebastian Jansson <srte@webrtc.org> > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Philip Eliasson <philipel@webrtc.org> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24485} Tbr: magjed@webrtc.org Bug: webrtc:9378 Change-Id: Iff20b656581ef63317e073833d1a326f7118fdfd Reviewed-on: https://webrtc-review.googlesource.com/96780 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24507}
This commit is contained in:
@ -95,8 +95,8 @@ std::vector<std::vector<FrameType>> GetTimingFrames(
|
||||
image._length = FrameSize(min_frame_size, max_frame_size, s, i);
|
||||
image.capture_time_ms_ = current_timestamp;
|
||||
image.SetTimestamp(static_cast<uint32_t>(current_timestamp * 90));
|
||||
image.SetSpatialIndex(s);
|
||||
codec_specific.codecType = kVideoCodecGeneric;
|
||||
codec_specific.codecSpecific.generic.simulcast_idx = s;
|
||||
callback.OnEncodeStarted(static_cast<uint32_t>(current_timestamp * 90),
|
||||
current_timestamp, s);
|
||||
if (dropped) {
|
||||
@ -189,7 +189,6 @@ TEST(TestVCMEncodedFrameCallback, NoTimingFrameIfNoEncodeStartTime) {
|
||||
image.capture_time_ms_ = timestamp;
|
||||
image.SetTimestamp(static_cast<uint32_t>(timestamp * 90));
|
||||
codec_specific.codecType = kVideoCodecGeneric;
|
||||
codec_specific.codecSpecific.generic.simulcast_idx = 0;
|
||||
FakeEncodedImageCallback sink;
|
||||
VCMEncodedFrameCallback callback(&sink, nullptr);
|
||||
VideoCodec::TimingFrameTriggerThresholds thresholds;
|
||||
@ -221,7 +220,6 @@ TEST(TestVCMEncodedFrameCallback, AdjustsCaptureTimeForInternalSourceEncoder) {
|
||||
image.capture_time_ms_ = timestamp;
|
||||
image.SetTimestamp(static_cast<uint32_t>(timestamp * 90));
|
||||
codec_specific.codecType = kVideoCodecGeneric;
|
||||
codec_specific.codecSpecific.generic.simulcast_idx = 0;
|
||||
FakeEncodedImageCallback sink;
|
||||
VCMEncodedFrameCallback callback(&sink, nullptr);
|
||||
callback.SetInternalSource(true);
|
||||
@ -257,7 +255,6 @@ TEST(TestVCMEncodedFrameCallback, NotifiesAboutDroppedFrames) {
|
||||
const int64_t kTimestampMs3 = 47721860;
|
||||
const int64_t kTimestampMs4 = 47721870;
|
||||
codec_specific.codecType = kVideoCodecGeneric;
|
||||
codec_specific.codecSpecific.generic.simulcast_idx = 0;
|
||||
FakeEncodedImageCallback sink;
|
||||
VCMEncodedFrameCallback callback(&sink, nullptr);
|
||||
// Any non-zero bitrate needed to be set before the first frame.
|
||||
@ -293,7 +290,6 @@ TEST(TestVCMEncodedFrameCallback, RestoresCaptureTimestamps) {
|
||||
CodecSpecificInfo codec_specific;
|
||||
const int64_t kTimestampMs = 123456;
|
||||
codec_specific.codecType = kVideoCodecGeneric;
|
||||
codec_specific.codecSpecific.generic.simulcast_idx = 0;
|
||||
FakeEncodedImageCallback sink;
|
||||
VCMEncodedFrameCallback callback(&sink, nullptr);
|
||||
// Any non-zero bitrate needed to be set before the first frame.
|
||||
|
Reference in New Issue
Block a user