Lines Matching refs:timestamp

26 #include "libavutil/timestamp.h"
33 void avpriv_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
40 av_rescale(timestamp,
63 int64_t pos, int64_t timestamp,
72 if (timestamp == AV_NOPTS_VALUE)
78 if (is_relative(timestamp)) //FIXME this maintains previous behavior but we should shift by the correct offset once known
79 timestamp -= RELATIVE_TS_BASE;
91 timestamp, AVSEEK_FLAG_ANY);
95 av_assert0(index == 0 || ie[-1].timestamp < timestamp);
98 if (ie->timestamp != timestamp) {
99 if (ie->timestamp <= timestamp)
110 ie->timestamp = timestamp;
118 int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,
122 timestamp = ff_wrap_timestamp(st, timestamp);
125 timestamp, size, distance, flags);
132 int64_t timestamp;
138 if (b && entries[b - 1].timestamp < wanted_timestamp)
147 if (m == b && entries[m].timestamp >= wanted_timestamp) {
153 timestamp = entries[m].timestamp;
154 if (timestamp >= wanted_timestamp)
156 if (timestamp <= wanted_timestamp)
203 int64_t e1_pts = av_rescale_q(e1->timestamp, st1->time_base, AV_TIME_BASE_Q);
208 int64_t e2_pts = av_rescale_q(e2->timestamp, st2->time_base, AV_TIME_BASE_Q);
315 if (e->timestamp <= target_ts || e->pos == e->min_distance) {
317 ts_min = e->timestamp;
329 av_assert1(e->timestamp >= target_ts);
331 ts_max = e->timestamp;
520 int64_t timestamp, int flags)
529 index = av_index_search_timestamp(st, timestamp, flags);
532 timestamp < sti->index_entries[0].timestamp)
545 avpriv_update_cur_dts(s, st, ie->timestamp);
559 if (stream_index == pkt->stream_index && pkt->dts > timestamp) {
565 av_log(s, AV_LOG_ERROR,"seek_frame_generic failed as this stream seems to contain no keyframes after the target timestamp, %d non keyframes found\n", nonkey);
572 index = av_index_search_timestamp(st, timestamp, flags);
579 if (s->iformat->read_seek(s, stream_index, timestamp, flags) >= 0)
585 avpriv_update_cur_dts(s, st, ie->timestamp);
591 int64_t timestamp, int flags)
600 return seek_frame_byte(s, stream_index, timestamp, flags);
609 /* timestamp for default must be expressed in AV_TIME_BASE units */
610 timestamp = av_rescale(timestamp, st->time_base.den,
617 ret = s->iformat->read_seek(s, stream_index, timestamp, flags);
626 return ff_seek_frame_binary(s, stream_index, timestamp, flags);
629 return seek_frame_generic(s, stream_index, timestamp, flags);
635 int64_t timestamp, int flags)
642 max_ts = timestamp;
644 min_ts = timestamp;
645 return avformat_seek_file(s, stream_index, min_ts, timestamp, max_ts,
649 ret = seek_frame_internal(s, stream_index, timestamp, flags);