In PacketBuffer split logic for detecting frame boundaries and assembling frame.
Bug: webrtc:11042
Change-Id: If1695067054b332569f4839aa6762af33173b769
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159283
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29799}
diff --git a/modules/video_coding/packet_buffer.h b/modules/video_coding/packet_buffer.h
index 517fcc6..1d0a69f 100644
--- a/modules/video_coding/packet_buffer.h
+++ b/modules/video_coding/packet_buffer.h
@@ -85,13 +85,13 @@
std::vector<std::unique_ptr<RtpFrameObject>> FindFrames(uint16_t seq_num)
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
- rtc::scoped_refptr<EncodedImageBuffer> GetEncodedImageBuffer(
- size_t frame_size,
- uint16_t first_seq_num,
- uint16_t last_seq_num) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ std::unique_ptr<RtpFrameObject> AssembleFrame(uint16_t first_seq_num,
+ uint16_t last_seq_num)
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Get the packet with sequence number |seq_num|.
- VCMPacket* GetPacket(uint16_t seq_num) RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ const VCMPacket& GetPacket(uint16_t seq_num) const
+ RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Clears the packet buffer from |start_seq_num| to |stop_seq_num| where the
// endpoints are inclusive.