Make PayloadRouter own the picture id and tl0 pic idx sequences.
It previously owned only the picture id and only in the
WebRTC-VP8-Forced-Fallback-Encoder-v2 experiment.
Moving responsibility to PayloadRouter ensures that both
picture id and tl0 idx are continuous over codec changes,
as required by the specs for VP8 and VP9 over RTP.
Bug: webrtc:8830
Change-Id: Ie77356dfec6d1e372b6970189e4c3888451920e6
Reviewed-on: https://webrtc-review.googlesource.com/61640
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22448}
diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc
index c7c6247..06f485b 100644
--- a/modules/video_coding/codecs/vp9/vp9_impl.cc
+++ b/modules/video_coding/codecs/vp9/vp9_impl.cc
@@ -646,6 +646,8 @@
vp9_info->inter_layer_predicted = true;
}
+ vp9_info->first_frame_in_picture = is_first_frame;
+
if (pkt.data.frame.flags & VPX_FRAME_IS_KEY) {
frames_since_kf_ = 0;
}
diff --git a/modules/video_coding/include/video_codec_interface.h b/modules/video_coding/include/video_codec_interface.h
index 6616053..7524631 100644
--- a/modules/video_coding/include/video_codec_interface.h
+++ b/modules/video_coding/include/video_codec_interface.h
@@ -28,23 +28,28 @@
// Note: if any pointers are added to this struct, it must be fitted
// with a copy-constructor. See below.
struct CodecSpecificInfoVP8 {
+ // TODO(nisse): Delete, set by PayloadRouter.
int16_t pictureId; // Negative value to skip pictureId.
bool nonReference;
uint8_t simulcastIdx;
uint8_t temporalIdx;
bool layerSync;
+ // TODO(nisse): Delete, set by PayloadRouter.
int tl0PicIdx; // Negative value to skip tl0PicIdx.
int8_t keyIdx; // Negative value to skip keyIdx.
};
struct CodecSpecificInfoVP9 {
+ // TODO(nisse): Delete, set by PayloadRouter.
int16_t picture_id; // Negative value to skip pictureId.
+ bool first_frame_in_picture; // First frame, increment picture_id.
bool inter_pic_predicted; // This layer frame is dependent on previously
// coded frame(s).
bool flexible_mode;
bool ss_data_available;
+ // TODO(nisse): Delete, set by PayloadRouter.
int tl0_pic_idx; // Negative value to skip tl0PicIdx.
uint8_t temporal_idx;
uint8_t spatial_idx;