Lines Matching refs:timestamp

140    spx_uint32_t last_returned_timestamp;                       /**< Useful for getting the next packet with the same timestamp (for fragmented media) */
143 spx_int32_t buffered; /**< Amount of data we think is still buffered by the application (timestamp units)*/
146 spx_uint32_t arrival[SPEEX_JITTER_MAX_BUFFER_SIZE]; /**< Packet arrival time (0 means it was late, even though it's a valid timestamp) */
150 spx_int32_t delay_step; /**< Size of the steps when adjusting buffering (timestamp units) */
170 The optimised function is in timestamp units and is:
173 @param late_factor Equivalent cost of a late frame (in timestamp units)
372 /*fprintf (stderr, "put packet %d %d\n", timestamp, span);*/
380 if (jitter->packets[i].data && LE32(jitter->packets[i].timestamp + jitter->packets[i].span, jitter->pointer_timestamp))
392 /*fprintf(stderr, "arrival: %d %d %d\n", packet->timestamp, jitter->next_stop, jitter->pointer_timestamp);*/
394 if (!jitter->reset_state && LT32(packet->timestamp, jitter->next_stop))
396 update_timings(jitter, ((spx_int32_t)packet->timestamp) - ((spx_int32_t)jitter->next_stop) - jitter->buffer_margin);
410 if (jitter->reset_state || GE32(packet->timestamp+packet->span+jitter->delay_step, jitter->pointer_timestamp))
423 int earliest=jitter->packets[0].timestamp;
427 if (!jitter->packets[i].data || LT32(jitter->packets[j].timestamp,earliest))
429 earliest = jitter->packets[j].timestamp;
438 /*fprintf (stderr, "Buffer is full, discarding earliest frame %d (currently at %d)\n", timestamp, jitter->pointer_timestamp);*/
450 jitter->packets[i].timestamp=packet->timestamp;
483 if (jitter->packets[i].data && (!found || LT32(jitter->packets[i].timestamp,oldest)))
485 oldest = jitter->packets[i].timestamp;
495 packet->timestamp = 0;
506 packet->timestamp = jitter->pointer_timestamp;
523 /* Search the buffer for a packet with the right timestamp and spanning the whole current chunk */
526 if (jitter->packets[i].data && jitter->packets[i].timestamp==jitter->pointer_timestamp && GE32(jitter->packets[i].timestamp+jitter->packets[i].span,jitter->pointer_timestamp+desired_span))
535 if (jitter->packets[i].data && LE32(jitter->packets[i].timestamp, jitter->pointer_timestamp) && GE32(jitter->packets[i].timestamp+jitter->packets[i].span,jitter->pointer_timestamp+desired_span))
545 if (jitter->packets[i].data && LE32(jitter->packets[i].timestamp, jitter->pointer_timestamp) && GT32(jitter->packets[i].timestamp+jitter->packets[i].span,jitter->pointer_timestamp))
560 if (jitter->packets[i].data && LT32(jitter->packets[i].timestamp,jitter->pointer_timestamp+desired_span) && GE32(jitter->packets[i].timestamp,jitter->pointer_timestamp))
562 if (!found || LT32(jitter->packets[i].timestamp,best_time) || (jitter->packets[i].timestamp==best_time && GT32(jitter->packets[i].span,best_span)))
564 best_time = jitter->packets[i].timestamp;
575 /*fprintf (stderr, "incomplete: %d %d %d %d\n", jitter->packets[i].timestamp, jitter->pointer_timestamp, chunk_size, jitter->packets[i].span);*/
587 /* In this case, 0 isn't as a valid timestamp */
590 update_timings(jitter, ((spx_int32_t)jitter->packets[i].timestamp) - ((spx_int32_t)jitter->arrival[i]) - jitter->buffer_margin);
612 /* Set timestamp and span (if requested) */
613 offset = (spx_int32_t)jitter->packets[i].timestamp-(spx_int32_t)jitter->pointer_timestamp;
619 packet->timestamp = jitter->packets[i].timestamp;
620 jitter->last_returned_timestamp = packet->timestamp;
626 jitter->pointer_timestamp = jitter->packets[i].timestamp+jitter->packets[i].span;
654 packet->timestamp = jitter->pointer_timestamp;
665 packet->timestamp = jitter->pointer_timestamp;
685 if (jitter->packets[i].data && jitter->packets[i].timestamp==jitter->last_returned_timestamp)
702 packet->timestamp = jitter->packets[i].timestamp;
748 /** Get pointer timestamp of jitter buffer */
798 if (jitter->packets[i].data && LE32(jitter->pointer_timestamp, jitter->packets[i].timestamp))