OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 uint32_t timestamp, | 55 uint32_t timestamp, |
56 unsigned int size, | 56 unsigned int size, |
57 bool first_packet, | 57 bool first_packet, |
58 bool marker_bit, | 58 bool marker_bit, |
59 FrameType type) { | 59 FrameType type) { |
60 EXPECT_LT(size, kMaxPacketSize); | 60 EXPECT_LT(size, kMaxPacketSize); |
61 VCMPacket packet; | 61 VCMPacket packet; |
62 packet.seqNum = sequence_number; | 62 packet.seqNum = sequence_number; |
63 packet.timestamp = timestamp; | 63 packet.timestamp = timestamp; |
64 packet.frameType = type; | 64 packet.frameType = type; |
65 packet.isFirstPacket = first_packet; | 65 packet.is_first_packet_in_frame = first_packet; |
66 packet.markerBit = marker_bit; | 66 packet.markerBit = marker_bit; |
67 packet.sizeBytes = size; | 67 packet.sizeBytes = size; |
68 packet.dataPtr = packet_buffer_; | 68 packet.dataPtr = packet_buffer_; |
69 if (packet.isFirstPacket) | 69 if (packet.is_first_packet_in_frame) |
70 packet.completeNALU = kNaluStart; | 70 packet.completeNALU = kNaluStart; |
71 else if (packet.markerBit) | 71 else if (packet.markerBit) |
72 packet.completeNALU = kNaluEnd; | 72 packet.completeNALU = kNaluEnd; |
73 else | 73 else |
74 packet.completeNALU = kNaluIncomplete; | 74 packet.completeNALU = kNaluIncomplete; |
75 return packet; | 75 return packet; |
76 } | 76 } |
77 | 77 |
78 bool StreamGenerator::PopPacket(VCMPacket* packet, int index) { | 78 bool StreamGenerator::PopPacket(VCMPacket* packet, int index) { |
79 std::list<VCMPacket>::iterator it = GetPacketIterator(index); | 79 std::list<VCMPacket>::iterator it = GetPacketIterator(index); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 std::list<VCMPacket>::iterator it = packets_.begin(); | 121 std::list<VCMPacket>::iterator it = packets_.begin(); |
122 for (int i = 0; i < index; ++i) { | 122 for (int i = 0; i < index; ++i) { |
123 ++it; | 123 ++it; |
124 if (it == packets_.end()) | 124 if (it == packets_.end()) |
125 break; | 125 break; |
126 } | 126 } |
127 return it; | 127 return it; |
128 } | 128 } |
129 | 129 |
130 } // namespace webrtc | 130 } // namespace webrtc |
OLD | NEW |