Lines Matching defs:resource
99 IMFAssetLocator *locator; /**< Location of the resource */
100 FFIMFTrackFileResource *resource; /**< Underlying IMF CPL resource */
101 AVFormatContext *ctx; /**< Context associated with the resource */
102 AVRational start_time; /**< inclusive start time of the resource on the CPL timeline (s) */
103 AVRational end_time; /**< exclusive end time of the resource on the CPL timeline (s) */
104 AVRational ts_offset; /**< start_time minus the entry point into the resource (s) */
112 unsigned int resources_alloc_sz; /**< Size of the buffer holding the resource */
114 int32_t current_resource_index; /**< Index of the current resource in resources,
115 or < 0 if a current resource has yet to be selected */
412 * - the entry point of the resource
422 av_log(s, AV_LOG_DEBUG, "Seek at resource %s entry point: %" PRIi64 "\n",
483 vt_ctx.resource = track_file_resource;
532 "Could not open image track resource " AV_PRI_URN_UUID "\n",
569 /* Open the first resource of the track to get stream information */
574 av_log(s, AV_LOG_DEBUG, "Open the first resource of track %d\n", c->tracks[i]->index);
709 static int get_resource_context_for_timestamp(AVFormatContext *s, IMFVirtualTrackPlaybackCtx *track, IMFVirtualTrackResourcePlaybackCtx **resource)
711 *resource = NULL;
720 "Looking for track %d resource for timestamp = %lf / %lf\n",
727 av_log(s, AV_LOG_DEBUG, "Found resource %d in track %d to read at timestamp %lf: "
730 track->resources[i].resource->base.entry_point,
731 track->resources[i].resource->base.duration,
732 AVRATIONAL_ARG(track->resources[i].resource->base.edit_rate));
737 av_log(s, AV_LOG_TRACE, "Switch resource on track %d: re-open context\n",
748 *resource = track->resources + track->current_resource_index;
753 av_log(s, AV_LOG_ERROR, "Could not find IMF track resource to read\n");
759 IMFVirtualTrackResourcePlaybackCtx *resource = NULL;
768 ret = get_resource_context_for_timestamp(s, track, &resource);
772 ret = av_read_frame(resource->ctx, pkt);
785 st = resource->ctx->streams[0];
789 /* adjust the packet PTS and DTS based on the temporal position of the resource within the timeline */
791 ret = imf_time_to_ts(&delta_ts, resource->ts_offset, st->time_base);
801 AVRATIONAL_ARG(resource->ts_offset),
810 /* if necessary, clamp the next timestamp to the end of the current resource */
812 if (av_cmp_q(next_timestamp, resource->end_time) > 0) {
819 av_sub_q(resource->end_time, track->current_timestamp),
846 av_sub_q(next_timestamp, resource->end_time),
861 next_timestamp = resource->end_time;