Home | History | Annotate | Download | only in neteq

Lines Matching refs:packet

19 // The method loops through a list of packets {A, B, C, ...}. Each packet is
22 // When the first packet in |packet_list| has been processed, the orignal packet
31 Packet* red_packet = (*it);
51 Packet* new_packet = new Packet;
88 // The block lengths in the RED headers do not match the overall packet
90 // payloads from this packet.
111 // Delete old packet payload.
114 // Remove |it| from the packet list. This operation effectively moves the
115 // iterator |it| to the next packet in the list. Thus, we do not have to
127 Packet* packet = (*it); // Just to make the notation more intuitive.
129 uint8_t payload_type = packet->header.payloadType;
135 // No splitting for a sync-packet.
136 if (packet->sync_packet) {
141 // Not an FEC packet.
146 !decoder->PacketHasFec(packet->payload, packet->payload_length)) {
154 Packet* new_packet = new Packet;
156 new_packet->header = packet->header;
158 PacketDurationRedundant(packet->payload, packet->payload_length);
160 new_packet->payload = new uint8_t[packet->payload_length];
161 memcpy(new_packet->payload, packet->payload, packet->payload_length);
162 new_packet->payload_length = packet->payload_length;
164 new_packet->waiting_time = packet->waiting_time;
165 new_packet->sync_packet = packet->sync_packet;
190 // This is the first packet in the list which is non-DTMF non-CNG.
198 // Remove |it| from the packet list. This operation effectively
199 // moves the iterator |it| to the next packet in the list. Thus, we
217 Packet* packet = (*it); // Just to make the notation more intuitive.
220 decoder_database.GetDecoderInfo(packet->header.payloadType);
224 // No splitting for a sync-packet.
225 if (packet->sync_packet) {
234 SplitBySamples(packet, 8, 8, &new_packets);
240 SplitBySamples(packet, 2 * 8, 8, &new_packets);
245 SplitBySamples(packet, 8, 16, &new_packets);
250 SplitBySamples(packet, 16, 8, &new_packets);
255 SplitBySamples(packet, 32, 16, &new_packets);
260 SplitBySamples(packet, 64, 32, &new_packets);
265 SplitBySamples(packet, 96, 48, &new_packets);
270 SplitBySamples(packet, 2 * 16, 8, &new_packets);
275 SplitBySamples(packet, 2 * 32, 16, &new_packets);
280 SplitBySamples(packet, 2 * 64, 32, &new_packets);
285 SplitBySamples(packet, 2 * 96, 48, &new_packets);
290 SplitBySamples(packet, 5 * 16, 8, &new_packets);
296 if (packet->payload_length >= 950) {
298 } else if (packet->payload_length % 38 == 0) {
302 } else if (packet->payload_length % 50 == 0) {
309 int ret = SplitByFrames(packet, bytes_per_frame, timestamps_per_frame,
314 // Do not split at all. Simply advance to the next packet in the list.
318 // the next packet in the while loop.
324 // Do not split at all. Simply advance to the next packet in the list.
328 // the next packet in the while loop.
336 // Delete old packet payload.
339 // Remove |it| from the packet list. This operation effectively moves the
340 // iterator |it| to the next packet in the list. Thus, we do not have to
347 void PayloadSplitter::SplitBySamples(const Packet* packet,
351 assert(packet);
354 int split_size_bytes = packet->payload_length;
366 uint32_t timestamp = packet->header.timestamp;
368 uint8_t* payload_ptr = packet->payload;
369 int len = packet->payload_length;
371 Packet* new_packet = new Packet;
373 new_packet->header = packet->header;
376 new_packet->primary = packet->primary;
385 Packet* new_packet = new Packet;
387 new_packet->header = packet->header;
389 new_packet->primary = packet->primary;
396 int PayloadSplitter::SplitByFrames(const Packet* packet,
400 if (packet->payload_length % bytes_per_frame != 0) {
404 int num_frames = packet->payload_length / bytes_per_frame;
410 uint32_t timestamp = packet->header.timestamp;
411 uint8_t* payload_ptr = packet->payload;
412 int len = packet->payload_length;
415 Packet* new_packet = new Packet;
417 new_packet->header = packet->header;
420 new_packet->primary = packet->primary;