aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-16 11:27:23 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-16 11:27:23 +0000
commit8c923b5b76bb17e00132a0b2b2b96de34265fc63 (patch)
tree160d8b7736fe7c65667334e3cfe508d8e646c7ca /Game/Code/Screens
parentd3218aef1528f9233fc8bdd8c3e341ea9d135d9b (diff)
downloadusdx-8c923b5b76bb17e00132a0b2b2b96de34265fc63.tar.gz
usdx-8c923b5b76bb17e00132a0b2b2b96de34265fc63.tar.xz
usdx-8c923b5b76bb17e00132a0b2b2b96de34265fc63.zip
modified ffmpeg usage, to use interface same as bass...
still needs some tidy up, but its working. :) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@515 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenSing.pas43
1 files changed, 28 insertions, 15 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index abb2726e..c32b29e0 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -22,13 +22,15 @@ uses UMenu,
ULyrics,
TextGL,
OpenGL12,
+(*
{$IFDEF useBASS}
bass,
{$ENDIF}
+*)
UThemes,
ULCD,
UGraphicClasses,
- UVideo,
+// UVideo,
USingScores;
type
@@ -186,7 +188,8 @@ begin
// pause Video
if (AktSong.Video <> '') and FileExists(AktSong.Path + AktSong.Video) then
- FFmpegTogglePause;
+ VideoPlayback.Pause;
+// FFmpegTogglePause;
end
else //Pause ausschalten
begin
@@ -199,7 +202,8 @@ begin
// Video
if (AktSong.Video <> '') and FileExists(AktSong.Path + AktSong.Video) then
- FFmpegTogglePause;
+ VideoPlayback.Pause;
+// FFmpegTogglePause;
//SkipSmpeg(PauseTime);
Paused := false;
@@ -279,7 +283,7 @@ begin
Lyrics := TLyricEngine.Create(80,Skin_LyricsT,640,12,80,Skin_LyricsT+36,640,12);
- UVideo.Init;
+ VideoPlayback.Init();
end;
procedure TScreenSing.onShow;
@@ -432,8 +436,12 @@ begin
SkipSmpeg(AktSong.VideoGAP + AktSong.Start);*)
// todo: VideoGap and Start time verwursten
- FFmpegOpenFile(pAnsiChar(AktSong.Path + AktSong.Video));
- FFmpegSkip(AktSong.VideoGAP + AktSong.Start);
+// FFmpegOpenFile(pAnsiChar(AktSong.Path + AktSong.Video));
+ VideoPlayback.Open( AktSong.Path + AktSong.Video );
+
+// FFmpegSkip(AktSong.VideoGAP + AktSong.Start);
+ VideoPlayback.position := AktSong.VideoGAP + AktSong.Start;
+
AktSong.VideoLoaded := true;
end;
@@ -847,8 +855,11 @@ begin
if AktSong.VideoLoaded then
begin
try
- FFmpegGetFrame(Czas.Teraz);
- FFmpegDrawGL(ScreenAct);
+ writeln( 'VideoPlayback.FFmpegGetFrame' );
+ VideoPlayback.FFmpegGetFrame(Czas.Teraz);
+
+ writeln( 'VideoPlayback.FFmpegDrawGL' );
+ VideoPlayback.FFmpegDrawGL(ScreenAct);
// PlaySmpeg;
except
@@ -862,7 +873,7 @@ begin
Log.LogError('Corrupted File: ' + AktSong.Video);
try
// CloseSmpeg;
- FFmpegClose;
+ VideoPlayback.Close;
except
end;
@@ -1112,14 +1123,15 @@ begin
SingDrawBackground;
// update and draw movie
- if ShowFinish and AktSong.VideoLoaded then begin
+ if ShowFinish and AktSong.VideoLoaded then
+ begin
try
// UpdateSmpeg; // this only draws
// todo: find a way to determine, when a new frame is needed
// toto: same for the need to skip frames
- FFmpegGetFrame(Czas.Teraz);
- FFmpegDrawGL(ScreenAct);
+ VideoPlayback.FFmpegGetFrame(Czas.Teraz);
+ VideoPlayback.FFmpegDrawGL(ScreenAct);
except
on E : Exception do
begin
@@ -1133,7 +1145,7 @@ begin
Log.LogError('Corrupted File: ' + AktSong.Video);
try
// CloseSmpeg;
- FFmpegClose;
+ VideoPlayback.Close;
except
end;
@@ -1213,9 +1225,10 @@ begin
Log.LogBenchmark('Creating files', 0);
end;
- if AktSong.VideoLoaded then begin
+ if AktSong.VideoLoaded then
+ begin
// CloseSmpeg;
- FFmpegClose;
+ VideoPlayback.Close;
AktSong.VideoLoaded := false; // to prevent drawing closed video
end;