Lines Matching refs:timestamp
138 spx_uint32_t last_returned_timestamp; /**< Useful for getting the next packet with the same timestamp (for fragmented media) */
141 spx_int32_t buffered; /**< Amount of data we think is still buffered by the application (timestamp units)*/
144 spx_uint32_t arrival[SPEEX_JITTER_MAX_BUFFER_SIZE]; /**< Packet arrival time (0 means it was late, even though it's a valid timestamp) */
148 spx_int32_t delay_step; /**< Size of the steps when adjusting buffering (timestamp units) */
168 The optimised function is in timestamp units and is:
171 @param late_factor Equivalent cost of a late frame (in timestamp units)
370 /*fprintf (stderr, "put packet %d %d\n", timestamp, span);*/
378 if (jitter->packets[i].data && LE32(jitter->packets[i].timestamp + jitter->packets[i].span, jitter->pointer_timestamp))
390 /*fprintf(stderr, "arrival: %d %d %d\n", packet->timestamp, jitter->next_stop, jitter->pointer_timestamp);*/
392 if (!jitter->reset_state && LT32(packet->timestamp, jitter->next_stop))
394 update_timings(jitter, ((spx_int32_t)packet->timestamp) - ((spx_int32_t)jitter->next_stop) - jitter->buffer_margin);
408 if (jitter->reset_state || GE32(packet->timestamp+packet->span+jitter->delay_step, jitter->pointer_timestamp))
421 int earliest=jitter->packets[0].timestamp;
425 if (!jitter->packets[i].data || LT32(jitter->packets[j].timestamp,earliest))
427 earliest = jitter->packets[j].timestamp;
436 /*fprintf (stderr, "Buffer is full, discarding earliest frame %d (currently at %d)\n", timestamp, jitter->pointer_timestamp);*/
448 jitter->packets[i].timestamp=packet->timestamp;
480 if (jitter->packets[i].data && (!found || LT32(jitter->packets[i].timestamp,oldest)))
482 oldest = jitter->packets[i].timestamp;
492 packet->timestamp = 0;
503 packet->timestamp = jitter->pointer_timestamp;
520 /* Search the buffer for a packet with the right timestamp and spanning the whole current chunk */
523 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))
532 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))
542 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))
557 if (jitter->packets[i].data && LT32(jitter->packets[i].timestamp,jitter->pointer_timestamp+desired_span) && GE32(jitter->packets[i].timestamp,jitter->pointer_timestamp))
559 if (!found || LT32(jitter->packets[i].timestamp,best_time) || (jitter->packets[i].timestamp==best_time && GT32(jitter->packets[i].span,best_span)))
561 best_time = jitter->packets[i].timestamp;
571 /*fprintf (stderr, "incomplete: %d %d %d %d\n", jitter->packets[i].timestamp, jitter->pointer_timestamp, chunk_size, jitter->packets[i].span);*/
583 /* In this case, 0 isn't as a valid timestamp */
586 update_timings(jitter, ((spx_int32_t)jitter->packets[i].timestamp) - ((spx_int32_t)jitter->arrival[i]) - jitter->buffer_margin);
608 /* Set timestamp and span (if requested) */
609 offset = (spx_int32_t)jitter->packets[i].timestamp-(spx_int32_t)jitter->pointer_timestamp;
615 packet->timestamp = jitter->packets[i].timestamp;
616 jitter->last_returned_timestamp = packet->timestamp;
622 jitter->pointer_timestamp = jitter->packets[i].timestamp+jitter->packets[i].span;
650 packet->timestamp = jitter->pointer_timestamp;
661 packet->timestamp = jitter->pointer_timestamp;
681 if (jitter->packets[i].data && jitter->packets[i].timestamp==jitter->last_returned_timestamp)
698 packet->timestamp = jitter->packets[i].timestamp;
744 /** Get pointer timestamp of jitter buffer */
794 if (jitter->packets[i].data && LE32(jitter->pointer_timestamp, jitter->packets[i].timestamp))