Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_format_h264.h

Issue 2871173008: Fix packetization logic to leave space for extensions in the last packet (Closed)
Patch Set: Impelement Danilchap@ comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_format_h264.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h
index fe7b37832aa90f1208be3aa4c6dd48a5d6ed2c50..7047885d8d6d0aef5889c1105e200b759cd33baf 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h
@@ -27,20 +27,19 @@ class RtpPacketizerH264 : public RtpPacketizer {
// Initialize with payload from encoder.
// The payload_data must be exactly one encoded H264 frame.
RtpPacketizerH264(size_t max_payload_len,
+ size_t last_packet_reduction_len,
H264PacketizationMode packetization_mode);
virtual ~RtpPacketizerH264();
- void SetPayloadData(const uint8_t* payload_data,
- size_t payload_size,
- const RTPFragmentationHeader* fragmentation) override;
+ size_t SetPayloadData(const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) override;
// Get the next payload with H264 payload header.
// Write payload and set marker bit of the |packet|.
- // The parameter |last_packet| is true for the last packet of the frame, false
- // otherwise (i.e., call the function again to get the next packet).
// Returns true on success, false otherwise.
- bool NextPacket(RtpPacketToSend* rtp_packet, bool* last_packet) override;
+ bool NextPacket(RtpPacketToSend* rtp_packet) override;
ProtectionType GetProtectionType() override;
@@ -88,10 +87,12 @@ class RtpPacketizerH264 : public RtpPacketizer {
void PacketizeFuA(size_t fragment_index);
size_t PacketizeStapA(size_t fragment_index);
void PacketizeSingleNalu(size_t fragment_index);
- void NextAggregatePacket(RtpPacketToSend* rtp_packet);
+ void NextAggregatePacket(RtpPacketToSend* rtp_packet, bool last);
void NextFragmentPacket(RtpPacketToSend* rtp_packet);
const size_t max_payload_len_;
+ const size_t last_packet_reduction_len_;
+ size_t num_packets_left_;
const H264PacketizationMode packetization_mode_;
std::deque<Fragment> input_fragments_;
std::queue<PacketUnit> packets_;
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698