drop visual_resize_internal

pull/1727/head
nick black 3 years ago committed by Nick Black
parent 4cf653635a
commit c64e6e265e

@ -1667,13 +1667,6 @@ typedef struct ncvisual_implementation {
int (*visual_stream)(notcurses* nc, struct ncvisual* ncv, float timescale, int (*visual_stream)(notcurses* nc, struct ncvisual* ncv, float timescale,
ncstreamcb streamer, const struct ncvisual_options* vopts, void* curry); ncstreamcb streamer, const struct ncvisual_options* vopts, void* curry);
char* (*visual_subtitle)(const struct ncvisual* ncv); char* (*visual_subtitle)(const struct ncvisual* ncv);
// do a resize, without updating the ncvisual structure. if the target
// parameters are already matched, the existing data will be returned.
// otherwise, a scaled copy will be returned. they can be differentiated
// by comparing the result against ncv->data.
uint32_t* (*visual_resize_internal)(const struct ncvisual* ncv, int rows,
int* stride, int cols,
const struct blitterargs* bargs);
// do a persistent resize, changing the ncv itself // do a persistent resize, changing the ncv itself
int (*visual_resize)(struct ncvisual* ncv, int rows, int cols); int (*visual_resize)(struct ncvisual* ncv, int rows, int cols);
void (*visual_destroy)(struct ncvisual* ncv); void (*visual_destroy)(struct ncvisual* ncv);

@ -455,8 +455,13 @@ int ffmpeg_decode_loop(ncvisual* ncv){
return r; return r;
} }
uint32_t* ffmpeg_resize_internal(const ncvisual* ncv, int rows, int* stride, // do a resize *without* updating the ncvisual structure. if the target
int cols, const blitterargs* bargs){ // parameters are already matched, the existing data will be returned.
// otherwise, a scaled copy will be returned. they can be differentiated by
// comparing the result against ncv->data.
static uint32_t*
ffmpeg_resize_internal(const ncvisual* ncv, int rows, int* stride, int cols,
const blitterargs* bargs){
const AVFrame* inframe = ncv->details->frame; const AVFrame* inframe = ncv->details->frame;
//print_frame_summary(NULL, inframe); //print_frame_summary(NULL, inframe);
const int targformat = AV_PIX_FMT_RGBA; const int targformat = AV_PIX_FMT_RGBA;
@ -631,7 +636,6 @@ static const ncvisual_implementation ffmpeg_impl = {
.visual_decode_loop = ffmpeg_decode_loop, .visual_decode_loop = ffmpeg_decode_loop,
.visual_stream = ffmpeg_stream, .visual_stream = ffmpeg_stream,
.visual_subtitle = ffmpeg_subtitle, .visual_subtitle = ffmpeg_subtitle,
.visual_resize_internal = ffmpeg_resize_internal,
.visual_resize = ffmpeg_resize, .visual_resize = ffmpeg_resize,
.visual_destroy = ffmpeg_destroy, .visual_destroy = ffmpeg_destroy,
.canopen_images = true, .canopen_images = true,

Loading…
Cancel
Save