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

Unified Diff: webrtc/modules/video_coding/session_info.cc

Issue 2380933003: Delete unused support for vp8 partitions. (Closed)
Patch Set: Created 4 years, 3 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/video_coding/session_info.h ('k') | webrtc/modules/video_coding/session_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/session_info.cc
diff --git a/webrtc/modules/video_coding/session_info.cc b/webrtc/modules/video_coding/session_info.cc
index b11f6903b96854dde54b63798bbd3f7e689d2d93..8f136eecb40211e093009fab2d3be4b291e2e0f9 100644
--- a/webrtc/modules/video_coding/session_info.cc
+++ b/webrtc/modules/video_coding/session_info.cc
@@ -326,53 +326,6 @@ size_t VCMSessionInfo::DeletePacketData(PacketIterator start,
return bytes_to_delete;
}
-size_t VCMSessionInfo::BuildVP8FragmentationHeader(
- uint8_t* frame_buffer,
- size_t frame_buffer_length,
- RTPFragmentationHeader* fragmentation) {
- size_t new_length = 0;
- // Allocate space for max number of partitions
- fragmentation->VerifyAndAllocateFragmentationHeader(kMaxVP8Partitions);
- fragmentation->fragmentationVectorSize = 0;
- memset(fragmentation->fragmentationLength, 0,
- kMaxVP8Partitions * sizeof(size_t));
- if (packets_.empty())
- return new_length;
- PacketIterator it = FindNextPartitionBeginning(packets_.begin());
- while (it != packets_.end()) {
- const int partition_id = (*it).video_header.codecHeader.VP8.partitionId;
- PacketIterator partition_end = FindPartitionEnd(it);
- fragmentation->fragmentationOffset[partition_id] =
- (*it).dataPtr - frame_buffer;
- assert(fragmentation->fragmentationOffset[partition_id] <
- frame_buffer_length);
- fragmentation->fragmentationLength[partition_id] =
- (*partition_end).dataPtr + (*partition_end).sizeBytes - (*it).dataPtr;
- assert(fragmentation->fragmentationLength[partition_id] <=
- frame_buffer_length);
- new_length += fragmentation->fragmentationLength[partition_id];
- ++partition_end;
- it = FindNextPartitionBeginning(partition_end);
- if (partition_id + 1 > fragmentation->fragmentationVectorSize)
- fragmentation->fragmentationVectorSize = partition_id + 1;
- }
- // Set all empty fragments to start where the previous fragment ends,
- // and have zero length.
- if (fragmentation->fragmentationLength[0] == 0)
- fragmentation->fragmentationOffset[0] = 0;
- for (int i = 1; i < fragmentation->fragmentationVectorSize; ++i) {
- if (fragmentation->fragmentationLength[i] == 0)
- fragmentation->fragmentationOffset[i] =
- fragmentation->fragmentationOffset[i - 1] +
- fragmentation->fragmentationLength[i - 1];
- assert(i == 0 ||
- fragmentation->fragmentationOffset[i] >=
- fragmentation->fragmentationOffset[i - 1]);
- }
- assert(new_length <= frame_buffer_length);
- return new_length;
-}
-
VCMSessionInfo::PacketIterator VCMSessionInfo::FindNextPartitionBeginning(
PacketIterator it) const {
while (it != packets_.end()) {
« no previous file with comments | « webrtc/modules/video_coding/session_info.h ('k') | webrtc/modules/video_coding/session_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698