Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi (DSPACK) DSTrackBar läuft nicht mit bei DVD (https://www.delphipraxis.net/123558-dspack-dstrackbar-laeuft-nicht-mit-bei-dvd.html)

Paul0703 4. Nov 2008 12:17


(DSPACK) DSTrackBar läuft nicht mit bei DVD
 
Wenn ich Dateien zu dem FilterGraph hinzufuege, geht alles. Aber wenn ich eine DVD rendere, dann läuft die DSTrackBar nicht mit.
Woran könnte das liegen? :(

MfG
Paul

Cylence 12. Nov 2008 15:54

Re: (DSPACK) DSTrackBar läuft nicht mit bei DVD
 
Hi,

weil die DSTrackbar nicht mit DVD funktioniert...

ich habs so gemacht: DVDSlider ist eine Trackbar

Delphi-Quellcode:

FilterGraph.Play;
    (FilterGraph as IDVDInfo2).GetTotalTitleTime(TotalTime,TimeFlag);
    DVDTitleEndPos := MRMaster.HoursToMiliSec(TotalTime.bHours, TotalTime.bMinutes, TotalTime.bSeconds);
    DVDSlider.Max := DVDTitleEndPos;


//------------------------

procedure TMRDVD.FilterGraphDVDCurrentHMSFTime(sender: TObject;
  HMSFTimeCode: tagDVD_HMSF_TIMECODE; TimeCode: tagDVD_TIMECODE);
var
  TotalTime:TDVDHMSFTimeCode;
  TimeFlag:ULONG;
begin
  (FilterGraph as IDVDInfo2).GetTotalTitleTime(TotalTime,TimeFlag);
  DVDTitleEndPos := MRMaster.HoursToMiliSec(TotalTime.bHours, TotalTime.bMinutes, TotalTime.bSeconds);
  DVDSlider.Max := DVDTitleEndPos;
  with HMSFTimeCode do begin
    Label1.Caption := format('%2.2d:%2.2d:%2.2d',[bHours, bMinutes ,bSeconds]);
    DVDCurrentPos := MRMaster.HoursToMiliSec(HMSFTimeCode.bHours, HMSFTimeCode.bMinutes, HMSFTimeCode.bSeconds);
    if not DVDSliderChanging then DVDSlider.Position := DVDCurrentPos;
   if not ((Playing or Pause) OR RadioRunning) then begin
     if Deskdisplay.Visible AND ((deskdisplay.Label2.Caption = siLang1.GetTextOrDefault('IDS_21' (* 'Gestoppt' *) )) OR (deskdisplay.label2.Caption = 'DVD'))
       then Deskdisplay.Runtimelabel.Caption := Label1.Caption;
   end;
  End;
end;

procedure TMRDVD.DVDSliderMouseUp(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  DVD_SetTrackTime(DVDSlider.Position);
  DVDSliderChanging := False;
end;

procedure TMRDVD.DVD_SetTrackTime(NewValue:integer);
var
 DvdControl2: IDvdControl2;
 DvdCmd: IDvdCmd;
 HMSFTime: TDVDHMSFTimeCode;
begin
  if FilterGraph.Active then
   begin
    if Succeeded(FilterGraph.QueryInterface(IDvdControl2, DvdControl2)) then begin
       DVDSlider.Enabled := false;
       HMSFTime := MRMaster.MiliSecToHours(NewValue);
       DVDCurrentPos := NewValue;
       try
          DvdControl2.PlayAtTimeInTitle(StrToInt(Label4.Caption),HMSFTime,DVD_CMD_FLAG_Flush,DvdCmd);
       except
          OSDLabel.Caption := siLang1.GetTextOrDefault('IDS_318' (* 'Kommando nicht möglich' *) );
          ActivateOSD;
       end;
       DvdCmd := nil;
       DVDControl2 := nil;
       DVDSlider.Enabled := true;
     end;
   end;
end;

damit klappts...vielleicht hilft dir das bischen


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:26 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz