MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Play

Method Play

Source/Engine/Video/VideoPlayer.cpp:78–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void VideoPlayer::Play()
79{
80 auto state = _state;
81 if (state == States::Playing)
82 return;
83
84 if (!_player.Backend)
85 {
86 if (Url.IsEmpty())
87 {
88 LOG(Warning, "Cannot play Video source without an url ({0})", GetNamePath());
89 return;
90 }
91
92 // Create video player
93 VideoBackendPlayerInfo info;
94 GetInfo(info);
95 if (Video::CreatePlayerBackend(info, _player))
96 return;
97
98 // Pre-allocate output video texture
99 _player.InitVideoFrame();
100 }
101
102 _player.Backend->Player_Play(_player);
103 _state = States::Playing;
104}
105
106void VideoPlayer::Pause()
107{

Callers

nothing calls this directly

Calls 3

InitVideoFrameMethod · 0.80
IsEmptyMethod · 0.45
Player_PlayMethod · 0.45

Tested by

no test coverage detected