mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Decode writable Blu-ray media tags from image info in GUI.
This commit is contained in:
2
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
2
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -1614,6 +1614,8 @@
|
||||
<e p="Tabs" t="Include">
|
||||
<e p="tabAtaInfo.xeto" t="Include" />
|
||||
<e p="tabAtaInfo.xeto.cs" t="Include" />
|
||||
<e p="tabBlurayInfo.xeto" t="Include" />
|
||||
<e p="tabBlurayInfo.xeto.cs" t="Include" />
|
||||
<e p="tabCompactDiscInfo.xeto" t="Include" />
|
||||
<e p="tabCompactDiscInfo.xeto.cs" t="Include" />
|
||||
<e p="tabDvdInfo.xeto" t="Include" />
|
||||
|
||||
@@ -502,6 +502,47 @@ namespace DiscImageChef.Gui.Panels
|
||||
dvdrDlMiddleZoneStart, dvdrDlJumpIntervalSize, dvdrDlManualLayerJumpStartLba,
|
||||
null, dvdPlusAdip, dvdPlusDcb);
|
||||
tabInfos.Pages.Add(tabDvdWritableInfo);
|
||||
|
||||
byte[] blurayBurstCuttingArea = null;
|
||||
byte[] blurayCartridgeStatus = null;
|
||||
byte[] blurayDds = null;
|
||||
byte[] blurayDiscInformation = null;
|
||||
byte[] blurayPowResources = null;
|
||||
byte[] bluraySpareAreaInformation = null;
|
||||
byte[] blurayTrackResources = null;
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null &&
|
||||
imageFormat.Info.ReadableMediaTags.Contains(MediaTagType.BD_BCA))
|
||||
blurayBurstCuttingArea = imageFormat.ReadDiskTag(MediaTagType.BD_BCA);
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null &&
|
||||
imageFormat.Info.ReadableMediaTags.Contains(MediaTagType.BD_CartridgeStatus))
|
||||
blurayCartridgeStatus = imageFormat.ReadDiskTag(MediaTagType.BD_CartridgeStatus);
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null &&
|
||||
imageFormat.Info.ReadableMediaTags.Contains(MediaTagType.BD_DDS))
|
||||
blurayDds = imageFormat.ReadDiskTag(MediaTagType.BD_DDS);
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null &&
|
||||
imageFormat.Info.ReadableMediaTags.Contains(MediaTagType.BD_DI))
|
||||
blurayDiscInformation = imageFormat.ReadDiskTag(MediaTagType.BD_DI);
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null &&
|
||||
imageFormat.Info.ReadableMediaTags.Contains(MediaTagType.MMC_POWResourcesInformation))
|
||||
blurayPowResources = imageFormat.ReadDiskTag(MediaTagType.MMC_POWResourcesInformation);
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null &&
|
||||
imageFormat.Info.ReadableMediaTags.Contains(MediaTagType.BD_SpareArea))
|
||||
bluraySpareAreaInformation = imageFormat.ReadDiskTag(MediaTagType.BD_SpareArea);
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null &&
|
||||
imageFormat.Info.ReadableMediaTags.Contains(MediaTagType.MMC_TrackResourcesInformation))
|
||||
bluraySpareAreaInformation = imageFormat.ReadDiskTag(MediaTagType.MMC_TrackResourcesInformation);
|
||||
|
||||
tabBlurayInfo tabBlurayInfo = new tabBlurayInfo();
|
||||
tabBlurayInfo.LoadData(blurayDiscInformation, blurayBurstCuttingArea, blurayDds, blurayCartridgeStatus,
|
||||
bluraySpareAreaInformation, blurayPowResources, blurayTrackResources, null, null);
|
||||
tabInfos.Pages.Add(tabBlurayInfo);
|
||||
}
|
||||
|
||||
#region XAML controls
|
||||
|
||||
@@ -155,62 +155,6 @@
|
||||
Visible="False"/>
|
||||
</StackLayout>
|
||||
</TabPage>
|
||||
<TabPage ID="tabBluray" Text="Blu-ray" Visible="False">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayDiscInformation" Text="Disc information" Visible="False">
|
||||
<TextArea ID="txtBlurayDiscInformation" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayBurstCuttingArea" Text="Burst Cutting Area" Visible="False">
|
||||
<TextArea ID="txtBlurayBurstCuttingArea" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayDds" Text="Disc Definition Structure" Visible="False">
|
||||
<TextArea ID="txtBlurayDds" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayCartridgeStatus" Text="Cartridge Status" Visible="False">
|
||||
<TextArea ID="txtBlurayCartridgeStatus" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBluraySpareAreaInformation" Text="Spare Area Information" Visible="False">
|
||||
<TextArea ID="txtBluraySpareAreaInformation" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayPowResources" Text="Pseudo-OverWrite Resources" Visible="False">
|
||||
<TextArea ID="txtBlurayPowResources" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayTrackResources" Text="Track Resources" Visible="False">
|
||||
<TextArea ID="txtBlurayTrackResources" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<Button Click="OnBtnSaveBlurayDiscInformationClick" ID="btnSaveBlurayDiscInformation"
|
||||
Text="Save Disc Information" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayBurstCuttingAreaClick" ID="btnSaveBlurayBurstCuttingArea"
|
||||
Text="Save Burst Cutting Area" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayDdsClick" ID="btnSaveBlurayDds"
|
||||
Text="Save Disc Definition Structure" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayCartridgeStatusClick" ID="btnSaveBlurayCartridgeStatus"
|
||||
Text="Save Cartridge Status" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBluraySpareAreaInformationClick" ID="btnSaveBluraySpareAreaInformation"
|
||||
Text="Save Spare Area Information" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayPowResourcesClick" ID="btnSaveBlurayPowResources"
|
||||
Text="Save Pseudo-OverWrite Resources" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayTrackResourcesClick" ID="btnSaveBlurayTrackResources"
|
||||
Text="Save Track Resources" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayRawDflClick" ID="btnSaveBlurayRawDfl" Text="Save raw DFL"
|
||||
Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayPacClick" ID="btnSaveBlurayPac" Text="Save PAC" Visible="False"/>
|
||||
</StackLayout>
|
||||
</TabPage>
|
||||
</TabControl>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Left" VerticalAlignment="Bottom">
|
||||
|
||||
@@ -35,8 +35,6 @@ using System.IO;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.Core.Media.Info;
|
||||
using DiscImageChef.Decoders.Bluray;
|
||||
using DiscImageChef.Decoders.SCSI.MMC;
|
||||
using DiscImageChef.Decoders.SCSI.SSC;
|
||||
using DiscImageChef.Decoders.Xbox;
|
||||
using DiscImageChef.Gui.Controls;
|
||||
@@ -179,63 +177,12 @@ namespace DiscImageChef.Gui.Panels
|
||||
scsiInfo.DvdPlusAdip, scsiInfo.DvdPlusDcb);
|
||||
tabInfos.Pages.Add(tabDvdWritableInfo);
|
||||
|
||||
if(this.scsiInfo.BlurayDiscInformation != null)
|
||||
{
|
||||
grpBlurayDiscInformation.Visible = true;
|
||||
btnSaveBlurayDiscInformation.Visible = true;
|
||||
txtBlurayDiscInformation.Text = DI.Prettify(this.scsiInfo.BlurayDiscInformation);
|
||||
}
|
||||
|
||||
if(this.scsiInfo.BlurayBurstCuttingArea != null)
|
||||
{
|
||||
grpBlurayBurstCuttingArea.Visible = true;
|
||||
btnSaveBlurayBurstCuttingArea.Visible = true;
|
||||
txtBlurayBurstCuttingArea.Text = BCA.Prettify(this.scsiInfo.BlurayBurstCuttingArea);
|
||||
}
|
||||
|
||||
if(this.scsiInfo.BlurayDds != null)
|
||||
{
|
||||
grpBlurayDds.Visible = true;
|
||||
btnSaveBlurayDds.Visible = true;
|
||||
txtBlurayDds.Text = DDS.Prettify(this.scsiInfo.BlurayDds);
|
||||
}
|
||||
|
||||
if(this.scsiInfo.BlurayCartridgeStatus != null)
|
||||
{
|
||||
grpBlurayCartridgeStatus.Visible = true;
|
||||
btnSaveBlurayCartridgeStatus.Visible = true;
|
||||
txtBlurayCartridgeStatus.Text = Cartridge.Prettify(this.scsiInfo.BlurayCartridgeStatus);
|
||||
}
|
||||
|
||||
if(this.scsiInfo.BluraySpareAreaInformation != null)
|
||||
{
|
||||
grpBluraySpareAreaInformation.Visible = true;
|
||||
btnSaveBluraySpareAreaInformation.Visible = true;
|
||||
txtBluraySpareAreaInformation.Text = Spare.Prettify(this.scsiInfo.BluraySpareAreaInformation);
|
||||
}
|
||||
|
||||
if(this.scsiInfo.BlurayPowResources != null)
|
||||
{
|
||||
grpBlurayPowResources.Visible = true;
|
||||
btnSaveBlurayPowResources.Visible = true;
|
||||
txtBlurayPowResources.Text = DiscInformation.Prettify(this.scsiInfo.BlurayPowResources);
|
||||
}
|
||||
|
||||
if(this.scsiInfo.BlurayTrackResources != null)
|
||||
{
|
||||
grpBlurayTrackResources.Visible = true;
|
||||
btnSaveBlurayTrackResources.Visible = true;
|
||||
txtBlurayTrackResources.Text = DiscInformation.Prettify(this.scsiInfo.BlurayTrackResources);
|
||||
}
|
||||
|
||||
btnSaveBlurayRawDfl.Visible = this.scsiInfo.BlurayRawDfl != null;
|
||||
btnSaveBlurayPac.Visible = this.scsiInfo.BlurayPac != null;
|
||||
|
||||
tabBluray.Visible = grpBlurayDiscInformation.Visible || grpBlurayBurstCuttingArea.Visible ||
|
||||
grpBlurayDds.Visible || grpBlurayCartridgeStatus.Visible ||
|
||||
grpBluraySpareAreaInformation.Visible || grpBlurayPowResources.Visible ||
|
||||
grpBlurayTrackResources.Visible || btnSaveBlurayRawDfl.Visible ||
|
||||
btnSaveBlurayPac.Visible;
|
||||
tabBlurayInfo tabBlurayInfo = new tabBlurayInfo();
|
||||
tabBlurayInfo.LoadData(scsiInfo.BlurayDiscInformation, scsiInfo.BlurayBurstCuttingArea, scsiInfo.BlurayDds,
|
||||
scsiInfo.BlurayCartridgeStatus, scsiInfo.BluraySpareAreaInformation,
|
||||
scsiInfo.BlurayPowResources, scsiInfo.BlurayTrackResources, scsiInfo.BlurayRawDfl,
|
||||
scsiInfo.BlurayPac);
|
||||
tabInfos.Pages.Add(tabBlurayInfo);
|
||||
|
||||
this.devicePath = devicePath;
|
||||
}
|
||||
@@ -299,51 +246,6 @@ namespace DiscImageChef.Gui.Panels
|
||||
SaveElement(scsiInfo.XboxSecuritySector);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayDiscInformationClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayDiscInformation);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayBurstCuttingAreaClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayBurstCuttingArea);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayDdsClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayDds);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayCartridgeStatusClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayCartridgeStatus);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBluraySpareAreaInformationClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BluraySpareAreaInformation);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayPowResourcesClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayPowResources);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayTrackResourcesClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayTrackResources);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayRawDflClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayRawDfl);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayPacClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(scsiInfo.BlurayPac);
|
||||
}
|
||||
|
||||
protected void OnBtnDumpClick(object sender, EventArgs e)
|
||||
{
|
||||
if(scsiInfo.MediaType == MediaType.GDR || scsiInfo.MediaType == MediaType.GDROM)
|
||||
@@ -387,45 +289,6 @@ namespace DiscImageChef.Gui.Panels
|
||||
TextArea txtMediumSupport;
|
||||
Button btnSaveDensitySupport;
|
||||
Button btnSaveMediumSupport;
|
||||
TabPage tabCd;
|
||||
TabPage tabCdInformation;
|
||||
TextArea txtCdInformation;
|
||||
Button btnCdInformation;
|
||||
TabPage tabCdToc;
|
||||
TextArea txtCdToc;
|
||||
Button btnCdToc;
|
||||
TabPage tabCdFullToc;
|
||||
TextArea txtCdFullToc;
|
||||
Button btnCdFullToc;
|
||||
TabPage tabCdSession;
|
||||
TextArea txtCdSession;
|
||||
Button btnCdSession;
|
||||
TabPage tabCdText;
|
||||
TextArea txtCdText;
|
||||
Button btnCdText;
|
||||
TabPage tabCdAtip;
|
||||
TextArea txtCdAtip;
|
||||
Button btnCdAtip;
|
||||
TabPage tabCdMisc;
|
||||
StackLayout stkMcn;
|
||||
Label lblMcn;
|
||||
TextBox txtMcn;
|
||||
GroupBox grpIsrcs;
|
||||
TreeGridView grdIsrcs;
|
||||
Button btnCdPma;
|
||||
TabPage tabDvd;
|
||||
GroupBox grpDvdPfi;
|
||||
TextArea txtDvdPfi;
|
||||
GroupBox grpDvdCmi;
|
||||
TextArea txtDvdCmi;
|
||||
GroupBox grpHdDvdCmi;
|
||||
TextArea txtHdDvdCmi;
|
||||
Button btnSaveDvdPfi;
|
||||
Button btnSaveDvdDmi;
|
||||
Button btnSaveDvdCmi;
|
||||
Button btnSaveHdDvdCmi;
|
||||
Button btnSaveDvdBca;
|
||||
Button btnSaveDvdAacs;
|
||||
TabPage tabXbox;
|
||||
StackLayout stkXboxInformation;
|
||||
Label lblXboxL0Video;
|
||||
@@ -445,53 +308,6 @@ namespace DiscImageChef.Gui.Panels
|
||||
GroupBox grpXboxSs;
|
||||
TextArea txtXboxSs;
|
||||
Button btnSaveXboxSs;
|
||||
GroupBox grpDvdRamDds;
|
||||
TextArea txtDvdRamDds;
|
||||
GroupBox grpDvdRamCartridgeStatus;
|
||||
TextArea txtDvdRamCartridgeStatus;
|
||||
GroupBox grpDvdRamSpareAreaInformation;
|
||||
TextArea txtDvdRamSpareAreaInformation;
|
||||
Button btnSaveDvdRamDds;
|
||||
Button btnSaveDvdRamCartridgeStatus;
|
||||
Button btnSaveDvdRamSpareAreaInformation;
|
||||
TabPage tabDvdr;
|
||||
Button btnSaveLastBorderOutRmd;
|
||||
Button btnSaveDvdPreRecordedInfo;
|
||||
Button btnSaveDvdrMediaIdentifier;
|
||||
Button btnSaveDvdrPhysicalInformation;
|
||||
Button btnSaveHddvdrMediumStatus;
|
||||
Button btnSaveHddvdrLastRmd;
|
||||
Button btnSaveDvdrLayerCapacity;
|
||||
Button btnSaveDvdrDlMiddleZoneStart;
|
||||
Button btnSaveDvdrDlJumpIntervalSize;
|
||||
Button btnSaveDvdrDlManualLayerJumpStartLba;
|
||||
Button btnSaveDvdrDlRemapAnchorPoint;
|
||||
Button btnSaveDvdPlusAdip;
|
||||
Button btnSaveDvdPlusDcb;
|
||||
TabPage tabBluray;
|
||||
GroupBox grpBlurayDiscInformation;
|
||||
TextArea txtBlurayDiscInformation;
|
||||
GroupBox grpBlurayBurstCuttingArea;
|
||||
TextArea txtBlurayBurstCuttingArea;
|
||||
GroupBox grpBlurayDds;
|
||||
TextArea txtBlurayDds;
|
||||
GroupBox grpBlurayCartridgeStatus;
|
||||
TextArea txtBlurayCartridgeStatus;
|
||||
GroupBox grpBluraySpareAreaInformation;
|
||||
TextArea txtBluraySpareAreaInformation;
|
||||
GroupBox grpBlurayPowResources;
|
||||
TextArea txtBlurayPowResources;
|
||||
GroupBox grpBlurayTrackResources;
|
||||
TextArea txtBlurayTrackResources;
|
||||
Button btnSaveBlurayDiscInformation;
|
||||
Button btnSaveBlurayBurstCuttingArea;
|
||||
Button btnSaveBlurayDds;
|
||||
Button btnSaveBlurayCartridgeStatus;
|
||||
Button btnSaveBluraySpareAreaInformation;
|
||||
Button btnSaveBlurayPowResources;
|
||||
Button btnSaveBlurayTrackResources;
|
||||
Button btnSaveBlurayRawDfl;
|
||||
Button btnSaveBlurayPac;
|
||||
Button btnDump;
|
||||
ImageView imgMediaLogo;
|
||||
SvgImageView svgMediaLogo;
|
||||
|
||||
90
DiscImageChef.Gui/Tabs/tabBlurayInfo.xeto
Normal file
90
DiscImageChef.Gui/Tabs/tabBlurayInfo.xeto
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!--
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ============================================================================
|
||||
//
|
||||
// Filename : pnlScsiInfo.xeto
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : SCSI media information panel.
|
||||
//
|
||||
// ==[ Description ] ==========================================================
|
||||
//
|
||||
// Defines the structure for the SCSI media information panel.
|
||||
//
|
||||
// ==[ License ] ==============================================================
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ============================================================================
|
||||
// Copyright © 2011-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
-->
|
||||
|
||||
<TabPage Text="Blu-ray" Visible="False" xmlns="http://schema.picoe.ca/eto.forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayDiscInformation" Text="Disc information" Visible="False">
|
||||
<TextArea ID="txtBlurayDiscInformation" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayBurstCuttingArea" Text="Burst Cutting Area" Visible="False">
|
||||
<TextArea ID="txtBlurayBurstCuttingArea" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayDds" Text="Disc Definition Structure" Visible="False">
|
||||
<TextArea ID="txtBlurayDds" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayCartridgeStatus" Text="Cartridge Status" Visible="False">
|
||||
<TextArea ID="txtBlurayCartridgeStatus" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBluraySpareAreaInformation" Text="Spare Area Information" Visible="False">
|
||||
<TextArea ID="txtBluraySpareAreaInformation" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayPowResources" Text="Pseudo-OverWrite Resources" Visible="False">
|
||||
<TextArea ID="txtBlurayPowResources" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Expand="True">
|
||||
<GroupBox ID="grpBlurayTrackResources" Text="Track Resources" Visible="False">
|
||||
<TextArea ID="txtBlurayTrackResources" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayoutItem>
|
||||
<Button Click="OnBtnSaveBlurayDiscInformationClick" ID="btnSaveBlurayDiscInformation"
|
||||
Text="Save Disc Information" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayBurstCuttingAreaClick" ID="btnSaveBlurayBurstCuttingArea"
|
||||
Text="Save Burst Cutting Area" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayDdsClick" ID="btnSaveBlurayDds" Text="Save Disc Definition Structure"
|
||||
Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayCartridgeStatusClick" ID="btnSaveBlurayCartridgeStatus"
|
||||
Text="Save Cartridge Status" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBluraySpareAreaInformationClick" ID="btnSaveBluraySpareAreaInformation"
|
||||
Text="Save Spare Area Information" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayPowResourcesClick" ID="btnSaveBlurayPowResources"
|
||||
Text="Save Pseudo-OverWrite Resources" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayTrackResourcesClick" ID="btnSaveBlurayTrackResources" Text="Save Track Resources"
|
||||
Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayRawDflClick" ID="btnSaveBlurayRawDfl" Text="Save raw DFL" Visible="False"/>
|
||||
<Button Click="OnBtnSaveBlurayPacClick" ID="btnSaveBlurayPac" Text="Save PAC" Visible="False"/>
|
||||
</StackLayout>
|
||||
</TabPage>
|
||||
222
DiscImageChef.Gui/Tabs/tabBlurayInfo.xeto.cs
Normal file
222
DiscImageChef.Gui/Tabs/tabBlurayInfo.xeto.cs
Normal file
@@ -0,0 +1,222 @@
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : pnlxeto.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : SCSI media information panel.
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Implements the SCSI media information panel.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2011-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using DiscImageChef.Decoders.Bluray;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
|
||||
namespace DiscImageChef.Gui.Panels
|
||||
{
|
||||
public class tabBlurayInfo : TabPage
|
||||
{
|
||||
byte[] BurstCuttingArea;
|
||||
byte[] CartridgeStatus;
|
||||
byte[] Dds;
|
||||
byte[] DiscInformation;
|
||||
byte[] Pac;
|
||||
byte[] PowResources;
|
||||
byte[] RawDfl;
|
||||
byte[] SpareAreaInformation;
|
||||
byte[] TrackResources;
|
||||
|
||||
public tabBlurayInfo()
|
||||
{
|
||||
XamlReader.Load(this);
|
||||
}
|
||||
|
||||
internal void LoadData(byte[] blurayDiscInformation, byte[] blurayBurstCuttingArea, byte[] blurayDds,
|
||||
byte[] blurayCartridgeStatus, byte[] bluraySpareAreaInformation,
|
||||
byte[] blurayPowResources, byte[] blurayTrackResources, byte[] blurayRawDfl,
|
||||
byte[] blurayPac)
|
||||
{
|
||||
DiscInformation = blurayDiscInformation;
|
||||
BurstCuttingArea = blurayBurstCuttingArea;
|
||||
Dds = blurayDds;
|
||||
CartridgeStatus = blurayCartridgeStatus;
|
||||
SpareAreaInformation = bluraySpareAreaInformation;
|
||||
PowResources = blurayPowResources;
|
||||
TrackResources = blurayTrackResources;
|
||||
RawDfl = blurayRawDfl;
|
||||
Pac = blurayPac;
|
||||
|
||||
if(blurayDiscInformation != null)
|
||||
{
|
||||
grpBlurayDiscInformation.Visible = true;
|
||||
btnSaveBlurayDiscInformation.Visible = true;
|
||||
txtBlurayDiscInformation.Text = DI.Prettify(blurayDiscInformation);
|
||||
}
|
||||
|
||||
if(blurayBurstCuttingArea != null)
|
||||
{
|
||||
grpBlurayBurstCuttingArea.Visible = true;
|
||||
btnSaveBlurayBurstCuttingArea.Visible = true;
|
||||
txtBlurayBurstCuttingArea.Text = BCA.Prettify(blurayBurstCuttingArea);
|
||||
}
|
||||
|
||||
if(blurayDds != null)
|
||||
{
|
||||
grpBlurayDds.Visible = true;
|
||||
btnSaveBlurayDds.Visible = true;
|
||||
txtBlurayDds.Text = DDS.Prettify(blurayDds);
|
||||
}
|
||||
|
||||
if(blurayCartridgeStatus != null)
|
||||
{
|
||||
grpBlurayCartridgeStatus.Visible = true;
|
||||
btnSaveBlurayCartridgeStatus.Visible = true;
|
||||
txtBlurayCartridgeStatus.Text = Cartridge.Prettify(blurayCartridgeStatus);
|
||||
}
|
||||
|
||||
if(bluraySpareAreaInformation != null)
|
||||
{
|
||||
grpBluraySpareAreaInformation.Visible = true;
|
||||
btnSaveBluraySpareAreaInformation.Visible = true;
|
||||
txtBluraySpareAreaInformation.Text = Spare.Prettify(bluraySpareAreaInformation);
|
||||
}
|
||||
|
||||
if(blurayPowResources != null)
|
||||
{
|
||||
grpBlurayPowResources.Visible = true;
|
||||
btnSaveBlurayPowResources.Visible = true;
|
||||
txtBlurayPowResources.Text = Decoders.SCSI.MMC.DiscInformation.Prettify(blurayPowResources);
|
||||
}
|
||||
|
||||
if(blurayTrackResources != null)
|
||||
{
|
||||
grpBlurayTrackResources.Visible = true;
|
||||
btnSaveBlurayTrackResources.Visible = true;
|
||||
txtBlurayTrackResources.Text = Decoders.SCSI.MMC.DiscInformation.Prettify(blurayTrackResources);
|
||||
}
|
||||
|
||||
btnSaveBlurayRawDfl.Visible = blurayRawDfl != null;
|
||||
btnSaveBlurayPac.Visible = blurayPac != null;
|
||||
|
||||
Visible = grpBlurayDiscInformation.Visible || grpBlurayBurstCuttingArea.Visible ||
|
||||
grpBlurayDds.Visible ||
|
||||
grpBlurayCartridgeStatus.Visible || grpBluraySpareAreaInformation.Visible ||
|
||||
grpBlurayPowResources.Visible || grpBlurayTrackResources.Visible ||
|
||||
btnSaveBlurayRawDfl.Visible ||
|
||||
btnSaveBlurayPac.Visible;
|
||||
}
|
||||
|
||||
void SaveElement(byte[] data)
|
||||
{
|
||||
SaveFileDialog dlgSaveBinary = new SaveFileDialog();
|
||||
dlgSaveBinary.Filters.Add(new FileFilter {Extensions = new[] {"*.bin"}, Name = "Binary"});
|
||||
DialogResult result = dlgSaveBinary.ShowDialog(this);
|
||||
|
||||
if(result != DialogResult.Ok) return;
|
||||
|
||||
FileStream saveFs = new FileStream(dlgSaveBinary.FileName, FileMode.Create);
|
||||
saveFs.Write(data, 0, data.Length);
|
||||
|
||||
saveFs.Close();
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayDiscInformationClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(DiscInformation);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayBurstCuttingAreaClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(BurstCuttingArea);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayDdsClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(Dds);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayCartridgeStatusClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(CartridgeStatus);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBluraySpareAreaInformationClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(SpareAreaInformation);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayPowResourcesClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(PowResources);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayTrackResourcesClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(TrackResources);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayRawDflClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(RawDfl);
|
||||
}
|
||||
|
||||
protected void OnBtnSaveBlurayPacClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveElement(Pac);
|
||||
}
|
||||
|
||||
#region XAML controls
|
||||
#pragma warning disable 169
|
||||
#pragma warning disable 649
|
||||
GroupBox grpBlurayDiscInformation;
|
||||
TextArea txtBlurayDiscInformation;
|
||||
GroupBox grpBlurayBurstCuttingArea;
|
||||
TextArea txtBlurayBurstCuttingArea;
|
||||
GroupBox grpBlurayDds;
|
||||
TextArea txtBlurayDds;
|
||||
GroupBox grpBlurayCartridgeStatus;
|
||||
TextArea txtBlurayCartridgeStatus;
|
||||
GroupBox grpBluraySpareAreaInformation;
|
||||
TextArea txtBluraySpareAreaInformation;
|
||||
GroupBox grpBlurayPowResources;
|
||||
TextArea txtBlurayPowResources;
|
||||
GroupBox grpBlurayTrackResources;
|
||||
TextArea txtBlurayTrackResources;
|
||||
Button btnSaveBlurayDiscInformation;
|
||||
Button btnSaveBlurayBurstCuttingArea;
|
||||
Button btnSaveBlurayDds;
|
||||
Button btnSaveBlurayCartridgeStatus;
|
||||
Button btnSaveBluraySpareAreaInformation;
|
||||
Button btnSaveBlurayPowResources;
|
||||
Button btnSaveBlurayTrackResources;
|
||||
Button btnSaveBlurayRawDfl;
|
||||
Button btnSaveBlurayPac;
|
||||
#pragma warning restore 169
|
||||
#pragma warning restore 649
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user