Skip to content

Commit

Permalink
test: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudemanguy committed Jan 3, 2024
1 parent ab5b250 commit aff9eb0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions player/playloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ static void handle_vo_events(struct MPContext *mpctx)
mp_notify(mpctx, MP_EVENT_WIN_STATE, NULL);
if (events & VO_EVENT_DPI)
mp_notify(mpctx, MP_EVENT_WIN_STATE2, NULL);
if (events & VO_EVENT_FOCUS)
mp_notify(mpctx, MP_EVENT_FOCUS, NULL);
/*if (events & VO_EVENT_FOCUS)
mp_notify(mpctx, MP_EVENT_FOCUS, NULL);*/
}

static void handle_sstep(struct MPContext *mpctx)
Expand Down
21 changes: 15 additions & 6 deletions test/libmpv_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,16 @@ static void test_file_loading(char *file)
{
const char *cmd[] = {"loadfile", file, NULL};
check_api_error(mpv_command(ctx, cmd));
int loaded = 0;
int finished = 0;
while (!finished) {
mpv_event *event = mpv_wait_event(ctx, 0);
switch (event->event_id) {
case MPV_EVENT_END_FILE:
finished = 1;
break;
}
}
/*int loaded = 0;
int finished = 0;
while (!finished) {
mpv_event *event = mpv_wait_event(ctx, 0);
Expand All @@ -164,10 +173,10 @@ static void test_file_loading(char *file)
}
}
if (!finished)
fail("Unable to load test file!\n");
fail("Unable to load test file!\n");*/
}

static void test_lavfi_complex(char *file)
/*static void test_lavfi_complex(char *file)
{
const char *cmd[] = {"loadfile", file, NULL};
check_api_error(mpv_command(ctx, cmd));
Expand All @@ -194,7 +203,7 @@ static void test_lavfi_complex(char *file)
}
if (!finished)
fail("Lavfi complex failed!\n");
}
}*/

// Ensure that setting options/properties work correctly and
// have the expected values.
Expand Down Expand Up @@ -263,8 +272,8 @@ int main(int argc, char *argv[])
test_options_and_properties();
printf(fmt, "test_file_loading");
test_file_loading(argv[1]);
printf(fmt, "test_lavfi_complex");
test_lavfi_complex(argv[1]);
// printf(fmt, "test_lavfi_complex");
// test_lavfi_complex(argv[1]);

mpv_destroy(ctx);
return 0;
Expand Down

0 comments on commit aff9eb0

Please sign in to comment.