From b60f7d772f0f80d6acca87d83889b2ba33da60bd Mon Sep 17 00:00:00 2001 From: starfish002 Date: Mon, 23 Aug 2021 14:43:05 +0800 Subject: [PATCH] support get current player-state Signed-off-by: starfish002 --- media/player_sample.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/media/player_sample.cpp b/media/player_sample.cpp index 870faf0..cc5459e 100755 --- a/media/player_sample.cpp +++ b/media/player_sample.cpp @@ -259,6 +259,10 @@ static void SampleCmd(TestSample &sample) ret = sample.adapter->GetVideoHeight(videoHeight); IS_OK(ret); printf("player videoWidth:%d videoHeight:%d\n", videoWidth, videoHeight); + int32_t state; + ret = sample.adapter->GetPlayerState(state); + IS_OK(ret); + printf("player current state:%d\n", state); } else if (strncmp(cmd, "loop", 4) == 0) { if (sscanf_s(cmd, "loop %d", &loop) != 1) { printf("ERR: not input loop flag, example: loop 1!\n"); -- Gitee