Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/anim_movie.c
| Show First 20 Lines • Show All 796 Lines • ▼ Show 20 Lines | if (sws_setColorspaceDetails(anim->img_convert_ctx, | ||||
| saturation)) { | saturation)) { | ||||
| fprintf(stderr, "Warning: Could not set libswscale colorspace details.\n"); | fprintf(stderr, "Warning: Could not set libswscale colorspace details.\n"); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| fprintf(stderr, "Warning: Could not set libswscale colorspace details.\n"); | fprintf(stderr, "Warning: Could not set libswscale colorspace details.\n"); | ||||
| } | } | ||||
| anim->seek_failed = false; | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| /* postprocess the image in anim->pFrame and do color conversion | /* postprocess the image in anim->pFrame and do color conversion | ||||
| * and deinterlacing stuff. | * and deinterlacing stuff. | ||||
| * | * | ||||
| * Output is anim->cur_frame_final | * Output is anim->cur_frame_final | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | av_log(anim->pFormatCtx, | ||||
| (int64_t)pts_to_search); | (int64_t)pts_to_search); | ||||
| } | } | ||||
| if (scan_fuzzy || anim->cur_pts == pts_to_search) { | if (scan_fuzzy || anim->cur_pts == pts_to_search) { | ||||
| av_log(anim->pFormatCtx, AV_LOG_DEBUG, "SCAN HAPPY: we found our PTS!\n"); | av_log(anim->pFormatCtx, AV_LOG_DEBUG, "SCAN HAPPY: we found our PTS!\n"); | ||||
| } | } | ||||
| else { | else { | ||||
| av_log(anim->pFormatCtx, AV_LOG_ERROR, "SCAN UNHAPPY: PTS not matched!\n"); | av_log(anim->pFormatCtx, AV_LOG_ERROR, "SCAN UNHAPPY: PTS not matched!\n"); | ||||
| anim->seek_failed = true; | |||||
| } | } | ||||
| } | } | ||||
| /* Wrapper over av_seek_frame(), for formats that doesn't have its own read_seek() or | /* Wrapper over av_seek_frame(), for formats that doesn't have its own read_seek() or | ||||
| * read_seek2() functions defined. When seeking in these formats, rule to seek to last | * read_seek2() functions defined. When seeking in these formats, rule to seek to last | ||||
| * necessary I-frame is not honored. It is not even guaranteed that I-frame, that must be | * necessary I-frame is not honored. It is not even guaranteed that I-frame, that must be | ||||
| * decoded will be read. See https://trac.ffmpeg.org/ticket/1607 and | * decoded will be read. See https://trac.ffmpeg.org/ticket/1607 and | ||||
| * https://developer.blender.org/T86944. */ | * https://developer.blender.org/T86944. */ | ||||
| ▲ Show 20 Lines • Show All 531 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| return anim->x; | return anim->x; | ||||
| } | } | ||||
| int IMB_anim_get_image_height(struct anim *anim) | int IMB_anim_get_image_height(struct anim *anim) | ||||
| { | { | ||||
| return anim->y; | return anim->y; | ||||
| } | } | ||||
| bool IMB_anim_seek_failed_check(struct anim *anim) | |||||
| { | |||||
| bool seek_failed = anim->seek_failed; | |||||
| anim->seek_failed = false; | |||||
| return seek_failed; | |||||
| } | |||||