Skip to content

Commit

Permalink
test: fix compile
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai.pk <[email protected]>
  • Loading branch information
pingkai committed Jan 14, 2020
1 parent b838d94 commit b9603dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 8 additions & 1 deletion mediaPlayer/tests/mediaPlayerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ static void releaseView(){
void test_player(const string &url, OnLoop loop, void *arg)
{
unique_ptr<MediaPlayer> player = unique_ptr<MediaPlayer>(new MediaPlayer());
#ifdef ENABLE_SDL
SDL_Window * window = getView();
player->SetView(window);
#else
int i;
player->SetView(&i);
#endif
player->SetDataSource(url.c_str());
player->SetAutoPlay(true);
player->SetView(window);
player->Prepare();
if (loop) {
int ret = 0;
Expand All @@ -61,5 +66,7 @@ void test_player(const string &url, OnLoop loop, void *arg)
}
} else
af_msleep(10000);
#ifdef ENABLE_SDL
releaseView(window);
#endif
}
4 changes: 1 addition & 3 deletions mediaPlayer/tests/player_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
//

#include "player_command.h"
#include <utils/timer.h>

#ifdef ENABLE_SDL

#include <SDL2/SDL.h>
#include <utils/timer.h>

#endif

int command_loop(Cicada::MediaPlayer *player, void *arg)
Expand Down

0 comments on commit b9603dc

Please sign in to comment.