aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenSing.pas27
-rw-r--r--Game/Code/Screens/UScreenSingModi.pas7
2 files changed, 18 insertions, 16 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 5409d9a9..283c51d0 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -2,8 +2,8 @@ unit UScreenSing;
interface
-uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, USmpeg, UTexture, ULyrics,
- TextGL, OpenGL12, BASS, UThemes, ULCD, UGraphicClasses;
+uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, UTexture, ULyrics,
+ TextGL, OpenGL12, BASS, UThemes, ULCD, UGraphicClasses, UVideo;
type
TScreenSing = class(TMenu)
@@ -146,7 +146,7 @@ begin
//stop Music
Music.Pause;
if (AktSong.Video <> '') and FileExists(AktSong.Path + AktSong.Video) then //Video
- PauseSmpeg; //Video
+ FFmpegTogglePause; //Video
end
else //Pause ausschalten
begin
@@ -154,8 +154,7 @@ begin
Music.MoveTo (PauseTime);//Position of Music
Music.Play; //Play Music
if (AktSong.Video <> '') and FileExists(AktSong.Path + AktSong.Video) then //Video
- PlaySmpeg;
- //SkipSmpeg(PauseTime);
+ FFmpegTogglePause;
Paused := false;
end;
end;
@@ -223,6 +222,7 @@ begin
LyricMain := TLyric.Create;
LyricSub := TLyric.Create;
+ UVideo.Init;
end;
procedure TScreenSing.onShow;
@@ -350,9 +350,9 @@ begin
// set movie
if (AktSong.Video <> '') and FileExists(AktSong.Path + AktSong.Video) then begin
- OpenSmpeg(AktSong.Path + AktSong.Video);
- SkipSmpeg(AktSong.VideoGAP + AktSong.Start);
- AktSong.VideoLoaded := true;
+ FFmpegOpenFile(PAnsiChar(AktSong.Path + AktSong.Video));
+ FFmpegSkip(AktSong.VideoGAP + AktSong.Start);
+ if (UVideo.VideoOpened) then AktSong.VideoLoaded := true;
end;
// set background
@@ -740,14 +740,14 @@ begin
if AktSong.VideoLoaded then
begin
try
- PlaySmpeg;
+ FFmpegGetFrame(Czas.Teraz);
except
//If an Error occurs Reading Video: prevent Video from being Drawn again and Close Video
AktSong.VideoLoaded := False;
Log.LogError('Error drawing Video, Video has been disabled for this Song/Session.');
Log.LogError('Corrupted File: ' + AktSong.Video);
try
- CloseSmpeg;
+ FFmpegClose;
except
end;
@@ -1062,14 +1062,15 @@ begin
// update and draw movie
if ShowFinish and AktSong.VideoLoaded then begin
try
- UpdateSmpeg; // this only draws
+ FFmpegGetFrame(Czas.Teraz);
+ FFmpegDrawGL(ScreenAct); // this only draws
except
//If an Error occurs drawing: prevent Video from being Drawn again and Close Video
AktSong.VideoLoaded := False;
log.LogError('Error drawing Video, Video has been disabled for this Song/Session.');
Log.LogError('Corrupted File: ' + AktSong.Video);
try
- CloseSmpeg;
+ FFmpegClose;
except
end;
@@ -1144,7 +1145,7 @@ begin
end;
if AktSong.VideoLoaded then begin
- CloseSmpeg;
+ FFmpegClose;
AktSong.VideoLoaded := false; // to prevent drawing closed video
end;
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas
index 32526a07..8a52a4b8 100644
--- a/Game/Code/Screens/UScreenSingModi.pas
+++ b/Game/Code/Screens/UScreenSingModi.pas
@@ -2,8 +2,8 @@ unit UScreenSingModi;
interface
-uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, USmpeg, UTexture, ULyrics,
- TextGL, OpenGL12, BASS, UThemes, ULCD, UScreenSing, ModiSDK;
+uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, UTexture, ULyrics,
+ TextGL, OpenGL12, BASS, UThemes, ULCD, UScreenSing, ModiSDK, UVideo;
type
TScreenSingModi = class(TScreenSing)
@@ -944,7 +944,8 @@ end;
// update and draw movie
if ShowFinish and AktSong.VideoLoaded AND DllMan.Selected.LoadVideo then begin
- UpdateSmpeg; // this only draws
+ FFmpegGetFrame(Czas.Teraz);
+ FFmpegDrawGL(ScreenAct); // this only draws
end;
// draw static menu (FG)