Lines Matching refs:ctx

81 void ffio_init_context(FFIOContext *ctx,
90 AVIOContext *const s = &ctx->pub;
92 memset(ctx, 0, sizeof(*ctx));
95 ctx->orig_buffer_size =
114 ctx->short_seek_threshold = SHORT_SEEK_THRESHOLD;
125 ctx->current_type = AVIO_DATA_MARKER_UNKNOWN;
126 ctx->last_time = AV_NOPTS_VALUE;
127 ctx->short_seek_get = NULL;
159 FFIOContext *const ctx = ffiocontext(s);
165 ctx->current_type,
166 ctx->last_time);
172 ctx->bytes_written += len;
173 s->bytes_written = ctx->bytes_written;
175 if (s->pos + len > ctx->written_output_size) {
176 ctx->written_output_size = s->pos + len;
179 s->written = ctx->written_output_size;
185 if (ctx->current_type == AVIO_DATA_MARKER_SYNC_POINT ||
186 ctx->current_type == AVIO_DATA_MARKER_BOUNDARY_POINT) {
187 ctx->current_type = AVIO_DATA_MARKER_UNKNOWN;
189 ctx->last_time = AV_NOPTS_VALUE;
190 ctx->writeout_count++;
262 FFIOContext *const ctx = ffiocontext(s);
294 short_seek = ctx->short_seek_threshold;
295 if (ctx->short_seek_get) {
296 int tmp = ctx->short_seek_get(s->opaque);
337 ctx->seek_count++;
354 FFIOContext *const ctx = ffiocontext(s);
360 if (ctx->written_output_size)
361 return ctx->written_output_size;
492 FFIOContext *const ctx = ffiocontext(s);
506 (ctx->current_type != AVIO_DATA_MARKER_HEADER &&
507 ctx->current_type != AVIO_DATA_MARKER_TRAILER))
515 if (type == ctx->current_type)
523 ctx->current_type = type;
524 ctx->last_time = time;
542 FFIOContext *const ctx = (FFIOContext *)s;
565 if (s->read_packet && ctx->orig_buffer_size &&
566 s->buffer_size > ctx->orig_buffer_size && len >= ctx->orig_buffer_size) {
568 int ret = set_buf_size(s, ctx->orig_buffer_size);
574 len = ctx->orig_buffer_size;
1095 FFIOContext *const ctx = ffiocontext(s);
1096 if (ctx->maxsize >= 0) {
1098 int64_t remaining = ctx->maxsize - pos;
1101 if (!ctx->maxsize || ctx->maxsize < newsize)
1102 ctx->maxsize = newsize - !newsize;
1103 if (pos > ctx->maxsize && ctx->maxsize >= 0)
1104 ctx->maxsize = AVERROR(EIO);
1105 if (ctx->maxsize >= 0)
1106 remaining = ctx->maxsize - pos;
1109 if (ctx->maxsize >= 0 && remaining < size && size > 1) {
1257 FFIOContext *const ctx = ffiocontext(s);
1272 ctx->bytes_written, ctx->seek_count, ctx->writeout_count);
1275 ctx->bytes_read, ctx->seek_count);