Autor Beitrag
Gerhard
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Mi 13.04.05 21:12 
Hallo Gemeinde,

ich habe mit DSPACK einen einfachen DVD-Player erstellt, nun wäre es sehr vorteilhaft wenn ich die DVD-Struktur-Tiefe (Kapitel und Menu oder nur Kapiteln) herauslesen könnte.

Weiß jemand Rat?
Danke Gerhard
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mi 13.04.05 21:41 
Wie wäre es wenn du Google benutzen würdes und dich zuerst etwas über die DVD Struktur informieren würdest. Da gibt es tonnenweise an Infos. Die kannst du dann später in deinem Programm umsetzten.

_________________
Popov
LH_Freak
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 385

Win XP
D7 PE, D2k5 Trial
BeitragVerfasst: Do 14.04.05 15:22 
user profile iconGerhard hat folgendes geschrieben:
Hallo Gemeinde,

ich habe mit DSPACK einen einfachen DVD-Player erstellt, nun wäre es sehr vorteilhaft wenn ich die DVD-Struktur-Tiefe (Kapitel und Menu oder nur Kapiteln) herauslesen könnte.

Weiß jemand Rat?
Danke Gerhard


So was mache ich auch gerade, aber was willst du mit dem gelesen Daten eigentlich machen?
Das Menü müsstest du doch drinnen haben, wenn du nach der Demo programmiert hast ;)
Oder willst du so ein kleines (Popup-)Menü, in dem man dann alle Subtitles, Audiospuren, usw. aufgelistet bekommt, und per Mausklick dann ändern kann?
Gerhard Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Sa 30.04.05 21:11 
Mein DVD-Mini-Player ist wirklich einfach, damit ich diesen mit nur 4 Tasten einer FB bedienen (Stichwort Girder) kann. Aber aus Gründen der Menusteuerung wäre die Anzahl der Menüs, die Kapitel kann man aus der Filestruktur ablesen, érforderlich. Die Frage ist für nach wie vor: Wie kann ich feststellen ob es unterhalb der Kapiteln noch weitere Untermenüs gibt, die Anzahl ist nicht notwendig ?

Danke!
Gerhard
LH_Freak
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 385

Win XP
D7 PE, D2k5 Trial
BeitragVerfasst: So 01.05.05 00:31 
so mach ich das:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
procedure TForm4.RefreshSubpictures;
var
i: integer;
t: tagDVD_Subpictureattributes;
Aus: TMenuItem;
Strich: TMenuItem;
begin
MenuItem7.Clear;

Aus:= TMenuItem.Create(self);
Aus.Caption := 'Zeige Untertitel';
Aus.OnClick := KeineClick;
Aus.AutoCheck := True;
MenuItem7.Add(Aus);

Strich := TMenuItem.Create(self);
Strich.Caption := '-';
MenuItem7.Add(Strich);

    for i := 0 to 31 do begin
      if (FilterGraph as IDVDInfo2).GetSubpictureAttributes(i,t) = S_OK then
        begin
          SetLength(Subpictures,i+1);
          Subpictures[i] := TMenuItem.Create(self);
          Subpictures[i].Caption := LCIDtoString(t.Language);
 
          MenuItem7.Add(Subpictures[i]);
        end;
      end;

end;


beim Filtergraph bei OnDVDChapterStart: RefreshSubpictures :D und funktioniert einwandfrei ;).
Mit den Audios funktioniert das übrigens genauso. Und dann ist es auch kein Problem per Klick die Audiosprache und den Untertitel zu ändern.
Gerhard Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Mo 02.05.05 16:09 
Hi LH_Freak,
Danke für den Code - werde mich gleich zum PC setzen ....


Gruß Gerhard
LH_Freak
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 385

Win XP
D7 PE, D2k5 Trial
BeitragVerfasst: Mo 02.05.05 21:52 
Bitte, bitte :D
Gerhard Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: So 08.05.05 20:55 
Hi LH_Freak,

den obigen Code habe ich mehrfach (in verschieden Varianten) probiert, bin aber nicht klar gekommen. Es kommt für die Zeile ... If (FilterGraph as IDVDInfo2). .... die Fehlermeldung: Error, Operator not applicable to this operand type

Wie kann man den Status von IDVDInfo2 abfragen?


Danke für Hinweise!
Gruß Gerhard
LH_Freak
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 385

Win XP
D7 PE, D2k5 Trial
BeitragVerfasst: So 08.05.05 21:19 
heißt dein Filtergraph auch Filtergraph und nicht anders?????
Gerhard Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Fr 13.05.05 16:27 
Hi LH_Freak,

irgendwie hat es nicht geklappt, aber ich dann noch einen Source-code - mit Hilfe des Orakels - gefunden; wenn einer diesen brauchen kann oder sucht ....


If succeeded(FilterGraph.QueryInterface(IDVDControl2,DVDControl)) then
begin
DVDControl.SetOption(DVD_NotifyParentalLevelChange,false);
DVDControl.SetOption(DVD_HMSF_TimeCodeEvents,true);
DVDControl.QueryInterface(IDVD_Info2,DVDInfo);
DVDInfo.GetDVDVolumeInfo(numvolumes,pulvolume,DiskSide,Titlecount)

for i:=1 to Titlecount do begin
node:=treeView1.items.add(nil,'Titel '+inttostr(i));
DVDInfo.GetNumberOfChapters(i,ChapterPerTitle);
forj:=1 to ChapterPerTitle do begin
with treeview1.items.AddChild(node,'Chapter '+inttostr(j)) do begin
data:=pointer(j);
end;
end;
end
end;

Gruß Gerhard