[bitmaps] new unit test LoadVideoPixelScaleDifferentPlanes

pull/1502/head^2
nick black 3 years ago
parent 656b3221af
commit 2f47d9adef
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -625,13 +625,14 @@ TEST_CASE("Visual") {
}
}
SUBCASE("LoadVideoPixelScale") {
SUBCASE("LoadVideoPixelScaleOnePlane") {
if(notcurses_check_pixel_support(nc_) > 0){
if(notcurses_canopen_videos(nc_)){
int dimy, dimx;
ncplane_dim_yx(ncp_, &dimy, &dimx);
auto ncv = ncvisual_from_file(find_data("notcursesIII.mkv"));
REQUIRE(ncv);
struct ncplane* n = NULL;
for(;;){ // run at the highest speed we can
int ret = ncvisual_decode(ncv);
if(1 == ret){
@ -641,7 +642,34 @@ TEST_CASE("Visual") {
struct ncvisual_options opts{};
opts.scaling = NCSCALE_SCALE;
opts.blitter = NCBLIT_PIXEL;
CHECK(ncvisual_render(nc_, ncv, &opts));
opts.n = n;
n = ncvisual_render(nc_, ncv, &opts);
REQUIRE(nullptr != n);
CHECK(0 == notcurses_render(nc_));
}
ncplane_destroy(n);
ncvisual_destroy(ncv);
}
}
}
SUBCASE("LoadVideoPixelScaleDifferentPlanes") {
if(notcurses_check_pixel_support(nc_) > 0){
if(notcurses_canopen_videos(nc_)){
int dimy, dimx;
ncplane_dim_yx(ncp_, &dimy, &dimx);
auto ncv = ncvisual_from_file(find_data("notcursesIII.mkv"));
REQUIRE(ncv);
for(;;){ // run at the highest speed we can
int ret = ncvisual_decode(ncv);
if(1 == ret){
break;
}
CHECK(0 == ret);
struct ncvisual_options opts{};
opts.scaling = NCSCALE_SCALE;
opts.blitter = NCBLIT_PIXEL;
REQUIRE(ncvisual_render(nc_, ncv, &opts));
CHECK(0 == notcurses_render(nc_));
}
ncvisual_destroy(ncv);

Loading…
Cancel
Save