You've already forked lazarus-ccr
Now disables most of the output which was added only to fix this bug
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2081 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<AutoIncrementBuild Value="True"/>
|
<AutoIncrementBuild Value="True"/>
|
||||||
<MinorVersionNr Value="3"/>
|
<MinorVersionNr Value="3"/>
|
||||||
<RevisionNr Value="5"/>
|
<RevisionNr Value="5"/>
|
||||||
<BuildNr Value="748"/>
|
<BuildNr Value="750"/>
|
||||||
<StringTable ProductVersion="0.3.5.737"/>
|
<StringTable ProductVersion="0.3.5.737"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="2">
|
<BuildModes Count="2">
|
||||||
|
@@ -40,7 +40,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Application.Title:='cactus';
|
Application.Title:='cactus';
|
||||||
{$ifdef CactusDebug}
|
{$ifdef CactusDebug}
|
||||||
CVerbosityLevel:=9;
|
CVerbosityLevel:=8;
|
||||||
{$else}
|
{$else}
|
||||||
{$ifdef Windows}
|
{$ifdef Windows}
|
||||||
CVerbosityLevel:=0;
|
CVerbosityLevel:=0;
|
||||||
|
@@ -987,11 +987,11 @@ begin
|
|||||||
else
|
else
|
||||||
StatusBar1.Panels[0].Text := 'Buffering Stream...';
|
StatusBar1.Panels[0].Text := 'Buffering Stream...';
|
||||||
end;
|
end;
|
||||||
DebugOutLn('[TMain.playtimerTimer] A', 1);
|
DebugOutLn('[TMain.playtimerTimer] A', 9);
|
||||||
if (PlayerObj.playing) and (PlayerObj.PlaybackMode = FILE_MODE) and
|
if (PlayerObj.playing) and (PlayerObj.PlaybackMode = FILE_MODE) and
|
||||||
(PlayerObj.paused = False) then
|
(PlayerObj.paused = False) then
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMain.playtimerTimer] player playing', 1);
|
DebugOutLn('[TMain.playtimerTimer] player playing', 9);
|
||||||
|
|
||||||
if not bPnlPlaytimeNegated then
|
if not bPnlPlaytimeNegated then
|
||||||
pnlPlaytime.Caption := PlayerObj.get_timestr
|
pnlPlaytime.Caption := PlayerObj.get_timestr
|
||||||
@@ -1001,18 +1001,18 @@ begin
|
|||||||
playwin.TimeImg.Canvas.Font.Color := ClNavy;
|
playwin.TimeImg.Canvas.Font.Color := ClNavy;
|
||||||
playwin.TimeImg.Canvas.TextOut(5, 3, pnlPlaytime.Caption);
|
playwin.TimeImg.Canvas.TextOut(5, 3, pnlPlaytime.Caption);
|
||||||
|
|
||||||
DebugOutLn('[TMain.playtimerTimer] B', 3);
|
DebugOutLn('[TMain.playtimerTimer] B', 9);
|
||||||
|
|
||||||
DebugOutLn(Format('[TMain.playtimerTimer] tmppos=%d', [tmppos]), 3);
|
DebugOutLn(Format('[TMain.playtimerTimer] tmppos=%d', [tmppos]), 9);
|
||||||
tmppos := PlayerObj.Get_FilePosition;
|
tmppos := PlayerObj.Get_FilePosition;
|
||||||
trackbar.position := tmppos;
|
trackbar.position := tmppos;
|
||||||
x2 := (trackbar.position * 2) - 3;
|
x2 := (trackbar.position * 2) - 3;
|
||||||
if x2 < 3 then
|
if x2 < 3 then
|
||||||
x2 := 3;
|
x2 := 3;
|
||||||
DebugOutLn('[TMain.playtimerTimer] D', 3);
|
DebugOutLn('[TMain.playtimerTimer] D', 9);
|
||||||
if (tmppos = 100) then
|
if (tmppos = 100) then
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMain.playtimerTimer] E', 3);
|
DebugOutLn('[TMain.playtimerTimer] E', 9);
|
||||||
// writeln('nexttrack');
|
// writeln('nexttrack');
|
||||||
// WriteLn(PlayerObj.CurrentTrack);
|
// WriteLn(PlayerObj.CurrentTrack);
|
||||||
if (PlayerObj.CurrentTrack < PlayerObj.Playlist.ItemCount) then
|
if (PlayerObj.CurrentTrack < PlayerObj.Playlist.ItemCount) then
|
||||||
@@ -1022,7 +1022,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if CactusConfig.CoverDownload and (CoverFound = False) and (LoopCount < 20) then
|
if CactusConfig.CoverDownload and (CoverFound = False) and (LoopCount < 20) then
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMain.playtimerTimer] F', 3);
|
DebugOutLn('[TMain.playtimerTimer] F', 9);
|
||||||
Inc(LoopCount);
|
Inc(LoopCount);
|
||||||
if (assigned(LastFMAPI)) and (LastFMAPI.data_ready) then
|
if (assigned(LastFMAPI)) and (LastFMAPI.data_ready) then
|
||||||
begin
|
begin
|
||||||
@@ -1033,7 +1033,7 @@ begin
|
|||||||
CoverImage.Picture.LoadFromFile(fileobj.CoverPath);
|
CoverImage.Picture.LoadFromFile(fileobj.CoverPath);
|
||||||
playwin.AlbumCoverImg.Picture.LoadFromFile(fileobj.CoverPath);
|
playwin.AlbumCoverImg.Picture.LoadFromFile(fileobj.CoverPath);
|
||||||
except
|
except
|
||||||
DebugOutLn('EXCEPTION', 1);
|
DebugOutLn('[TMain.playtimerTimer] EXCEPTION', 1);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
CoverFound := True;
|
CoverFound := True;
|
||||||
@@ -1042,15 +1042,15 @@ begin
|
|||||||
end
|
end
|
||||||
else if (LoopCount >= 20) and (CoverFound = False) then
|
else if (LoopCount >= 20) and (CoverFound = False) then
|
||||||
CoverImage.Picture.Clear;
|
CoverImage.Picture.Clear;
|
||||||
DebugOutLn('[TMain.playtimerTimer] G', 3);
|
DebugOutLn('[TMain.playtimerTimer] G', 9);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMain.playtimerTimer] H', 3);
|
DebugOutLn('[TMain.playtimerTimer] H', 9);
|
||||||
{playtimer.Enabled:=false};
|
{playtimer.Enabled:=false};
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
DebugOutLn('CAUGHT EXCEPTION IN PLAYTIMER!!!!', 1);
|
DebugOutLn('[TMain.playtimerTimer] CAUGHT EXCEPTION IN PLAYTIMER!!!!', 1);
|
||||||
end;
|
end;
|
||||||
DebugOutLn('[TMain.playtimerTimer] END', 3);
|
DebugOutLn('[TMain.playtimerTimer] END', 3);
|
||||||
end;
|
end;
|
||||||
|
@@ -101,16 +101,17 @@ procedure TMPlayerClass.SendCommand(cmd: string);
|
|||||||
var
|
var
|
||||||
res: DWORD;
|
res: DWORD;
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMPlayerClass.sendcommand] START cmd=' + cmd, 3);
|
DebugOutLn('[TMPlayerClass.sendcommand] START cmd=' + cmd, 9);
|
||||||
cmd:=cmd+#10; //MPLayer always needs #10 as Lineending, no matter if win32 or linux
|
cmd:=cmd+#10; //MPLayer always needs #10 as Lineending, no matter if win32 or linux
|
||||||
try
|
try
|
||||||
if GetMPlayerPlaying then
|
if GetMPlayerPlaying then
|
||||||
begin
|
begin
|
||||||
//DebugOutLn('[TMPlayerClass.sendcommand] 2', 3);
|
|
||||||
MPlayerProcess.Input.write(cmd[1], length(cmd));
|
MPlayerProcess.Input.write(cmd[1], length(cmd));
|
||||||
|
|
||||||
|
// Equivalent using the Windows API, which freezes if the buffer is full (aka, not read by mplayer)
|
||||||
//Windows.WriteFile(MPlayerProcess.Input.Handle,cmd[1],length(cmd), res, nil);
|
//Windows.WriteFile(MPlayerProcess.Input.Handle,cmd[1],length(cmd), res, nil);
|
||||||
end;
|
end;
|
||||||
DebugOutLn('[TMPlayerClass.sendcommand] END', 3);
|
DebugOutLn('[TMPlayerClass.sendcommand] END', 9);
|
||||||
except
|
except
|
||||||
DebugOutLn('EXCEPTION sending command to mplayer', 3);
|
DebugOutLn('EXCEPTION sending command to mplayer', 3);
|
||||||
end;
|
end;
|
||||||
@@ -134,7 +135,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
//writeln('endget');
|
//writeln('endget');
|
||||||
AStringList.Free;
|
AStringList.Free;
|
||||||
DebugOutLn('[TMPlayerClass.GetProcessOutput] Result=' + Result, 3);
|
DebugOutLn('[TMPlayerClass.GetProcessOutput] Result=' + Result, 9);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@@ -195,7 +196,7 @@ var
|
|||||||
MPOptions: String;
|
MPOptions: String;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMPlayerClass.play]', 3);
|
DebugOutLn('[TMPlayerClass.play]', 5);
|
||||||
if (index<Playlist.ItemCount) and (index>=0) then
|
if (index<Playlist.ItemCount) and (index>=0) then
|
||||||
begin
|
begin
|
||||||
if (FileExists(playlist.items[index].path)) then
|
if (FileExists(playlist.items[index].path)) then
|
||||||
@@ -222,14 +223,14 @@ begin
|
|||||||
|
|
||||||
MPlayerProcess.CommandLine:=FMplayerPath+' '+MPOptions+' "'+playlist.items[index].path+'"';
|
MPlayerProcess.CommandLine:=FMplayerPath+' '+MPOptions+' "'+playlist.items[index].path+'"';
|
||||||
|
|
||||||
DebugOutLn(MPlayerProcess.CommandLine,5);
|
DebugOutLn(MPlayerProcess.CommandLine, 5);
|
||||||
FLastGet_Pos:=0;
|
FLastGet_Pos:=0;
|
||||||
MPlayerProcess.Options:= MPlayerProcess.Options + [poUsePipes, poDefaultErrorMode{, poStderrToOutPut}, poNoConsole];
|
MPlayerProcess.Options:= MPlayerProcess.Options + [poUsePipes, poDefaultErrorMode, poNoConsole]; {, poStderrToOutPut <= This caused freezes in Windows}
|
||||||
MPlayerProcess.Execute;
|
MPlayerProcess.Execute;
|
||||||
|
|
||||||
if MPlayerProcess.Running then
|
if MPlayerProcess.Running then
|
||||||
begin
|
begin
|
||||||
DebugOutLn('MPlayerProcess is Running', 3);
|
DebugOutLn('MPlayerProcess is Running', 9);
|
||||||
FCurrentTrack:=index;
|
FCurrentTrack:=index;
|
||||||
FPlaying:=true;
|
FPlaying:=true;
|
||||||
Playlist.Items[index].Played:=true;
|
Playlist.Items[index].Played:=true;
|
||||||
@@ -240,7 +241,7 @@ begin
|
|||||||
result:=1;
|
result:=1;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
DebugOutLn('File not found ->'+playlist.items[index].path,0);
|
DebugOutLn('File not found ->'+playlist.items[index].path, 1);
|
||||||
end;
|
end;
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
function TMPlayerClass.play(url: string): byte;
|
function TMPlayerClass.play(url: string): byte;
|
||||||
@@ -400,17 +401,17 @@ var
|
|||||||
tmps: string;
|
tmps: string;
|
||||||
i:integer;
|
i:integer;
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] START', 3);
|
DebugOutLn('[TMPlayerClass.Get_FilePosition] START', 9);
|
||||||
if GetMPlayerPlaying then
|
if GetMPlayerPlaying then
|
||||||
begin
|
begin
|
||||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] A', 3);
|
DebugOutLn('[TMPlayerClass.Get_FilePosition] A', 9);
|
||||||
i:=0;
|
i:=0;
|
||||||
repeat
|
repeat
|
||||||
SendCommand('get_property percent_pos');
|
SendCommand('get_property percent_pos');
|
||||||
sleep(8);
|
sleep(8);
|
||||||
tmps:=GetProcessOutput;
|
tmps:=GetProcessOutput;
|
||||||
inc(i);
|
inc(i);
|
||||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] GetProcessOutput=' + tmps, 3);
|
DebugOutLn('[TMPlayerClass.Get_FilePosition] GetProcessOutput=' + tmps, 9);
|
||||||
until (pos('percent_pos', tmps)>0) or (i>=5);
|
until (pos('percent_pos', tmps)>0) or (i>=5);
|
||||||
|
|
||||||
// writeln('getpos');
|
// writeln('getpos');
|
||||||
@@ -427,7 +428,7 @@ begin
|
|||||||
result:=-1;
|
result:=-1;
|
||||||
|
|
||||||
if (result=-1) and (FLastGet_Pos>0) then Result:=100;
|
if (result=-1) and (FLastGet_Pos>0) then Result:=100;
|
||||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] END', 3);
|
DebugOutLn('[TMPlayerClass.Get_FilePosition] END', 9);
|
||||||
end;
|
end;
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
function TMPlayerClass.get_FileLength: longint;
|
function TMPlayerClass.get_FileLength: longint;
|
||||||
|
Reference in New Issue
Block a user